aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx231xx/cx231xx-dvb.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2012-01-10 06:48:50 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-01-10 19:35:31 -0500
commit990862a2f024296f27460306393de8f0cdab8997 (patch)
treee8bc467d130a57dd03428010db57794b49f0b964 /drivers/media/video/cx231xx/cx231xx-dvb.c
parentdb702a7af6c85d94ff32b6110b3646180f93f086 (diff)
[media] cx231xx: fix device disconnect checks
The driver were using DEV_MISCONFIGURED on some places, and DEV_DISCONNECTED on others. In a matter of fact, DEV_MISCONFIGURED were set only during the usb disconnect callback, with was confusing. Also, the alsa driver never checks if the device is present, before doing some dangerous things. Remove DEV_MISCONFIGURED, replacing it by DEV_DISCONNECTED. Also, fixes the other usecases for DEV_DISCONNECTED. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx231xx/cx231xx-dvb.c')
-rw-r--r--drivers/media/video/cx231xx/cx231xx-dvb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/video/cx231xx/cx231xx-dvb.c b/drivers/media/video/cx231xx/cx231xx-dvb.c
index da9a4a0aab79..7c4e360ba9bc 100644
--- a/drivers/media/video/cx231xx/cx231xx-dvb.c
+++ b/drivers/media/video/cx231xx/cx231xx-dvb.c
@@ -196,7 +196,7 @@ static inline int dvb_isoc_copy(struct cx231xx *dev, struct urb *urb)
196 if (!dev) 196 if (!dev)
197 return 0; 197 return 0;
198 198
199 if ((dev->state & DEV_DISCONNECTED) || (dev->state & DEV_MISCONFIGURED)) 199 if (dev->state & DEV_DISCONNECTED)
200 return 0; 200 return 0;
201 201
202 if (urb->status < 0) { 202 if (urb->status < 0) {
@@ -228,7 +228,7 @@ static inline int dvb_bulk_copy(struct cx231xx *dev, struct urb *urb)
228 if (!dev) 228 if (!dev)
229 return 0; 229 return 0;
230 230
231 if ((dev->state & DEV_DISCONNECTED) || (dev->state & DEV_MISCONFIGURED)) 231 if (dev->state & DEV_DISCONNECTED)
232 return 0; 232 return 0;
233 233
234 if (urb->status < 0) { 234 if (urb->status < 0) {