V4L/DVB (9913): tuner-xc2028: allow printing stack trace as debug on sleep code
authorMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 18 Dec 2008 09:00:25 +0000 (06:00 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 30 Dec 2008 11:39:15 +0000 (09:39 -0200)
tuner-xc3028 can be put to sleep to save power. However, if not properly
recovered from sleep, the device won't work. It is noticed that some
devices doesn't recover properly, so let's add a dump_stack() as a debug
option, to allow us to track when this happens.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/common/tuners/tuner-xc2028.c

index 7b7e242cae169ea88edf1f46ab04c464cfb89b55..1adce9ff52ce0fea7daee80fa46f94e15f85d1b4 100644 (file)
@@ -1107,6 +1107,10 @@ static int xc2028_sleep(struct dvb_frontend *fe)
                return 0;
 
        tuner_dbg("Putting xc2028/3028 into poweroff mode.\n");
+       if (debug > 1) {
+               tuner_dbg("Printing sleep stack trace:\n");
+               dump_stack();
+       }
 
        mutex_lock(&priv->lock);