summaryrefslogtreecommitdiff
path: root/drivers/media/usb/em28xx/em28xx-dvb.c
diff options
context:
space:
mode:
authorFrank Schaefer <fschaefer.oss@googlemail.com>2012-12-27 22:02:43 (GMT)
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-01-05 03:09:39 (GMT)
commit2665c2995d6a6026cfc9ec118908dfccb74fb5e0 (patch)
treeef731f712fc9c95dfdf869434c7ffd37abce892f /drivers/media/usb/em28xx/em28xx-dvb.c
parentd3829fadc4611e96aa360b8ead5adefdf61f45ea (diff)
downloadlinux-2665c2995d6a6026cfc9ec118908dfccb74fb5e0.tar.xz
[media] em28xx: simplify device state tracking
DEV_INITIALIZED of enum em28xx_dev_state state is used nowhere and there is no need for DEV_MISCONFIGURED, so remove this enum and use a boolean field 'disconnected' in the device struct instead. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/usb/em28xx/em28xx-dvb.c')
-rw-r--r--drivers/media/usb/em28xx/em28xx-dvb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/usb/em28xx/em28xx-dvb.c b/drivers/media/usb/em28xx/em28xx-dvb.c
index 01bb800..a81ec2e 100644
--- a/drivers/media/usb/em28xx/em28xx-dvb.c
+++ b/drivers/media/usb/em28xx/em28xx-dvb.c
@@ -135,7 +135,7 @@ static inline int em28xx_dvb_urb_data_copy(struct em28xx *dev, struct urb *urb)
if (!dev)
return 0;
- if ((dev->state & DEV_DISCONNECTED) || (dev->state & DEV_MISCONFIGURED))
+ if (dev->disconnected)
return 0;
if (urb->status < 0)
@@ -1322,7 +1322,7 @@ static int em28xx_dvb_fini(struct em28xx *dev)
if (dev->dvb) {
struct em28xx_dvb *dvb = dev->dvb;
- if (dev->state & DEV_DISCONNECTED) {
+ if (dev->disconnected) {
/* We cannot tell the device to sleep
* once it has been unplugged. */
if (dvb->fe[0])