diff options
-rw-r--r-- | drivers/media/video/gspca/ov519.c | 82 | ||||
-rw-r--r-- | drivers/media/video/gspca/w996Xcf.c | 2 |
2 files changed, 42 insertions, 42 deletions
diff --git a/drivers/media/video/gspca/ov519.c b/drivers/media/video/gspca/ov519.c index ed70229b0276..8355c63ad55b 100644 --- a/drivers/media/video/gspca/ov519.c +++ b/drivers/media/video/gspca/ov519.c | |||
@@ -75,7 +75,7 @@ struct sd { | |||
75 | 75 | ||
76 | struct gspca_ctrl ctrls[NCTRL]; | 76 | struct gspca_ctrl ctrls[NCTRL]; |
77 | 77 | ||
78 | __u8 packet_nr; | 78 | u8 packet_nr; |
79 | 79 | ||
80 | char bridge; | 80 | char bridge; |
81 | #define BRIDGE_OV511 0 | 81 | #define BRIDGE_OV511 0 |
@@ -94,20 +94,20 @@ struct sd { | |||
94 | char snapshot_needs_reset; | 94 | char snapshot_needs_reset; |
95 | 95 | ||
96 | /* Determined by sensor type */ | 96 | /* Determined by sensor type */ |
97 | __u8 sif; | 97 | u8 sif; |
98 | 98 | ||
99 | __u8 quality; | 99 | u8 quality; |
100 | #define QUALITY_MIN 50 | 100 | #define QUALITY_MIN 50 |
101 | #define QUALITY_MAX 70 | 101 | #define QUALITY_MAX 70 |
102 | #define QUALITY_DEF 50 | 102 | #define QUALITY_DEF 50 |
103 | 103 | ||
104 | __u8 stopped; /* Streaming is temporarily paused */ | 104 | u8 stopped; /* Streaming is temporarily paused */ |
105 | __u8 first_frame; | 105 | u8 first_frame; |
106 | 106 | ||
107 | __u8 frame_rate; /* current Framerate */ | 107 | u8 frame_rate; /* current Framerate */ |
108 | __u8 clockdiv; /* clockdiv override */ | 108 | u8 clockdiv; /* clockdiv override */ |
109 | 109 | ||
110 | char sensor; /* Type of image sensor chip (SEN_*) */ | 110 | u8 sensor; /* Type of image sensor chip (SEN_*) */ |
111 | #define SEN_UNKNOWN 0 | 111 | #define SEN_UNKNOWN 0 |
112 | #define SEN_OV2610 1 | 112 | #define SEN_OV2610 1 |
113 | #define SEN_OV3610 2 | 113 | #define SEN_OV3610 2 |
@@ -594,12 +594,12 @@ static const struct v4l2_pix_format ovfx2_ov3610_mode[] = { | |||
594 | #define OV7670_REG_BD60MAX 0xab /* 60hz banding step limit */ | 594 | #define OV7670_REG_BD60MAX 0xab /* 60hz banding step limit */ |
595 | 595 | ||
596 | struct ov_regvals { | 596 | struct ov_regvals { |
597 | __u8 reg; | 597 | u8 reg; |
598 | __u8 val; | 598 | u8 val; |
599 | }; | 599 | }; |
600 | struct ov_i2c_regvals { | 600 | struct ov_i2c_regvals { |
601 | __u8 reg; | 601 | u8 reg; |
602 | __u8 val; | 602 | u8 val; |
603 | }; | 603 | }; |
604 | 604 | ||
605 | /* Settings for OV2610 camera chip */ | 605 | /* Settings for OV2610 camera chip */ |
@@ -1825,7 +1825,7 @@ static unsigned char ov7670_abs_to_sm(unsigned char v) | |||
1825 | } | 1825 | } |
1826 | 1826 | ||
1827 | /* Write a OV519 register */ | 1827 | /* Write a OV519 register */ |
1828 | static int reg_w(struct sd *sd, __u16 index, __u16 value) | 1828 | static int reg_w(struct sd *sd, u16 index, u16 value) |
1829 | { | 1829 | { |
1830 | int ret, req = 0; | 1830 | int ret, req = 0; |
1831 | 1831 | ||
@@ -1868,7 +1868,7 @@ leave: | |||
1868 | 1868 | ||
1869 | /* Read from a OV519 register, note not valid for the w9968cf!! */ | 1869 | /* Read from a OV519 register, note not valid for the w9968cf!! */ |
1870 | /* returns: negative is error, pos or zero is data */ | 1870 | /* returns: negative is error, pos or zero is data */ |
1871 | static int reg_r(struct sd *sd, __u16 index) | 1871 | static int reg_r(struct sd *sd, u16 index) |
1872 | { | 1872 | { |
1873 | int ret; | 1873 | int ret; |
1874 | int req; | 1874 | int req; |
@@ -1902,7 +1902,7 @@ static int reg_r(struct sd *sd, __u16 index) | |||
1902 | 1902 | ||
1903 | /* Read 8 values from a OV519 register */ | 1903 | /* Read 8 values from a OV519 register */ |
1904 | static int reg_r8(struct sd *sd, | 1904 | static int reg_r8(struct sd *sd, |
1905 | __u16 index) | 1905 | u16 index) |
1906 | { | 1906 | { |
1907 | int ret; | 1907 | int ret; |
1908 | 1908 | ||
@@ -1927,12 +1927,12 @@ static int reg_r8(struct sd *sd, | |||
1927 | * of their respective state in "value". | 1927 | * of their respective state in "value". |
1928 | */ | 1928 | */ |
1929 | static int reg_w_mask(struct sd *sd, | 1929 | static int reg_w_mask(struct sd *sd, |
1930 | __u16 index, | 1930 | u16 index, |
1931 | __u8 value, | 1931 | u8 value, |
1932 | __u8 mask) | 1932 | u8 mask) |
1933 | { | 1933 | { |
1934 | int ret; | 1934 | int ret; |
1935 | __u8 oldval; | 1935 | u8 oldval; |
1936 | 1936 | ||
1937 | if (mask != 0xff) { | 1937 | if (mask != 0xff) { |
1938 | value &= mask; /* Enforce mask on value */ | 1938 | value &= mask; /* Enforce mask on value */ |
@@ -1950,7 +1950,7 @@ static int reg_w_mask(struct sd *sd, | |||
1950 | * Writes multiple (n) byte value to a single register. Only valid with certain | 1950 | * Writes multiple (n) byte value to a single register. Only valid with certain |
1951 | * registers (0x30 and 0xc4 - 0xce). | 1951 | * registers (0x30 and 0xc4 - 0xce). |
1952 | */ | 1952 | */ |
1953 | static int ov518_reg_w32(struct sd *sd, __u16 index, u32 value, int n) | 1953 | static int ov518_reg_w32(struct sd *sd, u16 index, u32 value, int n) |
1954 | { | 1954 | { |
1955 | int ret; | 1955 | int ret; |
1956 | 1956 | ||
@@ -1970,7 +1970,7 @@ static int ov518_reg_w32(struct sd *sd, __u16 index, u32 value, int n) | |||
1970 | return 0; | 1970 | return 0; |
1971 | } | 1971 | } |
1972 | 1972 | ||
1973 | static int ov511_i2c_w(struct sd *sd, __u8 reg, __u8 value) | 1973 | static int ov511_i2c_w(struct sd *sd, u8 reg, u8 value) |
1974 | { | 1974 | { |
1975 | int rc, retries; | 1975 | int rc, retries; |
1976 | 1976 | ||
@@ -2011,7 +2011,7 @@ static int ov511_i2c_w(struct sd *sd, __u8 reg, __u8 value) | |||
2011 | return 0; | 2011 | return 0; |
2012 | } | 2012 | } |
2013 | 2013 | ||
2014 | static int ov511_i2c_r(struct sd *sd, __u8 reg) | 2014 | static int ov511_i2c_r(struct sd *sd, u8 reg) |
2015 | { | 2015 | { |
2016 | int rc, value, retries; | 2016 | int rc, value, retries; |
2017 | 2017 | ||
@@ -2092,8 +2092,8 @@ static int ov511_i2c_r(struct sd *sd, __u8 reg) | |||
2092 | * always succeeds regardless of whether the sensor is present and working. | 2092 | * always succeeds regardless of whether the sensor is present and working. |
2093 | */ | 2093 | */ |
2094 | static int ov518_i2c_w(struct sd *sd, | 2094 | static int ov518_i2c_w(struct sd *sd, |
2095 | __u8 reg, | 2095 | u8 reg, |
2096 | __u8 value) | 2096 | u8 value) |
2097 | { | 2097 | { |
2098 | int rc; | 2098 | int rc; |
2099 | 2099 | ||
@@ -2126,7 +2126,7 @@ static int ov518_i2c_w(struct sd *sd, | |||
2126 | * This is normally only called from i2c_r(). Note that this function | 2126 | * This is normally only called from i2c_r(). Note that this function |
2127 | * always succeeds regardless of whether the sensor is present and working. | 2127 | * always succeeds regardless of whether the sensor is present and working. |
2128 | */ | 2128 | */ |
2129 | static int ov518_i2c_r(struct sd *sd, __u8 reg) | 2129 | static int ov518_i2c_r(struct sd *sd, u8 reg) |
2130 | { | 2130 | { |
2131 | int rc, value; | 2131 | int rc, value; |
2132 | 2132 | ||
@@ -2149,7 +2149,7 @@ static int ov518_i2c_r(struct sd *sd, __u8 reg) | |||
2149 | return value; | 2149 | return value; |
2150 | } | 2150 | } |
2151 | 2151 | ||
2152 | static int ovfx2_i2c_w(struct sd *sd, __u8 reg, __u8 value) | 2152 | static int ovfx2_i2c_w(struct sd *sd, u8 reg, u8 value) |
2153 | { | 2153 | { |
2154 | int ret; | 2154 | int ret; |
2155 | 2155 | ||
@@ -2157,7 +2157,7 @@ static int ovfx2_i2c_w(struct sd *sd, __u8 reg, __u8 value) | |||
2157 | usb_sndctrlpipe(sd->gspca_dev.dev, 0), | 2157 | usb_sndctrlpipe(sd->gspca_dev.dev, 0), |
2158 | 0x02, | 2158 | 0x02, |
2159 | USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, | 2159 | USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, |
2160 | (__u16)value, (__u16)reg, NULL, 0, 500); | 2160 | (u16) value, (u16) reg, NULL, 0, 500); |
2161 | 2161 | ||
2162 | if (ret < 0) { | 2162 | if (ret < 0) { |
2163 | err("i2c 0x%02x -> [0x%02x] failed", value, reg); | 2163 | err("i2c 0x%02x -> [0x%02x] failed", value, reg); |
@@ -2168,7 +2168,7 @@ static int ovfx2_i2c_w(struct sd *sd, __u8 reg, __u8 value) | |||
2168 | return 0; | 2168 | return 0; |
2169 | } | 2169 | } |
2170 | 2170 | ||
2171 | static int ovfx2_i2c_r(struct sd *sd, __u8 reg) | 2171 | static int ovfx2_i2c_r(struct sd *sd, u8 reg) |
2172 | { | 2172 | { |
2173 | int ret; | 2173 | int ret; |
2174 | 2174 | ||
@@ -2176,7 +2176,7 @@ static int ovfx2_i2c_r(struct sd *sd, __u8 reg) | |||
2176 | usb_rcvctrlpipe(sd->gspca_dev.dev, 0), | 2176 | usb_rcvctrlpipe(sd->gspca_dev.dev, 0), |
2177 | 0x03, | 2177 | 0x03, |
2178 | USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE, | 2178 | USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE, |
2179 | 0, (__u16)reg, sd->gspca_dev.usb_buf, 1, 500); | 2179 | 0, (u16) reg, sd->gspca_dev.usb_buf, 1, 500); |
2180 | 2180 | ||
2181 | if (ret >= 0) { | 2181 | if (ret >= 0) { |
2182 | ret = sd->gspca_dev.usb_buf[0]; | 2182 | ret = sd->gspca_dev.usb_buf[0]; |
@@ -2187,7 +2187,7 @@ static int ovfx2_i2c_r(struct sd *sd, __u8 reg) | |||
2187 | return ret; | 2187 | return ret; |
2188 | } | 2188 | } |
2189 | 2189 | ||
2190 | static int i2c_w(struct sd *sd, __u8 reg, __u8 value) | 2190 | static int i2c_w(struct sd *sd, u8 reg, u8 value) |
2191 | { | 2191 | { |
2192 | int ret = -1; | 2192 | int ret = -1; |
2193 | 2193 | ||
@@ -2224,7 +2224,7 @@ static int i2c_w(struct sd *sd, __u8 reg, __u8 value) | |||
2224 | return ret; | 2224 | return ret; |
2225 | } | 2225 | } |
2226 | 2226 | ||
2227 | static int i2c_r(struct sd *sd, __u8 reg) | 2227 | static int i2c_r(struct sd *sd, u8 reg) |
2228 | { | 2228 | { |
2229 | int ret = -1; | 2229 | int ret = -1; |
2230 | 2230 | ||
@@ -2261,12 +2261,12 @@ static int i2c_r(struct sd *sd, __u8 reg) | |||
2261 | * of their respective state in "value". | 2261 | * of their respective state in "value". |
2262 | */ | 2262 | */ |
2263 | static int i2c_w_mask(struct sd *sd, | 2263 | static int i2c_w_mask(struct sd *sd, |
2264 | __u8 reg, | 2264 | u8 reg, |
2265 | __u8 value, | 2265 | u8 value, |
2266 | __u8 mask) | 2266 | u8 mask) |
2267 | { | 2267 | { |
2268 | int rc; | 2268 | int rc; |
2269 | __u8 oldval; | 2269 | u8 oldval; |
2270 | 2270 | ||
2271 | value &= mask; /* Enforce mask on value */ | 2271 | value &= mask; /* Enforce mask on value */ |
2272 | rc = i2c_r(sd, reg); | 2272 | rc = i2c_r(sd, reg); |
@@ -2334,12 +2334,12 @@ static inline int ov51x_restart(struct sd *sd) | |||
2334 | return 0; | 2334 | return 0; |
2335 | } | 2335 | } |
2336 | 2336 | ||
2337 | static int ov51x_set_slave_ids(struct sd *sd, __u8 slave); | 2337 | static int ov51x_set_slave_ids(struct sd *sd, u8 slave); |
2338 | 2338 | ||
2339 | /* This does an initial reset of an OmniVision sensor and ensures that I2C | 2339 | /* This does an initial reset of an OmniVision sensor and ensures that I2C |
2340 | * is synchronized. Returns <0 on failure. | 2340 | * is synchronized. Returns <0 on failure. |
2341 | */ | 2341 | */ |
2342 | static int init_ov_sensor(struct sd *sd, __u8 slave) | 2342 | static int init_ov_sensor(struct sd *sd, u8 slave) |
2343 | { | 2343 | { |
2344 | int i; | 2344 | int i; |
2345 | 2345 | ||
@@ -2378,7 +2378,7 @@ static int init_ov_sensor(struct sd *sd, __u8 slave) | |||
2378 | * Sets I2C read and write slave IDs. Returns <0 for error | 2378 | * Sets I2C read and write slave IDs. Returns <0 for error |
2379 | */ | 2379 | */ |
2380 | static int ov51x_set_slave_ids(struct sd *sd, | 2380 | static int ov51x_set_slave_ids(struct sd *sd, |
2381 | __u8 slave) | 2381 | u8 slave) |
2382 | { | 2382 | { |
2383 | int rc; | 2383 | int rc; |
2384 | 2384 | ||
@@ -3601,7 +3601,7 @@ static int mode_init_ov_sensor_regs(struct sd *sd) | |||
3601 | { | 3601 | { |
3602 | struct gspca_dev *gspca_dev; | 3602 | struct gspca_dev *gspca_dev; |
3603 | int qvga, xstart, xend, ystart, yend; | 3603 | int qvga, xstart, xend, ystart, yend; |
3604 | __u8 v; | 3604 | u8 v; |
3605 | 3605 | ||
3606 | gspca_dev = &sd->gspca_dev; | 3606 | gspca_dev = &sd->gspca_dev; |
3607 | qvga = gspca_dev->cam.cam_mode[(int) gspca_dev->curr_mode].priv & 1; | 3607 | qvga = gspca_dev->cam.cam_mode[(int) gspca_dev->curr_mode].priv & 1; |
@@ -4213,7 +4213,7 @@ static void setcontrast(struct gspca_dev *gspca_dev) | |||
4213 | i2c_w_mask(sd, OV7610_REG_CNT, val >> 4, 0x0f); | 4213 | i2c_w_mask(sd, OV7610_REG_CNT, val >> 4, 0x0f); |
4214 | break; | 4214 | break; |
4215 | case SEN_OV8610: { | 4215 | case SEN_OV8610: { |
4216 | static const __u8 ctab[] = { | 4216 | static const u8 ctab[] = { |
4217 | 0x03, 0x09, 0x0b, 0x0f, 0x53, 0x6f, 0x35, 0x7f | 4217 | 0x03, 0x09, 0x0b, 0x0f, 0x53, 0x6f, 0x35, 0x7f |
4218 | }; | 4218 | }; |
4219 | 4219 | ||
@@ -4223,7 +4223,7 @@ static void setcontrast(struct gspca_dev *gspca_dev) | |||
4223 | } | 4223 | } |
4224 | case SEN_OV7620: | 4224 | case SEN_OV7620: |
4225 | case SEN_OV7620AE: { | 4225 | case SEN_OV7620AE: { |
4226 | static const __u8 ctab[] = { | 4226 | static const u8 ctab[] = { |
4227 | 0x01, 0x05, 0x09, 0x11, 0x15, 0x35, 0x37, 0x57, | 4227 | 0x01, 0x05, 0x09, 0x11, 0x15, 0x35, 0x37, 0x57, |
4228 | 0x5b, 0xa5, 0xa7, 0xc7, 0xc9, 0xcf, 0xef, 0xff | 4228 | 0x5b, 0xa5, 0xa7, 0xc7, 0xc9, 0xcf, 0xef, 0xff |
4229 | }; | 4229 | }; |
diff --git a/drivers/media/video/gspca/w996Xcf.c b/drivers/media/video/gspca/w996Xcf.c index b5a93e379570..5d7342089e47 100644 --- a/drivers/media/video/gspca/w996Xcf.c +++ b/drivers/media/video/gspca/w996Xcf.c | |||
@@ -59,7 +59,7 @@ static const struct v4l2_pix_format w9968cf_vga_mode[] = { | |||
59 | .colorspace = V4L2_COLORSPACE_JPEG}, | 59 | .colorspace = V4L2_COLORSPACE_JPEG}, |
60 | }; | 60 | }; |
61 | 61 | ||
62 | static int reg_w(struct sd *sd, __u16 index, __u16 value); | 62 | static int reg_w(struct sd *sd, u16 index, u16 value); |
63 | 63 | ||
64 | /*-------------------------------------------------------------------------- | 64 | /*-------------------------------------------------------------------------- |
65 | Write 64-bit data to the fast serial bus registers. | 65 | Write 64-bit data to the fast serial bus registers. |