diff options
author | Frank Schaefer <fschaefer.oss@googlemail.com> | 2012-12-27 22:02:43 (GMT) |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-01-05 03:09:39 (GMT) |
commit | 2665c2995d6a6026cfc9ec118908dfccb74fb5e0 (patch) | |
tree | ef731f712fc9c95dfdf869434c7ffd37abce892f /drivers/media/usb/em28xx/em28xx.h | |
parent | d3829fadc4611e96aa360b8ead5adefdf61f45ea (diff) | |
download | linux-fsl-qoriq-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.h')
-rw-r--r-- | drivers/media/usb/em28xx/em28xx.h | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/media/usb/em28xx/em28xx.h b/drivers/media/usb/em28xx/em28xx.h index bf0a790..f891a28 100644 --- a/drivers/media/usb/em28xx/em28xx.h +++ b/drivers/media/usb/em28xx/em28xx.h @@ -439,13 +439,6 @@ struct em28xx_eeprom { u8 string_idx_table; }; -/* device states */ -enum em28xx_dev_state { - DEV_INITIALIZED = 0x01, - DEV_DISCONNECTED = 0x02, - DEV_MISCONFIGURED = 0x04, -}; - #define EM28XX_AUDIO_BUFS 5 #define EM28XX_NUM_AUDIO_PACKETS 64 #define EM28XX_AUDIO_MAX_PACKET_SIZE 196 /* static value */ @@ -492,6 +485,8 @@ struct em28xx { int devno; /* marks the number of this device */ enum em28xx_chip_id chip_id; + unsigned char disconnected:1; /* device has been diconnected */ + int audio_ifnum; struct v4l2_device v4l2_dev; @@ -563,9 +558,6 @@ struct em28xx { struct em28xx_audio adev; - /* states */ - enum em28xx_dev_state state; - /* capture state tracking */ int capture_type; unsigned char top_field:1; |