V4L/DVB (5820): Cleanup on cinergyT2: Remove unneeded if(1)
authorMauro Carvalho Chehab <mchehab@infradead.org>
Mon, 2 Jul 2007 18:48:40 +0000 (15:48 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Wed, 18 Jul 2007 17:24:35 +0000 (14:24 -0300)
Before kernel 2.6.14, the driver checked for status before stopping the
thread. So, a compatibility test did exist. After 2.6.14, the
        if (state)
were replaced by:
        if (1)
However, it makes no sense to keep the if(1).

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/dvb/cinergyT2/cinergyT2.c

index bc22064b50ef6882295d52eac60e704b840750bc..5a1449f485cf3a93efb668a2801b9a6d1fa3badd 100644 (file)
@@ -1000,18 +1000,15 @@ static int cinergyt2_suspend (struct usb_interface *intf, pm_message_t state)
        if (cinergyt2->disconnect_pending || mutex_lock_interruptible(&cinergyt2->wq_sem))
                return -ERESTARTSYS;
 
-       if (1) {
-               cinergyt2_suspend_rc(cinergyt2);
-               cancel_rearming_delayed_work(&cinergyt2->query_work);
+       cinergyt2_suspend_rc(cinergyt2);
+       cancel_rearming_delayed_work(&cinergyt2->query_work);
 
-               mutex_lock(&cinergyt2->sem);
-               if (cinergyt2->streaming)
-                       cinergyt2_stop_stream_xfer(cinergyt2);
-               cinergyt2_sleep(cinergyt2, 1);
-               mutex_unlock(&cinergyt2->sem);
-       }
+       mutex_lock(&cinergyt2->sem);
+       if (cinergyt2->streaming)
+               cinergyt2_stop_stream_xfer(cinergyt2);
+       cinergyt2_sleep(cinergyt2, 1);
+       mutex_unlock(&cinergyt2->sem);
 
-       mutex_unlock(&cinergyt2->wq_sem);
        return 0;
 }