diff options
author | Hans de Goede <hdegoede@redhat.com> | 2009-06-18 04:08:11 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-06-23 02:13:26 -0400 |
commit | 9764398bdeef49414b37ef8bd35abfec1f44bd3e (patch) | |
tree | 68c8e49400f8e9ed5a576ed855c9a605423f9398 /drivers/media/video/gspca/sonixj.c | |
parent | e080fcd9298d544f3233d8c45304990be1920b3d (diff) |
V4L/DVB (12086): gspca_sonixj: Fix control index numbering
The control index defines for the gspca_sonixj driver were numbered
wrong, causing us to disable the wrong controls on various sensors
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/gspca/sonixj.c')
-rw-r--r-- | drivers/media/video/gspca/sonixj.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/media/video/gspca/sonixj.c b/drivers/media/video/gspca/sonixj.c index dc6a6f11354a..9e31d1bbc678 100644 --- a/drivers/media/video/gspca/sonixj.c +++ b/drivers/media/video/gspca/sonixj.c | |||
@@ -98,6 +98,7 @@ static int sd_setinfrared(struct gspca_dev *gspca_dev, __s32 val); | |||
98 | static int sd_getinfrared(struct gspca_dev *gspca_dev, __s32 *val); | 98 | static int sd_getinfrared(struct gspca_dev *gspca_dev, __s32 *val); |
99 | 99 | ||
100 | static struct ctrl sd_ctrls[] = { | 100 | static struct ctrl sd_ctrls[] = { |
101 | #define BRIGHTNESS_IDX 0 | ||
101 | { | 102 | { |
102 | { | 103 | { |
103 | .id = V4L2_CID_BRIGHTNESS, | 104 | .id = V4L2_CID_BRIGHTNESS, |
@@ -113,6 +114,7 @@ static struct ctrl sd_ctrls[] = { | |||
113 | .set = sd_setbrightness, | 114 | .set = sd_setbrightness, |
114 | .get = sd_getbrightness, | 115 | .get = sd_getbrightness, |
115 | }, | 116 | }, |
117 | #define CONTRAST_IDX 1 | ||
116 | { | 118 | { |
117 | { | 119 | { |
118 | .id = V4L2_CID_CONTRAST, | 120 | .id = V4L2_CID_CONTRAST, |
@@ -128,6 +130,7 @@ static struct ctrl sd_ctrls[] = { | |||
128 | .set = sd_setcontrast, | 130 | .set = sd_setcontrast, |
129 | .get = sd_getcontrast, | 131 | .get = sd_getcontrast, |
130 | }, | 132 | }, |
133 | #define COLOR_IDX 2 | ||
131 | { | 134 | { |
132 | { | 135 | { |
133 | .id = V4L2_CID_SATURATION, | 136 | .id = V4L2_CID_SATURATION, |
@@ -142,6 +145,7 @@ static struct ctrl sd_ctrls[] = { | |||
142 | .set = sd_setcolors, | 145 | .set = sd_setcolors, |
143 | .get = sd_getcolors, | 146 | .get = sd_getcolors, |
144 | }, | 147 | }, |
148 | #define BLUE_BALANCE_IDX 3 | ||
145 | { | 149 | { |
146 | { | 150 | { |
147 | .id = V4L2_CID_BLUE_BALANCE, | 151 | .id = V4L2_CID_BLUE_BALANCE, |
@@ -156,6 +160,7 @@ static struct ctrl sd_ctrls[] = { | |||
156 | .set = sd_setblue_balance, | 160 | .set = sd_setblue_balance, |
157 | .get = sd_getblue_balance, | 161 | .get = sd_getblue_balance, |
158 | }, | 162 | }, |
163 | #define RED_BALANCE_IDX 4 | ||
159 | { | 164 | { |
160 | { | 165 | { |
161 | .id = V4L2_CID_RED_BALANCE, | 166 | .id = V4L2_CID_RED_BALANCE, |
@@ -170,6 +175,7 @@ static struct ctrl sd_ctrls[] = { | |||
170 | .set = sd_setred_balance, | 175 | .set = sd_setred_balance, |
171 | .get = sd_getred_balance, | 176 | .get = sd_getred_balance, |
172 | }, | 177 | }, |
178 | #define GAMMA_IDX 5 | ||
173 | { | 179 | { |
174 | { | 180 | { |
175 | .id = V4L2_CID_GAMMA, | 181 | .id = V4L2_CID_GAMMA, |
@@ -184,7 +190,7 @@ static struct ctrl sd_ctrls[] = { | |||
184 | .set = sd_setgamma, | 190 | .set = sd_setgamma, |
185 | .get = sd_getgamma, | 191 | .get = sd_getgamma, |
186 | }, | 192 | }, |
187 | #define AUTOGAIN_IDX 5 | 193 | #define AUTOGAIN_IDX 6 |
188 | { | 194 | { |
189 | { | 195 | { |
190 | .id = V4L2_CID_AUTOGAIN, | 196 | .id = V4L2_CID_AUTOGAIN, |
@@ -200,7 +206,7 @@ static struct ctrl sd_ctrls[] = { | |||
200 | .get = sd_getautogain, | 206 | .get = sd_getautogain, |
201 | }, | 207 | }, |
202 | /* ov7630/ov7648 only */ | 208 | /* ov7630/ov7648 only */ |
203 | #define VFLIP_IDX 6 | 209 | #define VFLIP_IDX 7 |
204 | { | 210 | { |
205 | { | 211 | { |
206 | .id = V4L2_CID_VFLIP, | 212 | .id = V4L2_CID_VFLIP, |
@@ -216,7 +222,7 @@ static struct ctrl sd_ctrls[] = { | |||
216 | .get = sd_getvflip, | 222 | .get = sd_getvflip, |
217 | }, | 223 | }, |
218 | /* mt9v111 only */ | 224 | /* mt9v111 only */ |
219 | #define INFRARED_IDX 7 | 225 | #define INFRARED_IDX 8 |
220 | { | 226 | { |
221 | { | 227 | { |
222 | .id = V4L2_CID_INFRARED, | 228 | .id = V4L2_CID_INFRARED, |