V4L/DVB (12236): em28xx: stop abusing of board->decoder for sensor information
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.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c
index e64e124..530170a 100644
--- a/drivers/media/video/em28xx/em28xx-cards.c
+++ b/drivers/media/video/em28xx/em28xx-cards.c
@@ -454,7 +454,6 @@
.name = "Silvercrest Webcam 1.3mpix",
.tuner_type = TUNER_ABSENT,
.is_webcam = 1,
- .decoder = EM28XX_MT9V011,
.input = { {
.type = EM28XX_VMUX_COMPOSITE1,
.vmux = 0,
@@ -1737,6 +1736,7 @@
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));
@@ -2267,7 +2267,7 @@
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);