diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-07-12 11:04:15 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-07-12 11:04:15 -0300 |
commit | 1b0617b59589491cf91d95950da297a72b9c42ad (patch) | |
tree | 64106ada51b0c85bfee6480034808330213a5fd8 /linux/drivers/media | |
parent | 6cef2ed6aed0628ee5e9eb3c56a5b265ce53d128 (diff) | |
download | mediapointer-dvb-s2-1b0617b59589491cf91d95950da297a72b9c42ad.tar.gz mediapointer-dvb-s2-1b0617b59589491cf91d95950da297a72b9c42ad.tar.bz2 |
em28xx: stop abusing of board->decoder for sensor information
From: Mauro Carvalho Chehab <mchehab@redhat.com>
Instead of using em28xx board decoder field for storing sensor information,
let's use instead a separate field for it.
Also, as sensors are currently autodetected, there's no need of having
it at the boards description. So, move it to the main em28xx struct.
Priority: normal
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/drivers/media')
-rw-r--r-- | linux/drivers/media/video/em28xx/em28xx-cards.c | 4 | ||||
-rw-r--r-- | linux/drivers/media/video/em28xx/em28xx.h | 8 |
2 files changed, 9 insertions, 3 deletions
diff --git a/linux/drivers/media/video/em28xx/em28xx-cards.c b/linux/drivers/media/video/em28xx/em28xx-cards.c index a50ef1216..5f063e4a1 100644 --- a/linux/drivers/media/video/em28xx/em28xx-cards.c +++ b/linux/drivers/media/video/em28xx/em28xx-cards.c @@ -467,7 +467,6 @@ struct em28xx_board em28xx_boards[] = { .name = "Silvercrest Webcam 1.3mpix", .tuner_type = TUNER_ABSENT, .is_webcam = 1, - .decoder = EM28XX_MT9V011, .input = { { .type = EM28XX_VMUX_COMPOSITE1, .vmux = 0, @@ -1808,6 +1807,7 @@ static int em28xx_hint_sensor(struct em28xx *dev) case MT9V011_VERSION: dev->model = EM2820_BOARD_SILVERCREST_WEBCAM; sensor_name = "mt9v011"; + dev->em28xx_sensor = EM28XX_MT9V011; break; default: printk("Unknown Micron Sensor 0x%04x\n", be16_to_cpu(version)); @@ -2372,7 +2372,7 @@ void em28xx_card_setup(struct em28xx *dev) v4l2_i2c_new_probed_subdev(&dev->v4l2_dev, &dev->i2c_adap, "tvp5150", "tvp5150", tvp5150_addrs); - if (dev->board.decoder == EM28XX_MT9V011) + if (dev->em28xx_sensor == EM28XX_MT9V011) v4l2_i2c_new_probed_subdev(&dev->v4l2_dev, &dev->i2c_adap, "mt9v011", "mt9v011", mt9v011_addrs); diff --git a/linux/drivers/media/video/em28xx/em28xx.h b/linux/drivers/media/video/em28xx/em28xx.h index 459a84e40..559903b2a 100644 --- a/linux/drivers/media/video/em28xx/em28xx.h +++ b/linux/drivers/media/video/em28xx/em28xx.h @@ -359,9 +359,13 @@ struct em28xx_input { #define INPUT(nr) (&em28xx_boards[dev->model].input[nr]) enum em28xx_decoder { - EM28XX_NODECODER, + EM28XX_NODECODER = 0, EM28XX_TVP5150, EM28XX_SAA711X, +}; + +enum em28xx_sensor { + EM28XX_NOSENSOR = 0, EM28XX_MT9V011, }; @@ -483,6 +487,8 @@ struct em28xx { struct v4l2_device v4l2_dev; struct em28xx_board board; + enum em28xx_sensor em28xx_sensor; + unsigned int stream_on:1; /* Locks streams */ unsigned int has_audio_class:1; unsigned int has_alsa_audio:1; |