aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video
diff options
context:
space:
mode:
authorJean-Francois Moine <moinejf@free.fr>2008-12-08 03:17:32 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-12-30 06:38:58 -0500
commit34e21c34c621821a44bd49f3e889bc17fadfbfa7 (patch)
treef485d346889a6da1c67fde5a7e7ba2bfecfa86cb /drivers/media/video
parent7dc7ad38f4f375c21ef5e05461639061e6483c73 (diff)
V4L/DVB (9867): gspca - vc032x: Remove the autogain control.
This control was not coded. Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video')
-rw-r--r--drivers/media/video/gspca/vc032x.c47
1 files changed, 3 insertions, 44 deletions
diff --git a/drivers/media/video/gspca/vc032x.c b/drivers/media/video/gspca/vc032x.c
index 0c93a753a0a..9ac66c9b558 100644
--- a/drivers/media/video/gspca/vc032x.c
+++ b/drivers/media/video/gspca/vc032x.c
@@ -32,7 +32,6 @@ MODULE_LICENSE("GPL");
32struct sd { 32struct sd {
33 struct gspca_dev gspca_dev; /* !! must be the first item */ 33 struct gspca_dev gspca_dev; /* !! must be the first item */
34 34
35 __u8 autogain;
36 __u8 hflip; 35 __u8 hflip;
37 __u8 vflip; 36 __u8 vflip;
38 __u8 lightfreq; 37 __u8 lightfreq;
@@ -52,8 +51,6 @@ struct sd {
52}; 51};
53 52
54/* V4L2 controls supported by the driver */ 53/* V4L2 controls supported by the driver */
55static int sd_setautogain(struct gspca_dev *gspca_dev, __s32 val);
56static int sd_getautogain(struct gspca_dev *gspca_dev, __s32 *val);
57static int sd_sethflip(struct gspca_dev *gspca_dev, __s32 val); 54static int sd_sethflip(struct gspca_dev *gspca_dev, __s32 val);
58static int sd_gethflip(struct gspca_dev *gspca_dev, __s32 *val); 55static int sd_gethflip(struct gspca_dev *gspca_dev, __s32 *val);
59static int sd_setvflip(struct gspca_dev *gspca_dev, __s32 val); 56static int sd_setvflip(struct gspca_dev *gspca_dev, __s32 val);
@@ -62,22 +59,8 @@ static int sd_setfreq(struct gspca_dev *gspca_dev, __s32 val);
62static int sd_getfreq(struct gspca_dev *gspca_dev, __s32 *val); 59static int sd_getfreq(struct gspca_dev *gspca_dev, __s32 *val);
63 60
64static struct ctrl sd_ctrls[] = { 61static struct ctrl sd_ctrls[] = {
65 {
66 {
67 .id = V4L2_CID_AUTOGAIN,
68 .type = V4L2_CTRL_TYPE_BOOLEAN,
69 .name = "Auto Gain",
70 .minimum = 0,
71 .maximum = 1,
72 .step = 1,
73#define AUTOGAIN_DEF 1
74 .default_value = AUTOGAIN_DEF,
75 },
76 .set = sd_setautogain,
77 .get = sd_getautogain,
78 },
79/* next 2 controls work with ov7660 and ov7670 only */ 62/* next 2 controls work with ov7660 and ov7670 only */
80#define HFLIP_IDX 1 63#define HFLIP_IDX 0
81 { 64 {
82 { 65 {
83 .id = V4L2_CID_HFLIP, 66 .id = V4L2_CID_HFLIP,
@@ -92,7 +75,7 @@ static struct ctrl sd_ctrls[] = {
92 .set = sd_sethflip, 75 .set = sd_sethflip,
93 .get = sd_gethflip, 76 .get = sd_gethflip,
94 }, 77 },
95#define VFLIP_IDX 2 78#define VFLIP_IDX 1
96 { 79 {
97 { 80 {
98 .id = V4L2_CID_VFLIP, 81 .id = V4L2_CID_VFLIP,
@@ -107,7 +90,7 @@ static struct ctrl sd_ctrls[] = {
107 .set = sd_setvflip, 90 .set = sd_setvflip,
108 .get = sd_getvflip, 91 .get = sd_getvflip,
109 }, 92 },
110#define LIGHTFREQ_IDX 3 93#define LIGHTFREQ_IDX 2
111 { 94 {
112 { 95 {
113 .id = V4L2_CID_POWER_LINE_FREQUENCY, 96 .id = V4L2_CID_POWER_LINE_FREQUENCY,
@@ -1747,7 +1730,6 @@ static int sd_config(struct gspca_dev *gspca_dev,
1747 sd->hflip = 1; 1730 sd->hflip = 1;
1748 sd->vflip = 1; 1731 sd->vflip = 1;
1749 } 1732 }
1750 sd->autogain = AUTOGAIN_DEF;
1751 sd->lightfreq = FREQ_DEF; 1733 sd->lightfreq = FREQ_DEF;
1752 if (sd->sensor != SENSOR_OV7670) 1734 if (sd->sensor != SENSOR_OV7670)
1753 gspca_dev->ctrl_dis = (1 << LIGHTFREQ_IDX); 1735 gspca_dev->ctrl_dis = (1 << LIGHTFREQ_IDX);
@@ -1802,10 +1784,6 @@ static void sethvflip(struct gspca_dev *gspca_dev)
1802 i2c_write(gspca_dev, OV7660_REG_MVFP, &data, 1); 1784 i2c_write(gspca_dev, OV7660_REG_MVFP, &data, 1);
1803} 1785}
1804 1786
1805static void setautogain(struct gspca_dev *gspca_dev)
1806{
1807}
1808
1809static void setlightfreq(struct gspca_dev *gspca_dev) 1787static void setlightfreq(struct gspca_dev *gspca_dev)
1810{ 1788{
1811 struct sd *sd = (struct sd *) gspca_dev; 1789 struct sd *sd = (struct sd *) gspca_dev;
@@ -1946,7 +1924,6 @@ static int sd_start(struct gspca_dev *gspca_dev)
1946 msleep(100); 1924 msleep(100);
1947 setquality(gspca_dev); 1925 setquality(gspca_dev);
1948 sethvflip(gspca_dev); 1926 sethvflip(gspca_dev);
1949 setautogain(gspca_dev);
1950 setlightfreq(gspca_dev); 1927 setlightfreq(gspca_dev);
1951 } 1928 }
1952 return 0; 1929 return 0;
@@ -1996,24 +1973,6 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev,
1996 gspca_frame_add(gspca_dev, INTER_PACKET, frame, data, len); 1973 gspca_frame_add(gspca_dev, INTER_PACKET, frame, data, len);
1997} 1974}
1998 1975
1999static int sd_setautogain(struct gspca_dev *gspca_dev, __s32 val)
2000{
2001 struct sd *sd = (struct sd *) gspca_dev;
2002
2003 sd->autogain = val;
2004 if (gspca_dev->streaming)
2005 setautogain(gspca_dev);
2006 return 0;
2007}
2008
2009static int sd_getautogain(struct gspca_dev *gspca_dev, __s32 *val)
2010{
2011 struct sd *sd = (struct sd *) gspca_dev;
2012
2013 *val = sd->autogain;
2014 return 0;
2015}
2016
2017static int sd_sethflip(struct gspca_dev *gspca_dev, __s32 val) 1976static int sd_sethflip(struct gspca_dev *gspca_dev, __s32 val)
2018{ 1977{
2019 struct sd *sd = (struct sd *) gspca_dev; 1978 struct sd *sd = (struct sd *) gspca_dev;