summaryrefslogtreecommitdiff
path: root/drivers/media/video/gspca/m5602/m5602_mt9m111.h
diff options
context:
space:
mode:
authorErik Andr?n <erik.andren@gmail.com>2008-12-30 21:27:17 +0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-04-07 04:44:39 +0400
commite4cc4fcc7b85ec32f05343b02229492c06baba1a (patch)
treeb2e3eaea31ec971963dc6532d14521882eec1d3c /drivers/media/video/gspca/m5602/m5602_mt9m111.h
parente335f224e35f413775a549889318afe6bd0342b0 (diff)
downloadlinux-e4cc4fcc7b85ec32f05343b02229492c06baba1a.tar.xz
V4L/DVB (11411): gspca - m5602: Rework v4l ctrl handling in all sensors
Previously, all sensors allocated a part of a large ctrl vector. Define this vector separately for each sensor instead. Signed-off-by: Erik Andrén <erik.andren@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/gspca/m5602/m5602_mt9m111.h')
-rw-r--r--drivers/media/video/gspca/m5602/m5602_mt9m111.h25
1 files changed, 12 insertions, 13 deletions
diff --git a/drivers/media/video/gspca/m5602/m5602_mt9m111.h b/drivers/media/video/gspca/m5602/m5602_mt9m111.h
index e795ab7a36c9..23b8e4f57bbf 100644
--- a/drivers/media/video/gspca/m5602/m5602_mt9m111.h
+++ b/drivers/media/video/gspca/m5602/m5602_mt9m111.h
@@ -94,18 +94,7 @@ int mt9m111_set_hflip(struct gspca_dev *gspca_dev, __s32 val);
int mt9m111_get_gain(struct gspca_dev *gspca_dev, __s32 *val);
int mt9m111_set_gain(struct gspca_dev *gspca_dev, __s32 val);
-static struct m5602_sensor mt9m111 = {
- .name = "MT9M111",
-
- .i2c_slave_id = 0xba,
- .i2c_regW = 2,
-
- .probe = mt9m111_probe,
- .init = mt9m111_init,
- .power_down = mt9m111_power_down,
-
- .nctrls = 3,
- .ctrls = {
+const static struct ctrl mt9m111_ctrls[] = {
{
{
.id = V4L2_CID_VFLIP,
@@ -144,7 +133,17 @@ static struct m5602_sensor mt9m111 = {
.set = mt9m111_set_gain,
.get = mt9m111_get_gain
}
- },
+};
+
+static struct m5602_sensor mt9m111 = {
+ .name = "MT9M111",
+
+ .i2c_slave_id = 0xba,
+ .i2c_regW = 2,
+
+ .probe = mt9m111_probe,
+ .init = mt9m111_init,
+ .power_down = mt9m111_power_down,
.nmodes = 1,
.modes = {