git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vserver 1.9.3
[linux-2.6.git]
/
drivers
/
usb
/
media
/
ov511.c
diff --git
a/drivers/usb/media/ov511.c
b/drivers/usb/media/ov511.c
index
529a2de
..
d040c8e
100644
(file)
--- a/
drivers/usb/media/ov511.c
+++ b/
drivers/usb/media/ov511.c
@@
-119,78
+119,79
@@
static int remove_zeros;
static int mirror;
static int ov518_color;
static int mirror;
static int ov518_color;
-
MODULE_PARM(autobright, "i"
);
+
module_param(autobright, int, 0
);
MODULE_PARM_DESC(autobright, "Sensor automatically changes brightness");
MODULE_PARM_DESC(autobright, "Sensor automatically changes brightness");
-
MODULE_PARM(autogain, "i"
);
+
module_param(autogain, int, 0
);
MODULE_PARM_DESC(autogain, "Sensor automatically changes gain");
MODULE_PARM_DESC(autogain, "Sensor automatically changes gain");
-
MODULE_PARM(autoexp, "i"
);
+
module_param(autoexp, int, 0
);
MODULE_PARM_DESC(autoexp, "Sensor automatically changes exposure");
MODULE_PARM_DESC(autoexp, "Sensor automatically changes exposure");
-
MODULE_PARM(debug, "i"
);
+
module_param(debug, int, 0
);
MODULE_PARM_DESC(debug,
"Debug level: 0=none, 1=inits, 2=warning, 3=config, 4=functions, 5=max");
MODULE_PARM_DESC(debug,
"Debug level: 0=none, 1=inits, 2=warning, 3=config, 4=functions, 5=max");
-
MODULE_PARM(snapshot, "i"
);
+
module_param(snapshot, int, 0
);
MODULE_PARM_DESC(snapshot, "Enable snapshot mode");
MODULE_PARM_DESC(snapshot, "Enable snapshot mode");
-
MODULE_PARM(cams, "i"
);
+
module_param(cams, int, 0
);
MODULE_PARM_DESC(cams, "Number of simultaneous cameras");
MODULE_PARM_DESC(cams, "Number of simultaneous cameras");
-
MODULE_PARM(compress, "i"
);
+
module_param(compress, int, 0
);
MODULE_PARM_DESC(compress, "Turn on compression");
MODULE_PARM_DESC(compress, "Turn on compression");
-
MODULE_PARM(testpat, "i"
);
+
module_param(testpat, int, 0
);
MODULE_PARM_DESC(testpat,
"Replace image with vertical bar testpattern (only partially working)");
MODULE_PARM_DESC(testpat,
"Replace image with vertical bar testpattern (only partially working)");
-
MODULE_PARM(dumppix, "i"
);
+
module_param(dumppix, int, 0
);
MODULE_PARM_DESC(dumppix, "Dump raw pixel data");
MODULE_PARM_DESC(dumppix, "Dump raw pixel data");
-
MODULE_PARM(led, "i"
);
+
module_param(led, int, 0
);
MODULE_PARM_DESC(led,
"LED policy (OV511+ or later). 0=off, 1=on (default), 2=auto (on when open)");
MODULE_PARM_DESC(led,
"LED policy (OV511+ or later). 0=off, 1=on (default), 2=auto (on when open)");
-
MODULE_PARM(dump_bridge, "i"
);
+
module_param(dump_bridge, int, 0
);
MODULE_PARM_DESC(dump_bridge, "Dump the bridge registers");
MODULE_PARM_DESC(dump_bridge, "Dump the bridge registers");
-
MODULE_PARM(dump_sensor, "i"
);
+
module_param(dump_sensor, int, 0
);
MODULE_PARM_DESC(dump_sensor, "Dump the sensor registers");
MODULE_PARM_DESC(dump_sensor, "Dump the sensor registers");
-
MODULE_PARM(printph, "i"
);
+
module_param(printph, int, 0
);
MODULE_PARM_DESC(printph, "Print frame start/end headers");
MODULE_PARM_DESC(printph, "Print frame start/end headers");
-
MODULE_PARM(phy, "i"
);
+
module_param(phy, int, 0
);
MODULE_PARM_DESC(phy, "Prediction range (horiz. Y)");
MODULE_PARM_DESC(phy, "Prediction range (horiz. Y)");
-
MODULE_PARM(phuv, "i"
);
+
module_param(phuv, int, 0
);
MODULE_PARM_DESC(phuv, "Prediction range (horiz. UV)");
MODULE_PARM_DESC(phuv, "Prediction range (horiz. UV)");
-
MODULE_PARM(pvy, "i"
);
+
module_param(pvy, int, 0
);
MODULE_PARM_DESC(pvy, "Prediction range (vert. Y)");
MODULE_PARM_DESC(pvy, "Prediction range (vert. Y)");
-
MODULE_PARM(pvuv, "i"
);
+
module_param(pvuv, int, 0
);
MODULE_PARM_DESC(pvuv, "Prediction range (vert. UV)");
MODULE_PARM_DESC(pvuv, "Prediction range (vert. UV)");
-
MODULE_PARM(qhy, "i"
);
+
module_param(qhy, int, 0
);
MODULE_PARM_DESC(qhy, "Quantization threshold (horiz. Y)");
MODULE_PARM_DESC(qhy, "Quantization threshold (horiz. Y)");
-
MODULE_PARM(qhuv, "i"
);
+
module_param(qhuv, int, 0
);
MODULE_PARM_DESC(qhuv, "Quantization threshold (horiz. UV)");
MODULE_PARM_DESC(qhuv, "Quantization threshold (horiz. UV)");
-
MODULE_PARM(qvy, "i"
);
+
module_param(qvy, int, 0
);
MODULE_PARM_DESC(qvy, "Quantization threshold (vert. Y)");
MODULE_PARM_DESC(qvy, "Quantization threshold (vert. Y)");
-
MODULE_PARM(qvuv, "i"
);
+
module_param(qvuv, int, 0
);
MODULE_PARM_DESC(qvuv, "Quantization threshold (vert. UV)");
MODULE_PARM_DESC(qvuv, "Quantization threshold (vert. UV)");
-
MODULE_PARM(lightfreq, "i"
);
+
module_param(lightfreq, int, 0
);
MODULE_PARM_DESC(lightfreq,
"Light frequency. Set to 50 or 60 Hz, or zero for default settings");
MODULE_PARM_DESC(lightfreq,
"Light frequency. Set to 50 or 60 Hz, or zero for default settings");
-
MODULE_PARM(bandingfilter, "i"
);
+
module_param(bandingfilter, int, 0
);
MODULE_PARM_DESC(bandingfilter,
"Enable banding filter (to reduce effects of fluorescent lighting)");
MODULE_PARM_DESC(bandingfilter,
"Enable banding filter (to reduce effects of fluorescent lighting)");
-
MODULE_PARM(clockdiv, "i"
);
+
module_param(clockdiv, int, 0
);
MODULE_PARM_DESC(clockdiv, "Force pixel clock divisor to a specific value");
MODULE_PARM_DESC(clockdiv, "Force pixel clock divisor to a specific value");
-
MODULE_PARM(packetsize, "i"
);
+
module_param(packetsize, int, 0
);
MODULE_PARM_DESC(packetsize, "Force a specific isoc packet size");
MODULE_PARM_DESC(packetsize, "Force a specific isoc packet size");
-
MODULE_PARM(framedrop, "i"
);
+
module_param(framedrop, int, 0
);
MODULE_PARM_DESC(framedrop, "Force a specific frame drop register setting");
MODULE_PARM_DESC(framedrop, "Force a specific frame drop register setting");
-
MODULE_PARM(fastset, "i"
);
+
module_param(fastset, int, 0
);
MODULE_PARM_DESC(fastset, "Allows picture settings to take effect immediately");
MODULE_PARM_DESC(fastset, "Allows picture settings to take effect immediately");
-
MODULE_PARM(force_palette, "i"
);
+
module_param(force_palette, int, 0
);
MODULE_PARM_DESC(force_palette, "Force the palette to a specific value");
MODULE_PARM_DESC(force_palette, "Force the palette to a specific value");
-
MODULE_PARM(backlight, "i"
);
+
module_param(backlight, int, 0
);
MODULE_PARM_DESC(backlight, "For objects that are lit from behind");
MODULE_PARM_DESC(backlight, "For objects that are lit from behind");
-MODULE_PARM(unit_video, "1-" __MODULE_STRING(OV511_MAX_UNIT_VIDEO) "i");
+static int num_uv;
+module_param_array(unit_video, int, num_uv, 0);
MODULE_PARM_DESC(unit_video,
"Force use of specific minor number(s). 0 is not allowed.");
MODULE_PARM_DESC(unit_video,
"Force use of specific minor number(s). 0 is not allowed.");
-
MODULE_PARM(remove_zeros, "i"
);
+
module_param(remove_zeros, int, 0
);
MODULE_PARM_DESC(remove_zeros,
"Remove zero-padding from uncompressed incoming data");
MODULE_PARM_DESC(remove_zeros,
"Remove zero-padding from uncompressed incoming data");
-
MODULE_PARM(mirror, "i"
);
+
module_param(mirror, int, 0
);
MODULE_PARM_DESC(mirror, "Reverse image horizontally");
MODULE_PARM_DESC(mirror, "Reverse image horizontally");
-
MODULE_PARM(ov518_color, "i"
);
+
module_param(ov518_color, int, 0
);
MODULE_PARM_DESC(ov518_color, "Enable OV518 color (experimental)");
MODULE_AUTHOR(DRIVER_AUTHOR);
MODULE_PARM_DESC(ov518_color, "Enable OV518 color (experimental)");
MODULE_AUTHOR(DRIVER_AUTHOR);
@@
-472,7
+473,7
@@
ov518_reg_w32(struct usb_ov511 *ov, unsigned char reg, u32 val, int n)
down(&ov->cbuf_lock);
down(&ov->cbuf_lock);
- *((
u
32 *)ov->cbuf) = __cpu_to_le32(val);
+ *((
__le
32 *)ov->cbuf) = __cpu_to_le32(val);
rc = usb_control_msg(ov->dev,
usb_sndctrlpipe(ov->dev, 0),
rc = usb_control_msg(ov->dev,
usb_sndctrlpipe(ov->dev, 0),
@@
-1169,7
+1170,7
@@
init_ov_sensor(struct usb_ov511 *ov)
return -EIO;
/* Wait for it to initialize */
return -EIO;
/* Wait for it to initialize */
-
schedule_timeout(1 + 150 * HZ / 100
0);
+
msleep(15
0);
for (i = 0, success = 0; i < i2c_detect_tries && !success; i++) {
if ((i2c_r(ov, OV7610_REG_ID_HIGH) == 0x7F) &&
for (i = 0, success = 0; i < i2c_detect_tries && !success; i++) {
if ((i2c_r(ov, OV7610_REG_ID_HIGH) == 0x7F) &&
@@
-1182,7
+1183,7
@@
init_ov_sensor(struct usb_ov511 *ov)
if (i2c_w(ov, 0x12, 0x80) < 0)
return -EIO;
/* Wait for it to initialize */
if (i2c_w(ov, 0x12, 0x80) < 0)
return -EIO;
/* Wait for it to initialize */
-
schedule_timeout(1 + 150 * HZ / 100
0);
+
msleep(15
0);
/* Dummy read to sync I2C */
if (i2c_r(ov, 0x00) < 0)
return -EIO;
/* Dummy read to sync I2C */
if (i2c_r(ov, 0x00) < 0)
return -EIO;
@@
-4947,7
+4948,7
@@
ov7xx0_configure(struct usb_ov511 *ov)
return -1;
/* Wait for it to initialize */
return -1;
/* Wait for it to initialize */
-
schedule_timeout(1 + 150 * HZ / 100
0);
+
msleep(15
0);
i = 0;
success = 0;
i = 0;
success = 0;