summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/cinergyT2/cinergyT2.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-07-02 15:48:40 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-07-02 15:48:40 -0300
commitff3f4061e1e6854e0d2c8c52c2363f3d67302651 (patch)
tree7b5ed98780296424a4095544285eca0288f301e3 /linux/drivers/media/dvb/cinergyT2/cinergyT2.c
parent56dee54783bcafee32bb681a221d4c9a2b517ca3 (diff)
downloadmediapointer-dvb-s2-ff3f4061e1e6854e0d2c8c52c2363f3d67302651.tar.gz
mediapointer-dvb-s2-ff3f4061e1e6854e0d2c8c52c2363f3d67302651.tar.bz2
Cleanup on cinergyT2: Remove unneeded if(1)
From: Mauro Carvalho Chehab <mchehab@infradead.org> 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>
Diffstat (limited to 'linux/drivers/media/dvb/cinergyT2/cinergyT2.c')
-rw-r--r--linux/drivers/media/dvb/cinergyT2/cinergyT2.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/linux/drivers/media/dvb/cinergyT2/cinergyT2.c b/linux/drivers/media/dvb/cinergyT2/cinergyT2.c
index 7d4548069..cca6b7985 100644
--- a/linux/drivers/media/dvb/cinergyT2/cinergyT2.c
+++ b/linux/drivers/media/dvb/cinergyT2/cinergyT2.c
@@ -1067,21 +1067,20 @@ static int cinergyt2_suspend (struct usb_interface *intf, pm_message_t state)
return -ERESTARTSYS;
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14)
- if (state > 0) {
-#else
- if (1) {
+ if (state <= 0) {
+ mutex_unlock(&cinergyt2->wq_sem);
+ return 0;
+ }
#endif
- 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;
}