aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorErik Andr?n <erik.andren@gmail.com>2009-04-03 01:49:10 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-06-16 17:20:27 -0400
commitcf811d506a3ed5721e3f22c77309aff489ce54c7 (patch)
tree9cbd245674202324b3b0192398df25e0c3ee7604 /drivers/media
parentd4a389a39bb9586219641144ab0c79706bbc8bcc (diff)
V4L/DVB (11466): gspca - m5602: Let all ctrls on all sensors be static
All hail the static keyword Signed-off-by: Erik Andr?n <erik.andren@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/gspca/m5602/m5602_mt9m111.c22
-rw-r--r--drivers/media/video/gspca/m5602/m5602_mt9m111.h7
-rw-r--r--drivers/media/video/gspca/m5602/m5602_ov9650.c115
-rw-r--r--drivers/media/video/gspca/m5602/m5602_ov9650.h19
-rw-r--r--drivers/media/video/gspca/m5602/m5602_po1030.c47
-rw-r--r--drivers/media/video/gspca/m5602/m5602_po1030.h15
-rw-r--r--drivers/media/video/gspca/m5602/m5602_s5k4aa.c25
-rw-r--r--drivers/media/video/gspca/m5602/m5602_s5k4aa.h9
-rw-r--r--drivers/media/video/gspca/m5602/m5602_s5k83a.c31
-rw-r--r--drivers/media/video/gspca/m5602/m5602_s5k83a.h11
10 files changed, 137 insertions, 164 deletions
diff --git a/drivers/media/video/gspca/m5602/m5602_mt9m111.c b/drivers/media/video/gspca/m5602/m5602_mt9m111.c
index 8700f37deca..8017782efee 100644
--- a/drivers/media/video/gspca/m5602/m5602_mt9m111.c
+++ b/drivers/media/video/gspca/m5602/m5602_mt9m111.c
@@ -18,6 +18,13 @@
18 18
19#include "m5602_mt9m111.h" 19#include "m5602_mt9m111.h"
20 20
21static int mt9m111_set_vflip(struct gspca_dev *gspca_dev, __s32 val);
22static int mt9m111_get_vflip(struct gspca_dev *gspca_dev, __s32 *val);
23static int mt9m111_get_hflip(struct gspca_dev *gspca_dev, __s32 *val);
24static int mt9m111_set_hflip(struct gspca_dev *gspca_dev, __s32 val);
25static int mt9m111_get_gain(struct gspca_dev *gspca_dev, __s32 *val);
26static int mt9m111_set_gain(struct gspca_dev *gspca_dev, __s32 val);
27
21static struct v4l2_pix_format mt9m111_modes[] = { 28static struct v4l2_pix_format mt9m111_modes[] = {
22 { 29 {
23 640, 30 640,
@@ -123,7 +130,8 @@ int mt9m111_probe(struct sd *sd)
123 return -ENODEV; 130 return -ENODEV;
124 131
125sensor_found: 132sensor_found:
126 sensor_settings = kmalloc(ARRAY_SIZE(mt9m111_ctrls) * sizeof(s32), GFP_KERNEL); 133 sensor_settings = kmalloc(ARRAY_SIZE(mt9m111_ctrls) * sizeof(s32),
134 GFP_KERNEL);
127 if (!sensor_settings) 135 if (!sensor_settings)
128 return -ENOMEM; 136 return -ENOMEM;
129 137
@@ -182,7 +190,7 @@ void mt9m111_disconnect(struct sd *sd)
182 kfree(sd->sensor_priv); 190 kfree(sd->sensor_priv);
183} 191}
184 192
185int mt9m111_get_vflip(struct gspca_dev *gspca_dev, __s32 *val) 193static int mt9m111_get_vflip(struct gspca_dev *gspca_dev, __s32 *val)
186{ 194{
187 struct sd *sd = (struct sd *) gspca_dev; 195 struct sd *sd = (struct sd *) gspca_dev;
188 s32 *sensor_settings = sd->sensor_priv; 196 s32 *sensor_settings = sd->sensor_priv;
@@ -193,7 +201,7 @@ int mt9m111_get_vflip(struct gspca_dev *gspca_dev, __s32 *val)
193 return 0; 201 return 0;
194} 202}
195 203
196int mt9m111_set_vflip(struct gspca_dev *gspca_dev, __s32 val) 204static int mt9m111_set_vflip(struct gspca_dev *gspca_dev, __s32 val)
197{ 205{
198 int err; 206 int err;
199 u8 data[2] = {0x00, 0x00}; 207 u8 data[2] = {0x00, 0x00};
@@ -219,7 +227,7 @@ int mt9m111_set_vflip(struct gspca_dev *gspca_dev, __s32 val)
219 return err; 227 return err;
220} 228}
221 229
222int mt9m111_get_hflip(struct gspca_dev *gspca_dev, __s32 *val) 230static int mt9m111_get_hflip(struct gspca_dev *gspca_dev, __s32 *val)
223{ 231{
224 struct sd *sd = (struct sd *) gspca_dev; 232 struct sd *sd = (struct sd *) gspca_dev;
225 s32 *sensor_settings = sd->sensor_priv; 233 s32 *sensor_settings = sd->sensor_priv;
@@ -230,7 +238,7 @@ int mt9m111_get_hflip(struct gspca_dev *gspca_dev, __s32 *val)
230 return 0; 238 return 0;
231} 239}
232 240
233int mt9m111_set_hflip(struct gspca_dev *gspca_dev, __s32 val) 241static int mt9m111_set_hflip(struct gspca_dev *gspca_dev, __s32 val)
234{ 242{
235 int err; 243 int err;
236 u8 data[2] = {0x00, 0x00}; 244 u8 data[2] = {0x00, 0x00};
@@ -255,7 +263,7 @@ int mt9m111_set_hflip(struct gspca_dev *gspca_dev, __s32 val)
255 return err; 263 return err;
256} 264}
257 265
258int mt9m111_get_gain(struct gspca_dev *gspca_dev, __s32 *val) 266static int mt9m111_get_gain(struct gspca_dev *gspca_dev, __s32 *val)
259{ 267{
260 struct sd *sd = (struct sd *) gspca_dev; 268 struct sd *sd = (struct sd *) gspca_dev;
261 s32 *sensor_settings = sd->sensor_priv; 269 s32 *sensor_settings = sd->sensor_priv;
@@ -266,7 +274,7 @@ int mt9m111_get_gain(struct gspca_dev *gspca_dev, __s32 *val)
266 return 0; 274 return 0;
267} 275}
268 276
269int mt9m111_set_gain(struct gspca_dev *gspca_dev, __s32 val) 277static int mt9m111_set_gain(struct gspca_dev *gspca_dev, __s32 val)
270{ 278{
271 int err, tmp; 279 int err, tmp;
272 u8 data[2] = {0x00, 0x00}; 280 u8 data[2] = {0x00, 0x00};
diff --git a/drivers/media/video/gspca/m5602/m5602_mt9m111.h b/drivers/media/video/gspca/m5602/m5602_mt9m111.h
index c198734c807..dbda4a63d83 100644
--- a/drivers/media/video/gspca/m5602/m5602_mt9m111.h
+++ b/drivers/media/video/gspca/m5602/m5602_mt9m111.h
@@ -87,13 +87,6 @@ int mt9m111_probe(struct sd *sd);
87int mt9m111_init(struct sd *sd); 87int mt9m111_init(struct sd *sd);
88void mt9m111_disconnect(struct sd *sd); 88void mt9m111_disconnect(struct sd *sd);
89 89
90int mt9m111_set_vflip(struct gspca_dev *gspca_dev, __s32 val);
91int mt9m111_get_vflip(struct gspca_dev *gspca_dev, __s32 *val);
92int mt9m111_get_hflip(struct gspca_dev *gspca_dev, __s32 *val);
93int mt9m111_set_hflip(struct gspca_dev *gspca_dev, __s32 val);
94int mt9m111_get_gain(struct gspca_dev *gspca_dev, __s32 *val);
95int mt9m111_set_gain(struct gspca_dev *gspca_dev, __s32 val);
96
97const static struct m5602_sensor mt9m111 = { 90const static struct m5602_sensor mt9m111 = {
98 .name = "MT9M111", 91 .name = "MT9M111",
99 92
diff --git a/drivers/media/video/gspca/m5602/m5602_ov9650.c b/drivers/media/video/gspca/m5602/m5602_ov9650.c
index 2107f3cf673..8d830afcedb 100644
--- a/drivers/media/video/gspca/m5602/m5602_ov9650.c
+++ b/drivers/media/video/gspca/m5602/m5602_ov9650.c
@@ -18,6 +18,25 @@
18 18
19#include "m5602_ov9650.h" 19#include "m5602_ov9650.h"
20 20
21static int ov9650_set_exposure(struct gspca_dev *gspca_dev, __s32 val);
22static int ov9650_get_exposure(struct gspca_dev *gspca_dev, __s32 *val);
23static int ov9650_get_gain(struct gspca_dev *gspca_dev, __s32 *val);
24static int ov9650_set_gain(struct gspca_dev *gspca_dev, __s32 val);
25static int ov9650_get_red_balance(struct gspca_dev *gspca_dev, __s32 *val);
26static int ov9650_set_red_balance(struct gspca_dev *gspca_dev, __s32 val);
27static int ov9650_get_blue_balance(struct gspca_dev *gspca_dev, __s32 *val);
28static int ov9650_set_blue_balance(struct gspca_dev *gspca_dev, __s32 val);
29static int ov9650_get_hflip(struct gspca_dev *gspca_dev, __s32 *val);
30static int ov9650_set_hflip(struct gspca_dev *gspca_dev, __s32 val);
31static int ov9650_get_vflip(struct gspca_dev *gspca_dev, __s32 *val);
32static int ov9650_set_vflip(struct gspca_dev *gspca_dev, __s32 val);
33static int ov9650_get_auto_white_balance(struct gspca_dev *gspca_dev,
34 __s32 *val);
35static int ov9650_set_auto_white_balance(struct gspca_dev *gspca_dev,
36 __s32 val);
37static int ov9650_get_auto_gain(struct gspca_dev *gspca_dev, __s32 *val);
38static int ov9650_set_auto_gain(struct gspca_dev *gspca_dev, __s32 val);
39
21/* Vertically and horizontally flips the image if matched, needed for machines 40/* Vertically and horizontally flips the image if matched, needed for machines
22 where the sensor is mounted upside down */ 41 where the sensor is mounted upside down */
23static 42static
@@ -310,7 +329,8 @@ int ov9650_init(struct sd *sd)
310 err = m5602_write_bridge(sd, init_ov9650[i][1], data); 329 err = m5602_write_bridge(sd, init_ov9650[i][1], data);
311 } 330 }
312 331
313 err = ov9650_set_exposure(&sd->gspca_dev, sensor_settings[EXPOSURE_IDX]); 332 err = ov9650_set_exposure(&sd->gspca_dev,
333 sensor_settings[EXPOSURE_IDX]);
314 if (err < 0) 334 if (err < 0)
315 return err; 335 return err;
316 336
@@ -318,11 +338,13 @@ int ov9650_init(struct sd *sd)
318 if (err < 0) 338 if (err < 0)
319 return err; 339 return err;
320 340
321 err = ov9650_set_red_balance(&sd->gspca_dev, sensor_settings[RED_BALANCE_IDX]); 341 err = ov9650_set_red_balance(&sd->gspca_dev,
342 sensor_settings[RED_BALANCE_IDX]);
322 if (err < 0) 343 if (err < 0)
323 return err; 344 return err;
324 345
325 err = ov9650_set_blue_balance(&sd->gspca_dev, sensor_settings[BLUE_BALANCE_IDX]); 346 err = ov9650_set_blue_balance(&sd->gspca_dev,
347 sensor_settings[BLUE_BALANCE_IDX]);
326 if (err < 0) 348 if (err < 0)
327 return err; 349 return err;
328 350
@@ -334,11 +356,13 @@ int ov9650_init(struct sd *sd)
334 if (err < 0) 356 if (err < 0)
335 return err; 357 return err;
336 358
337 err = ov9650_set_auto_white_balance(&sd->gspca_dev, sensor_settings[AUTO_WHITE_BALANCE_IDX]); 359 err = ov9650_set_auto_white_balance(&sd->gspca_dev,
360 sensor_settings[AUTO_WHITE_BALANCE_IDX]);
338 if (err < 0) 361 if (err < 0)
339 return err; 362 return err;
340 363
341 err = ov9650_set_auto_gain(&sd->gspca_dev, sensor_settings[AUTO_GAIN_CTRL_IDX]); 364 err = ov9650_set_auto_gain(&sd->gspca_dev,
365 sensor_settings[AUTO_GAIN_CTRL_IDX]);
342 return err; 366 return err;
343} 367}
344 368
@@ -472,7 +496,7 @@ void ov9650_disconnect(struct sd *sd)
472 kfree(sd->sensor_priv); 496 kfree(sd->sensor_priv);
473} 497}
474 498
475int ov9650_get_exposure(struct gspca_dev *gspca_dev, __s32 *val) 499static int ov9650_get_exposure(struct gspca_dev *gspca_dev, __s32 *val)
476{ 500{
477 struct sd *sd = (struct sd *) gspca_dev; 501 struct sd *sd = (struct sd *) gspca_dev;
478 s32 *sensor_settings = sd->sensor_priv; 502 s32 *sensor_settings = sd->sensor_priv;
@@ -482,7 +506,7 @@ int ov9650_get_exposure(struct gspca_dev *gspca_dev, __s32 *val)
482 return 0; 506 return 0;
483} 507}
484 508
485int ov9650_set_exposure(struct gspca_dev *gspca_dev, __s32 val) 509static int ov9650_set_exposure(struct gspca_dev *gspca_dev, __s32 val)
486{ 510{
487 struct sd *sd = (struct sd *) gspca_dev; 511 struct sd *sd = (struct sd *) gspca_dev;
488 s32 *sensor_settings = sd->sensor_priv; 512 s32 *sensor_settings = sd->sensor_priv;
@@ -512,7 +536,7 @@ int ov9650_set_exposure(struct gspca_dev *gspca_dev, __s32 val)
512 return err; 536 return err;
513} 537}
514 538
515int ov9650_get_gain(struct gspca_dev *gspca_dev, __s32 *val) 539static int ov9650_get_gain(struct gspca_dev *gspca_dev, __s32 *val)
516{ 540{
517 struct sd *sd = (struct sd *) gspca_dev; 541 struct sd *sd = (struct sd *) gspca_dev;
518 s32 *sensor_settings = sd->sensor_priv; 542 s32 *sensor_settings = sd->sensor_priv;
@@ -522,7 +546,7 @@ int ov9650_get_gain(struct gspca_dev *gspca_dev, __s32 *val)
522 return 0; 546 return 0;
523} 547}
524 548
525int ov9650_set_gain(struct gspca_dev *gspca_dev, __s32 val) 549static int ov9650_set_gain(struct gspca_dev *gspca_dev, __s32 val)
526{ 550{
527 int err; 551 int err;
528 u8 i2c_data; 552 u8 i2c_data;
@@ -553,7 +577,7 @@ int ov9650_set_gain(struct gspca_dev *gspca_dev, __s32 val)
553 return err; 577 return err;
554} 578}
555 579
556int ov9650_get_red_balance(struct gspca_dev *gspca_dev, __s32 *val) 580static int ov9650_get_red_balance(struct gspca_dev *gspca_dev, __s32 *val)
557{ 581{
558 struct sd *sd = (struct sd *) gspca_dev; 582 struct sd *sd = (struct sd *) gspca_dev;
559 s32 *sensor_settings = sd->sensor_priv; 583 s32 *sensor_settings = sd->sensor_priv;
@@ -563,7 +587,7 @@ int ov9650_get_red_balance(struct gspca_dev *gspca_dev, __s32 *val)
563 return 0; 587 return 0;
564} 588}
565 589
566int ov9650_set_red_balance(struct gspca_dev *gspca_dev, __s32 val) 590static int ov9650_set_red_balance(struct gspca_dev *gspca_dev, __s32 val)
567{ 591{
568 int err; 592 int err;
569 u8 i2c_data; 593 u8 i2c_data;
@@ -579,7 +603,7 @@ int ov9650_set_red_balance(struct gspca_dev *gspca_dev, __s32 val)
579 return err; 603 return err;
580} 604}
581 605
582int ov9650_get_blue_balance(struct gspca_dev *gspca_dev, __s32 *val) 606static int ov9650_get_blue_balance(struct gspca_dev *gspca_dev, __s32 *val)
583{ 607{
584 struct sd *sd = (struct sd *) gspca_dev; 608 struct sd *sd = (struct sd *) gspca_dev;
585 s32 *sensor_settings = sd->sensor_priv; 609 s32 *sensor_settings = sd->sensor_priv;
@@ -590,7 +614,7 @@ int ov9650_get_blue_balance(struct gspca_dev *gspca_dev, __s32 *val)
590 return 0; 614 return 0;
591} 615}
592 616
593int ov9650_set_blue_balance(struct gspca_dev *gspca_dev, __s32 val) 617static int ov9650_set_blue_balance(struct gspca_dev *gspca_dev, __s32 val)
594{ 618{
595 int err; 619 int err;
596 u8 i2c_data; 620 u8 i2c_data;
@@ -606,7 +630,7 @@ int ov9650_set_blue_balance(struct gspca_dev *gspca_dev, __s32 val)
606 return err; 630 return err;
607} 631}
608 632
609int ov9650_get_hflip(struct gspca_dev *gspca_dev, __s32 *val) 633static int ov9650_get_hflip(struct gspca_dev *gspca_dev, __s32 *val)
610{ 634{
611 struct sd *sd = (struct sd *) gspca_dev; 635 struct sd *sd = (struct sd *) gspca_dev;
612 s32 *sensor_settings = sd->sensor_priv; 636 s32 *sensor_settings = sd->sensor_priv;
@@ -616,7 +640,7 @@ int ov9650_get_hflip(struct gspca_dev *gspca_dev, __s32 *val)
616 return 0; 640 return 0;
617} 641}
618 642
619int ov9650_set_hflip(struct gspca_dev *gspca_dev, __s32 val) 643static int ov9650_set_hflip(struct gspca_dev *gspca_dev, __s32 val)
620{ 644{
621 int err; 645 int err;
622 u8 i2c_data; 646 u8 i2c_data;
@@ -628,16 +652,18 @@ int ov9650_set_hflip(struct gspca_dev *gspca_dev, __s32 val)
628 sensor_settings[HFLIP_IDX] = val; 652 sensor_settings[HFLIP_IDX] = val;
629 653
630 if (!dmi_check_system(ov9650_flip_dmi_table)) 654 if (!dmi_check_system(ov9650_flip_dmi_table))
631 i2c_data = ((val & 0x01) << 5) | (sensor_settings[VFLIP_IDX] << 4); 655 i2c_data = ((val & 0x01) << 5) |
656 (sensor_settings[VFLIP_IDX] << 4);
632 else 657 else
633 i2c_data = ((val & 0x01) << 5) | (!sensor_settings[VFLIP_IDX] << 4); 658 i2c_data = ((val & 0x01) << 5) |
659 (!sensor_settings[VFLIP_IDX] << 4);
634 660
635 err = m5602_write_sensor(sd, OV9650_MVFP, &i2c_data, 1); 661 err = m5602_write_sensor(sd, OV9650_MVFP, &i2c_data, 1);
636 662
637 return err; 663 return err;
638} 664}
639 665
640int ov9650_get_vflip(struct gspca_dev *gspca_dev, __s32 *val) 666static int ov9650_get_vflip(struct gspca_dev *gspca_dev, __s32 *val)
641{ 667{
642 struct sd *sd = (struct sd *) gspca_dev; 668 struct sd *sd = (struct sd *) gspca_dev;
643 s32 *sensor_settings = sd->sensor_priv; 669 s32 *sensor_settings = sd->sensor_priv;
@@ -648,7 +674,7 @@ int ov9650_get_vflip(struct gspca_dev *gspca_dev, __s32 *val)
648 return 0; 674 return 0;
649} 675}
650 676
651int ov9650_set_vflip(struct gspca_dev *gspca_dev, __s32 val) 677static int ov9650_set_vflip(struct gspca_dev *gspca_dev, __s32 val)
652{ 678{
653 int err; 679 int err;
654 u8 i2c_data; 680 u8 i2c_data;
@@ -673,48 +699,8 @@ int ov9650_set_vflip(struct gspca_dev *gspca_dev, __s32 val)
673 return err; 699 return err;
674} 700}
675 701
676int ov9650_get_brightness(struct gspca_dev *gspca_dev, __s32 *val) 702static int ov9650_get_auto_white_balance(struct gspca_dev *gspca_dev,
677{ 703 __s32 *val)
678 struct sd *sd = (struct sd *) gspca_dev;
679 s32 *sensor_settings = sd->sensor_priv;
680
681 *val = sensor_settings[GAIN_IDX];
682 PDEBUG(D_V4L2, "Read gain %d", *val);
683
684 return 0;
685}
686
687int ov9650_set_brightness(struct gspca_dev *gspca_dev, __s32 val)
688{
689 int err;
690 u8 i2c_data;
691 struct sd *sd = (struct sd *) gspca_dev;
692 s32 *sensor_settings = sd->sensor_priv;
693
694 PDEBUG(D_V4L2, "Set gain to %d", val);
695
696 sensor_settings[GAIN_IDX] = val;
697
698 /* Read the OV9650_VREF register first to avoid
699 corrupting the VREF high and low bits */
700 err = m5602_read_sensor(sd, OV9650_VREF, &i2c_data, 1);
701 if (err < 0)
702 return err;
703
704 /* Mask away all uninteresting bits */
705 i2c_data = ((val & 0x0300) >> 2) | (i2c_data & 0x3F);
706 err = m5602_write_sensor(sd, OV9650_VREF, &i2c_data, 1);
707 if (err < 0)
708 return err;
709
710 /* The 8 LSBs */
711 i2c_data = val & 0xff;
712 err = m5602_write_sensor(sd, OV9650_GAIN, &i2c_data, 1);
713
714 return err;
715}
716
717int ov9650_get_auto_white_balance(struct gspca_dev *gspca_dev, __s32 *val)
718{ 704{
719 struct sd *sd = (struct sd *) gspca_dev; 705 struct sd *sd = (struct sd *) gspca_dev;
720 s32 *sensor_settings = sd->sensor_priv; 706 s32 *sensor_settings = sd->sensor_priv;
@@ -723,7 +709,8 @@ int ov9650_get_auto_white_balance(struct gspca_dev *gspca_dev, __s32 *val)
723 return 0; 709 return 0;
724} 710}
725 711
726int ov9650_set_auto_white_balance(struct gspca_dev *gspca_dev, __s32 val) 712static int ov9650_set_auto_white_balance(struct gspca_dev *gspca_dev,
713 __s32 val)
727{ 714{
728 int err; 715 int err;
729 u8 i2c_data; 716 u8 i2c_data;
@@ -743,7 +730,7 @@ int ov9650_set_auto_white_balance(struct gspca_dev *gspca_dev, __s32 val)
743 return err; 730 return err;
744} 731}
745 732
746int ov9650_get_auto_gain(struct gspca_dev *gspca_dev, __s32 *val) 733static int ov9650_get_auto_gain(struct gspca_dev *gspca_dev, __s32 *val)
747{ 734{
748 struct sd *sd = (struct sd *) gspca_dev; 735 struct sd *sd = (struct sd *) gspca_dev;
749 s32 *sensor_settings = sd->sensor_priv; 736 s32 *sensor_settings = sd->sensor_priv;
@@ -753,7 +740,7 @@ int ov9650_get_auto_gain(struct gspca_dev *gspca_dev, __s32 *val)
753 return 0; 740 return 0;
754} 741}
755 742
756int ov9650_set_auto_gain(struct gspca_dev *gspca_dev, __s32 val) 743static int ov9650_set_auto_gain(struct gspca_dev *gspca_dev, __s32 val)
757{ 744{
758 int err; 745 int err;
759 u8 i2c_data; 746 u8 i2c_data;
diff --git a/drivers/media/video/gspca/m5602/m5602_ov9650.h b/drivers/media/video/gspca/m5602/m5602_ov9650.h
index b81f26505e2..e0ba41870a4 100644
--- a/drivers/media/video/gspca/m5602/m5602_ov9650.h
+++ b/drivers/media/video/gspca/m5602/m5602_ov9650.h
@@ -139,25 +139,6 @@ int ov9650_start(struct sd *sd);
139int ov9650_stop(struct sd *sd); 139int ov9650_stop(struct sd *sd);
140void ov9650_disconnect(struct sd *sd); 140void ov9650_disconnect(struct sd *sd);
141 141
142int ov9650_set_exposure(struct gspca_dev *gspca_dev, __s32 val);
143int ov9650_get_exposure(struct gspca_dev *gspca_dev, __s32 *val);
144int ov9650_get_gain(struct gspca_dev *gspca_dev, __s32 *val);
145int ov9650_set_gain(struct gspca_dev *gspca_dev, __s32 val);
146int ov9650_get_red_balance(struct gspca_dev *gspca_dev, __s32 *val);
147int ov9650_set_red_balance(struct gspca_dev *gspca_dev, __s32 val);
148int ov9650_get_blue_balance(struct gspca_dev *gspca_dev, __s32 *val);
149int ov9650_set_blue_balance(struct gspca_dev *gspca_dev, __s32 val);
150int ov9650_get_hflip(struct gspca_dev *gspca_dev, __s32 *val);
151int ov9650_set_hflip(struct gspca_dev *gspca_dev, __s32 val);
152int ov9650_get_vflip(struct gspca_dev *gspca_dev, __s32 *val);
153int ov9650_set_vflip(struct gspca_dev *gspca_dev, __s32 val);
154int ov9650_get_brightness(struct gspca_dev *gspca_dev, __s32 *val);
155int ov9650_set_brightness(struct gspca_dev *gspca_dev, __s32 val);
156int ov9650_get_auto_white_balance(struct gspca_dev *gspca_dev, __s32 *val);
157int ov9650_set_auto_white_balance(struct gspca_dev *gspca_dev, __s32 val);
158int ov9650_get_auto_gain(struct gspca_dev *gspca_dev, __s32 *val);
159int ov9650_set_auto_gain(struct gspca_dev *gspca_dev, __s32 val);
160
161const static struct m5602_sensor ov9650 = { 142const static struct m5602_sensor ov9650 = {
162 .name = "OV9650", 143 .name = "OV9650",
163 .i2c_slave_id = 0x60, 144 .i2c_slave_id = 0x60,
diff --git a/drivers/media/video/gspca/m5602/m5602_po1030.c b/drivers/media/video/gspca/m5602/m5602_po1030.c
index c2bd12eeb5e..79dcf9bfdd5 100644
--- a/drivers/media/video/gspca/m5602/m5602_po1030.c
+++ b/drivers/media/video/gspca/m5602/m5602_po1030.c
@@ -18,6 +18,23 @@
18 18
19#include "m5602_po1030.h" 19#include "m5602_po1030.h"
20 20
21static int po1030_get_exposure(struct gspca_dev *gspca_dev, __s32 *val);
22static int po1030_set_exposure(struct gspca_dev *gspca_dev, __s32 val);
23static int po1030_get_gain(struct gspca_dev *gspca_dev, __s32 *val);
24static int po1030_set_gain(struct gspca_dev *gspca_dev, __s32 val);
25static int po1030_get_red_balance(struct gspca_dev *gspca_dev, __s32 *val);
26static int po1030_set_red_balance(struct gspca_dev *gspca_dev, __s32 val);
27static int po1030_get_blue_balance(struct gspca_dev *gspca_dev, __s32 *val);
28static int po1030_set_blue_balance(struct gspca_dev *gspca_dev, __s32 val);
29static int po1030_get_hflip(struct gspca_dev *gspca_dev, __s32 *val);
30static int po1030_set_hflip(struct gspca_dev *gspca_dev, __s32 val);
31static int po1030_get_vflip(struct gspca_dev *gspca_dev, __s32 *val);
32static int po1030_set_vflip(struct gspca_dev *gspca_dev, __s32 val);
33static int po1030_set_auto_white_balance(struct gspca_dev *gspca_dev,
34 __s32 val);
35static int po1030_get_auto_white_balance(struct gspca_dev *gspca_dev,
36 __s32 *val);
37
21static struct v4l2_pix_format po1030_modes[] = { 38static struct v4l2_pix_format po1030_modes[] = {
22 { 39 {
23 640, 40 640,
@@ -277,7 +294,7 @@ int po1030_start(struct sd *sd)
277 return err; 294 return err;
278} 295}
279 296
280int po1030_get_exposure(struct gspca_dev *gspca_dev, __s32 *val) 297static int po1030_get_exposure(struct gspca_dev *gspca_dev, __s32 *val)
281{ 298{
282 struct sd *sd = (struct sd *) gspca_dev; 299 struct sd *sd = (struct sd *) gspca_dev;
283 s32 *sensor_settings = sd->sensor_priv; 300 s32 *sensor_settings = sd->sensor_priv;
@@ -287,7 +304,7 @@ int po1030_get_exposure(struct gspca_dev *gspca_dev, __s32 *val)
287 return 0; 304 return 0;
288} 305}
289 306
290int po1030_set_exposure(struct gspca_dev *gspca_dev, __s32 val) 307static int po1030_set_exposure(struct gspca_dev *gspca_dev, __s32 val)
291{ 308{
292 struct sd *sd = (struct sd *) gspca_dev; 309 struct sd *sd = (struct sd *) gspca_dev;
293 s32 *sensor_settings = sd->sensor_priv; 310 s32 *sensor_settings = sd->sensor_priv;
@@ -315,7 +332,7 @@ int po1030_set_exposure(struct gspca_dev *gspca_dev, __s32 val)
315 return err; 332 return err;
316} 333}
317 334
318int po1030_get_gain(struct gspca_dev *gspca_dev, __s32 *val) 335static int po1030_get_gain(struct gspca_dev *gspca_dev, __s32 *val)
319{ 336{
320 struct sd *sd = (struct sd *) gspca_dev; 337 struct sd *sd = (struct sd *) gspca_dev;
321 s32 *sensor_settings = sd->sensor_priv; 338 s32 *sensor_settings = sd->sensor_priv;
@@ -325,7 +342,7 @@ int po1030_get_gain(struct gspca_dev *gspca_dev, __s32 *val)
325 return 0; 342 return 0;
326} 343}
327 344
328int po1030_set_gain(struct gspca_dev *gspca_dev, __s32 val) 345static int po1030_set_gain(struct gspca_dev *gspca_dev, __s32 val)
329{ 346{
330 struct sd *sd = (struct sd *) gspca_dev; 347 struct sd *sd = (struct sd *) gspca_dev;
331 s32 *sensor_settings = sd->sensor_priv; 348 s32 *sensor_settings = sd->sensor_priv;
@@ -341,7 +358,7 @@ int po1030_set_gain(struct gspca_dev *gspca_dev, __s32 val)
341 return err; 358 return err;
342} 359}
343 360
344int po1030_get_hflip(struct gspca_dev *gspca_dev, __s32 *val) 361static int po1030_get_hflip(struct gspca_dev *gspca_dev, __s32 *val)
345{ 362{
346 struct sd *sd = (struct sd *) gspca_dev; 363 struct sd *sd = (struct sd *) gspca_dev;
347 s32 *sensor_settings = sd->sensor_priv; 364 s32 *sensor_settings = sd->sensor_priv;
@@ -352,7 +369,7 @@ int po1030_get_hflip(struct gspca_dev *gspca_dev, __s32 *val)
352 return 0; 369 return 0;
353} 370}
354 371
355int po1030_set_hflip(struct gspca_dev *gspca_dev, __s32 val) 372static int po1030_set_hflip(struct gspca_dev *gspca_dev, __s32 val)
356{ 373{
357 struct sd *sd = (struct sd *) gspca_dev; 374 struct sd *sd = (struct sd *) gspca_dev;
358 s32 *sensor_settings = sd->sensor_priv; 375 s32 *sensor_settings = sd->sensor_priv;
@@ -374,7 +391,7 @@ int po1030_set_hflip(struct gspca_dev *gspca_dev, __s32 val)
374 return err; 391 return err;
375} 392}
376 393
377int po1030_get_vflip(struct gspca_dev *gspca_dev, __s32 *val) 394static int po1030_get_vflip(struct gspca_dev *gspca_dev, __s32 *val)
378{ 395{
379 struct sd *sd = (struct sd *) gspca_dev; 396 struct sd *sd = (struct sd *) gspca_dev;
380 s32 *sensor_settings = sd->sensor_priv; 397 s32 *sensor_settings = sd->sensor_priv;
@@ -385,7 +402,7 @@ int po1030_get_vflip(struct gspca_dev *gspca_dev, __s32 *val)
385 return 0; 402 return 0;
386} 403}
387 404
388int po1030_set_vflip(struct gspca_dev *gspca_dev, __s32 val) 405static int po1030_set_vflip(struct gspca_dev *gspca_dev, __s32 val)
389{ 406{
390 struct sd *sd = (struct sd *) gspca_dev; 407 struct sd *sd = (struct sd *) gspca_dev;
391 s32 *sensor_settings = sd->sensor_priv; 408 s32 *sensor_settings = sd->sensor_priv;
@@ -407,7 +424,7 @@ int po1030_set_vflip(struct gspca_dev *gspca_dev, __s32 val)
407 return err; 424 return err;
408} 425}
409 426
410int po1030_get_red_balance(struct gspca_dev *gspca_dev, __s32 *val) 427static int po1030_get_red_balance(struct gspca_dev *gspca_dev, __s32 *val)
411{ 428{
412 struct sd *sd = (struct sd *) gspca_dev; 429 struct sd *sd = (struct sd *) gspca_dev;
413 s32 *sensor_settings = sd->sensor_priv; 430 s32 *sensor_settings = sd->sensor_priv;
@@ -417,7 +434,7 @@ int po1030_get_red_balance(struct gspca_dev *gspca_dev, __s32 *val)
417 return 0; 434 return 0;
418} 435}
419 436
420int po1030_set_red_balance(struct gspca_dev *gspca_dev, __s32 val) 437static int po1030_set_red_balance(struct gspca_dev *gspca_dev, __s32 val)
421{ 438{
422 struct sd *sd = (struct sd *) gspca_dev; 439 struct sd *sd = (struct sd *) gspca_dev;
423 s32 *sensor_settings = sd->sensor_priv; 440 s32 *sensor_settings = sd->sensor_priv;
@@ -433,7 +450,7 @@ int po1030_set_red_balance(struct gspca_dev *gspca_dev, __s32 val)
433 return err; 450 return err;
434} 451}
435 452
436int po1030_get_blue_balance(struct gspca_dev *gspca_dev, __s32 *val) 453static int po1030_get_blue_balance(struct gspca_dev *gspca_dev, __s32 *val)
437{ 454{
438 struct sd *sd = (struct sd *) gspca_dev; 455 struct sd *sd = (struct sd *) gspca_dev;
439 s32 *sensor_settings = sd->sensor_priv; 456 s32 *sensor_settings = sd->sensor_priv;
@@ -444,7 +461,7 @@ int po1030_get_blue_balance(struct gspca_dev *gspca_dev, __s32 *val)
444 return 0; 461 return 0;
445} 462}
446 463
447int po1030_set_blue_balance(struct gspca_dev *gspca_dev, __s32 val) 464static int po1030_set_blue_balance(struct gspca_dev *gspca_dev, __s32 val)
448{ 465{
449 struct sd *sd = (struct sd *) gspca_dev; 466 struct sd *sd = (struct sd *) gspca_dev;
450 s32 *sensor_settings = sd->sensor_priv; 467 s32 *sensor_settings = sd->sensor_priv;
@@ -461,7 +478,8 @@ int po1030_set_blue_balance(struct gspca_dev *gspca_dev, __s32 val)
461 return err; 478 return err;
462} 479}
463 480
464int po1030_get_auto_white_balance(struct gspca_dev *gspca_dev, __s32 *val) 481static int po1030_get_auto_white_balance(struct gspca_dev *gspca_dev,
482 __s32 *val)
465{ 483{
466 struct sd *sd = (struct sd *) gspca_dev; 484 struct sd *sd = (struct sd *) gspca_dev;
467 s32 *sensor_settings = sd->sensor_priv; 485 s32 *sensor_settings = sd->sensor_priv;
@@ -472,7 +490,8 @@ int po1030_get_auto_white_balance(struct gspca_dev *gspca_dev, __s32 *val)
472 return 0; 490 return 0;
473} 491}
474 492
475int po1030_set_auto_white_balance(struct gspca_dev *gspca_dev, __s32 val) 493static int po1030_set_auto_white_balance(struct gspca_dev *gspca_dev,
494 __s32 val)
476{ 495{
477 struct sd *sd = (struct sd *) gspca_dev; 496 struct sd *sd = (struct sd *) gspca_dev;
478 s32 *sensor_settings = sd->sensor_priv; 497 s32 *sensor_settings = sd->sensor_priv;
diff --git a/drivers/media/video/gspca/m5602/m5602_po1030.h b/drivers/media/video/gspca/m5602/m5602_po1030.h
index 9ccf89e5914..5ba3f73b787 100644
--- a/drivers/media/video/gspca/m5602/m5602_po1030.h
+++ b/drivers/media/video/gspca/m5602/m5602_po1030.h
@@ -151,21 +151,6 @@ int po1030_init(struct sd *sd);
151int po1030_start(struct sd *sd); 151int po1030_start(struct sd *sd);
152void po1030_disconnect(struct sd *sd); 152void po1030_disconnect(struct sd *sd);
153 153
154int po1030_get_exposure(struct gspca_dev *gspca_dev, __s32 *val);
155int po1030_set_exposure(struct gspca_dev *gspca_dev, __s32 val);
156int po1030_get_gain(struct gspca_dev *gspca_dev, __s32 *val);
157int po1030_set_gain(struct gspca_dev *gspca_dev, __s32 val);
158int po1030_get_red_balance(struct gspca_dev *gspca_dev, __s32 *val);
159int po1030_set_red_balance(struct gspca_dev *gspca_dev, __s32 val);
160int po1030_get_blue_balance(struct gspca_dev *gspca_dev, __s32 *val);
161int po1030_set_blue_balance(struct gspca_dev *gspca_dev, __s32 val);
162int po1030_get_hflip(struct gspca_dev *gspca_dev, __s32 *val);
163int po1030_set_hflip(struct gspca_dev *gspca_dev, __s32 val);
164int po1030_get_vflip(struct gspca_dev *gspca_dev, __s32 *val);
165int po1030_set_vflip(struct gspca_dev *gspca_dev, __s32 val);
166int po1030_set_auto_white_balance(struct gspca_dev *gspca_dev, __s32 val);
167int po1030_get_auto_white_balance(struct gspca_dev *gspca_dev, __s32 *val);
168
169static const struct m5602_sensor po1030 = { 154static const struct m5602_sensor po1030 = {
170 .name = "PO1030", 155 .name = "PO1030",
171 156
diff --git a/drivers/media/video/gspca/m5602/m5602_s5k4aa.c b/drivers/media/video/gspca/m5602/m5602_s5k4aa.c
index fe574ef24c9..1ec5ac08d4f 100644
--- a/drivers/media/video/gspca/m5602/m5602_s5k4aa.c
+++ b/drivers/media/video/gspca/m5602/m5602_s5k4aa.c
@@ -18,6 +18,15 @@
18 18
19#include "m5602_s5k4aa.h" 19#include "m5602_s5k4aa.h"
20 20
21static int s5k4aa_get_exposure(struct gspca_dev *gspca_dev, __s32 *val);
22static int s5k4aa_set_exposure(struct gspca_dev *gspca_dev, __s32 val);
23static int s5k4aa_get_vflip(struct gspca_dev *gspca_dev, __s32 *val);
24static int s5k4aa_set_vflip(struct gspca_dev *gspca_dev, __s32 val);
25static int s5k4aa_get_hflip(struct gspca_dev *gspca_dev, __s32 *val);
26static int s5k4aa_set_hflip(struct gspca_dev *gspca_dev, __s32 val);
27static int s5k4aa_get_gain(struct gspca_dev *gspca_dev, __s32 *val);
28static int s5k4aa_set_gain(struct gspca_dev *gspca_dev, __s32 val);
29
21static 30static
22 const 31 const
23 struct dmi_system_id s5k4aa_vflip_dmi_table[] = { 32 struct dmi_system_id s5k4aa_vflip_dmi_table[] = {
@@ -304,7 +313,7 @@ int s5k4aa_init(struct sd *sd)
304 return err; 313 return err;
305} 314}
306 315
307int s5k4aa_get_exposure(struct gspca_dev *gspca_dev, __s32 *val) 316static int s5k4aa_get_exposure(struct gspca_dev *gspca_dev, __s32 *val)
308{ 317{
309 struct sd *sd = (struct sd *) gspca_dev; 318 struct sd *sd = (struct sd *) gspca_dev;
310 s32 *sensor_settings = sd->sensor_priv; 319 s32 *sensor_settings = sd->sensor_priv;
@@ -315,7 +324,7 @@ int s5k4aa_get_exposure(struct gspca_dev *gspca_dev, __s32 *val)
315 return 0; 324 return 0;
316} 325}
317 326
318int s5k4aa_set_exposure(struct gspca_dev *gspca_dev, __s32 val) 327static int s5k4aa_set_exposure(struct gspca_dev *gspca_dev, __s32 val)
319{ 328{
320 struct sd *sd = (struct sd *) gspca_dev; 329 struct sd *sd = (struct sd *) gspca_dev;
321 s32 *sensor_settings = sd->sensor_priv; 330 s32 *sensor_settings = sd->sensor_priv;
@@ -337,7 +346,7 @@ int s5k4aa_set_exposure(struct gspca_dev *gspca_dev, __s32 val)
337 return err; 346 return err;
338} 347}
339 348
340int s5k4aa_get_vflip(struct gspca_dev *gspca_dev, __s32 *val) 349static int s5k4aa_get_vflip(struct gspca_dev *gspca_dev, __s32 *val)
341{ 350{
342 struct sd *sd = (struct sd *) gspca_dev; 351 struct sd *sd = (struct sd *) gspca_dev;
343 s32 *sensor_settings = sd->sensor_priv; 352 s32 *sensor_settings = sd->sensor_priv;
@@ -348,7 +357,7 @@ int s5k4aa_get_vflip(struct gspca_dev *gspca_dev, __s32 *val)
348 return 0; 357 return 0;
349} 358}
350 359
351int s5k4aa_set_vflip(struct gspca_dev *gspca_dev, __s32 val) 360static int s5k4aa_set_vflip(struct gspca_dev *gspca_dev, __s32 val)
352{ 361{
353 struct sd *sd = (struct sd *) gspca_dev; 362 struct sd *sd = (struct sd *) gspca_dev;
354 s32 *sensor_settings = sd->sensor_priv; 363 s32 *sensor_settings = sd->sensor_priv;
@@ -396,7 +405,7 @@ int s5k4aa_set_vflip(struct gspca_dev *gspca_dev, __s32 val)
396 return err; 405 return err;
397} 406}
398 407
399int s5k4aa_get_hflip(struct gspca_dev *gspca_dev, __s32 *val) 408static int s5k4aa_get_hflip(struct gspca_dev *gspca_dev, __s32 *val)
400{ 409{
401 struct sd *sd = (struct sd *) gspca_dev; 410 struct sd *sd = (struct sd *) gspca_dev;
402 s32 *sensor_settings = sd->sensor_priv; 411 s32 *sensor_settings = sd->sensor_priv;
@@ -407,7 +416,7 @@ int s5k4aa_get_hflip(struct gspca_dev *gspca_dev, __s32 *val)
407 return 0; 416 return 0;
408} 417}
409 418
410int s5k4aa_set_hflip(struct gspca_dev *gspca_dev, __s32 val) 419static int s5k4aa_set_hflip(struct gspca_dev *gspca_dev, __s32 val)
411{ 420{
412 struct sd *sd = (struct sd *) gspca_dev; 421 struct sd *sd = (struct sd *) gspca_dev;
413 s32 *sensor_settings = sd->sensor_priv; 422 s32 *sensor_settings = sd->sensor_priv;
@@ -448,7 +457,7 @@ int s5k4aa_set_hflip(struct gspca_dev *gspca_dev, __s32 val)
448 return err; 457 return err;
449} 458}
450 459
451int s5k4aa_get_gain(struct gspca_dev *gspca_dev, __s32 *val) 460static int s5k4aa_get_gain(struct gspca_dev *gspca_dev, __s32 *val)
452{ 461{
453 struct sd *sd = (struct sd *) gspca_dev; 462 struct sd *sd = (struct sd *) gspca_dev;
454 s32 *sensor_settings = sd->sensor_priv; 463 s32 *sensor_settings = sd->sensor_priv;
@@ -458,7 +467,7 @@ int s5k4aa_get_gain(struct gspca_dev *gspca_dev, __s32 *val)
458 return 0; 467 return 0;
459} 468}
460 469
461int s5k4aa_set_gain(struct gspca_dev *gspca_dev, __s32 val) 470static int s5k4aa_set_gain(struct gspca_dev *gspca_dev, __s32 val)
462{ 471{
463 struct sd *sd = (struct sd *) gspca_dev; 472 struct sd *sd = (struct sd *) gspca_dev;
464 s32 *sensor_settings = sd->sensor_priv; 473 s32 *sensor_settings = sd->sensor_priv;
diff --git a/drivers/media/video/gspca/m5602/m5602_s5k4aa.h b/drivers/media/video/gspca/m5602/m5602_s5k4aa.h
index 9ffcb5d1a13..7a8da1dc443 100644
--- a/drivers/media/video/gspca/m5602/m5602_s5k4aa.h
+++ b/drivers/media/video/gspca/m5602/m5602_s5k4aa.h
@@ -68,15 +68,6 @@ int s5k4aa_init(struct sd *sd);
68int s5k4aa_start(struct sd *sd); 68int s5k4aa_start(struct sd *sd);
69void s5k4aa_disconnect(struct sd *sd); 69void s5k4aa_disconnect(struct sd *sd);
70 70
71int s5k4aa_get_exposure(struct gspca_dev *gspca_dev, __s32 *val);
72int s5k4aa_set_exposure(struct gspca_dev *gspca_dev, __s32 val);
73int s5k4aa_get_vflip(struct gspca_dev *gspca_dev, __s32 *val);
74int s5k4aa_set_vflip(struct gspca_dev *gspca_dev, __s32 val);
75int s5k4aa_get_hflip(struct gspca_dev *gspca_dev, __s32 *val);
76int s5k4aa_set_hflip(struct gspca_dev *gspca_dev, __s32 val);
77int s5k4aa_get_gain(struct gspca_dev *gspca_dev, __s32 *val);
78int s5k4aa_set_gain(struct gspca_dev *gspca_dev, __s32 val);
79
80static const struct m5602_sensor s5k4aa = { 71static const struct m5602_sensor s5k4aa = {
81 .name = "S5K4AA", 72 .name = "S5K4AA",
82 .i2c_slave_id = 0x5a, 73 .i2c_slave_id = 0x5a,
diff --git a/drivers/media/video/gspca/m5602/m5602_s5k83a.c b/drivers/media/video/gspca/m5602/m5602_s5k83a.c
index b43a3b04a82..8d54535724f 100644
--- a/drivers/media/video/gspca/m5602/m5602_s5k83a.c
+++ b/drivers/media/video/gspca/m5602/m5602_s5k83a.c
@@ -19,6 +19,17 @@
19#include <linux/kthread.h> 19#include <linux/kthread.h>
20#include "m5602_s5k83a.h" 20#include "m5602_s5k83a.h"
21 21
22static int s5k83a_set_gain(struct gspca_dev *gspca_dev, __s32 val);
23static int s5k83a_get_gain(struct gspca_dev *gspca_dev, __s32 *val);
24static int s5k83a_set_brightness(struct gspca_dev *gspca_dev, __s32 val);
25static int s5k83a_get_brightness(struct gspca_dev *gspca_dev, __s32 *val);
26static int s5k83a_set_exposure(struct gspca_dev *gspca_dev, __s32 val);
27static int s5k83a_get_exposure(struct gspca_dev *gspca_dev, __s32 *val);
28static int s5k83a_get_vflip(struct gspca_dev *gspca_dev, __s32 *val);
29static int s5k83a_set_vflip(struct gspca_dev *gspca_dev, __s32 val);
30static int s5k83a_get_hflip(struct gspca_dev *gspca_dev, __s32 *val);
31static int s5k83a_set_hflip(struct gspca_dev *gspca_dev, __s32 val);
32
22static struct v4l2_pix_format s5k83a_modes[] = { 33static struct v4l2_pix_format s5k83a_modes[] = {
23 { 34 {
24 640, 35 640,
@@ -298,7 +309,7 @@ void s5k83a_disconnect(struct sd *sd)
298 kfree(sens_priv); 309 kfree(sens_priv);
299} 310}
300 311
301int s5k83a_get_gain(struct gspca_dev *gspca_dev, __s32 *val) 312static int s5k83a_get_gain(struct gspca_dev *gspca_dev, __s32 *val)
302{ 313{
303 struct sd *sd = (struct sd *) gspca_dev; 314 struct sd *sd = (struct sd *) gspca_dev;
304 struct s5k83a_priv *sens_priv = sd->sensor_priv; 315 struct s5k83a_priv *sens_priv = sd->sensor_priv;
@@ -307,7 +318,7 @@ int s5k83a_get_gain(struct gspca_dev *gspca_dev, __s32 *val)
307 return 0; 318 return 0;
308} 319}
309 320
310int s5k83a_set_gain(struct gspca_dev *gspca_dev, __s32 val) 321static int s5k83a_set_gain(struct gspca_dev *gspca_dev, __s32 val)
311{ 322{
312 int err; 323 int err;
313 u8 data[2]; 324 u8 data[2];
@@ -337,7 +348,7 @@ int s5k83a_set_gain(struct gspca_dev *gspca_dev, __s32 val)
337 return err; 348 return err;
338} 349}
339 350
340int s5k83a_get_brightness(struct gspca_dev *gspca_dev, __s32 *val) 351static int s5k83a_get_brightness(struct gspca_dev *gspca_dev, __s32 *val)
341{ 352{
342 struct sd *sd = (struct sd *) gspca_dev; 353 struct sd *sd = (struct sd *) gspca_dev;
343 struct s5k83a_priv *sens_priv = sd->sensor_priv; 354 struct s5k83a_priv *sens_priv = sd->sensor_priv;
@@ -346,7 +357,7 @@ int s5k83a_get_brightness(struct gspca_dev *gspca_dev, __s32 *val)
346 return 0; 357 return 0;
347} 358}
348 359
349int s5k83a_set_brightness(struct gspca_dev *gspca_dev, __s32 val) 360static int s5k83a_set_brightness(struct gspca_dev *gspca_dev, __s32 val)
350{ 361{
351 int err; 362 int err;
352 u8 data[1]; 363 u8 data[1];
@@ -359,7 +370,7 @@ int s5k83a_set_brightness(struct gspca_dev *gspca_dev, __s32 val)
359 return err; 370 return err;
360} 371}
361 372
362int s5k83a_get_exposure(struct gspca_dev *gspca_dev, __s32 *val) 373static int s5k83a_get_exposure(struct gspca_dev *gspca_dev, __s32 *val)
363{ 374{
364 struct sd *sd = (struct sd *) gspca_dev; 375 struct sd *sd = (struct sd *) gspca_dev;
365 struct s5k83a_priv *sens_priv = sd->sensor_priv; 376 struct s5k83a_priv *sens_priv = sd->sensor_priv;
@@ -368,7 +379,7 @@ int s5k83a_get_exposure(struct gspca_dev *gspca_dev, __s32 *val)
368 return 0; 379 return 0;
369} 380}
370 381
371int s5k83a_set_exposure(struct gspca_dev *gspca_dev, __s32 val) 382static int s5k83a_set_exposure(struct gspca_dev *gspca_dev, __s32 val)
372{ 383{
373 int err; 384 int err;
374 u8 data[2]; 385 u8 data[2];
@@ -382,7 +393,7 @@ int s5k83a_set_exposure(struct gspca_dev *gspca_dev, __s32 val)
382 return err; 393 return err;
383} 394}
384 395
385int s5k83a_get_vflip(struct gspca_dev *gspca_dev, __s32 *val) 396static int s5k83a_get_vflip(struct gspca_dev *gspca_dev, __s32 *val)
386{ 397{
387 struct sd *sd = (struct sd *) gspca_dev; 398 struct sd *sd = (struct sd *) gspca_dev;
388 struct s5k83a_priv *sens_priv = sd->sensor_priv; 399 struct s5k83a_priv *sens_priv = sd->sensor_priv;
@@ -421,7 +432,7 @@ int s5k83a_set_flip_real(struct gspca_dev *gspca_dev, __s32 vflip, __s32 hflip)
421 return err; 432 return err;
422} 433}
423 434
424int s5k83a_set_vflip(struct gspca_dev *gspca_dev, __s32 val) 435static int s5k83a_set_vflip(struct gspca_dev *gspca_dev, __s32 val)
425{ 436{
426 int err; 437 int err;
427 u8 reg; 438 u8 reg;
@@ -445,7 +456,7 @@ int s5k83a_set_vflip(struct gspca_dev *gspca_dev, __s32 val)
445 return err; 456 return err;
446} 457}
447 458
448int s5k83a_get_hflip(struct gspca_dev *gspca_dev, __s32 *val) 459static int s5k83a_get_hflip(struct gspca_dev *gspca_dev, __s32 *val)
449{ 460{
450 struct sd *sd = (struct sd *) gspca_dev; 461 struct sd *sd = (struct sd *) gspca_dev;
451 struct s5k83a_priv *sens_priv = sd->sensor_priv; 462 struct s5k83a_priv *sens_priv = sd->sensor_priv;
@@ -454,7 +465,7 @@ int s5k83a_get_hflip(struct gspca_dev *gspca_dev, __s32 *val)
454 return 0; 465 return 0;
455} 466}
456 467
457int s5k83a_set_hflip(struct gspca_dev *gspca_dev, __s32 val) 468static int s5k83a_set_hflip(struct gspca_dev *gspca_dev, __s32 val)
458{ 469{
459 int err; 470 int err;
460 u8 reg; 471 u8 reg;
diff --git a/drivers/media/video/gspca/m5602/m5602_s5k83a.h b/drivers/media/video/gspca/m5602/m5602_s5k83a.h
index 02a5e25598c..e939385322a 100644
--- a/drivers/media/video/gspca/m5602/m5602_s5k83a.h
+++ b/drivers/media/video/gspca/m5602/m5602_s5k83a.h
@@ -49,17 +49,6 @@ int s5k83a_start(struct sd *sd);
49int s5k83a_stop(struct sd *sd); 49int s5k83a_stop(struct sd *sd);
50void s5k83a_disconnect(struct sd *sd); 50void s5k83a_disconnect(struct sd *sd);
51 51
52int s5k83a_set_gain(struct gspca_dev *gspca_dev, __s32 val);
53int s5k83a_get_gain(struct gspca_dev *gspca_dev, __s32 *val);
54int s5k83a_set_brightness(struct gspca_dev *gspca_dev, __s32 val);
55int s5k83a_get_brightness(struct gspca_dev *gspca_dev, __s32 *val);
56int s5k83a_set_exposure(struct gspca_dev *gspca_dev, __s32 val);
57int s5k83a_get_exposure(struct gspca_dev *gspca_dev, __s32 *val);
58int s5k83a_get_vflip(struct gspca_dev *gspca_dev, __s32 *val);
59int s5k83a_set_vflip(struct gspca_dev *gspca_dev, __s32 val);
60int s5k83a_get_hflip(struct gspca_dev *gspca_dev, __s32 *val);
61int s5k83a_set_hflip(struct gspca_dev *gspca_dev, __s32 val);
62
63static const struct m5602_sensor s5k83a = { 52static const struct m5602_sensor s5k83a = {
64 .name = "S5K83A", 53 .name = "S5K83A",
65 .probe = s5k83a_probe, 54 .probe = s5k83a_probe,