aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca/mars.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2008-10-14 20:31:54 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2008-10-14 20:31:54 -0400
commit6dc6472581f693b5fc95aebedf67b4960fb85cf0 (patch)
tree06a5a9a08519950575505273eabced331ed51405 /drivers/media/video/gspca/mars.c
parentee673eaa72d8d185012b1027a05e25aba18c267f (diff)
parent8acd3a60bcca17c6d89c73cee3ad6057eb83ba1e (diff)
Merge commit 'origin'
Manual fixup of conflicts on: arch/powerpc/include/asm/dcr-regs.h drivers/net/ibm_newemac/core.h
Diffstat (limited to 'drivers/media/video/gspca/mars.c')
-rw-r--r--drivers/media/video/gspca/mars.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/drivers/media/video/gspca/mars.c b/drivers/media/video/gspca/mars.c
index 4d5db47ba8cb..277ca34a8817 100644
--- a/drivers/media/video/gspca/mars.c
+++ b/drivers/media/video/gspca/mars.c
@@ -134,7 +134,7 @@ static int sd_init(struct gspca_dev *gspca_dev)
134 return 0; 134 return 0;
135} 135}
136 136
137static void sd_start(struct gspca_dev *gspca_dev) 137static int sd_start(struct gspca_dev *gspca_dev)
138{ 138{
139 int err_code; 139 int err_code;
140 __u8 *data; 140 __u8 *data;
@@ -143,9 +143,10 @@ static void sd_start(struct gspca_dev *gspca_dev)
143 int intpipe; 143 int intpipe;
144 144
145 PDEBUG(D_STREAM, "camera start, iface %d, alt 8", gspca_dev->iface); 145 PDEBUG(D_STREAM, "camera start, iface %d, alt 8", gspca_dev->iface);
146 if (usb_set_interface(gspca_dev->dev, gspca_dev->iface, 8) < 0) { 146 err_code = usb_set_interface(gspca_dev->dev, gspca_dev->iface, 8);
147 if (err_code < 0) {
147 PDEBUG(D_ERR|D_STREAM, "Set packet size: set interface error"); 148 PDEBUG(D_ERR|D_STREAM, "Set packet size: set interface error");
148 return; 149 return err_code;
149 } 150 }
150 151
151 data = gspca_dev->usb_buf; 152 data = gspca_dev->usb_buf;
@@ -154,7 +155,7 @@ static void sd_start(struct gspca_dev *gspca_dev)
154 155
155 err_code = reg_w(gspca_dev, data[0], 2); 156 err_code = reg_w(gspca_dev, data[0], 2);
156 if (err_code < 0) 157 if (err_code < 0)
157 return; 158 return err_code;
158 159
159 /* 160 /*
160 Initialize the MR97113 chip register 161 Initialize the MR97113 chip register
@@ -180,14 +181,14 @@ static void sd_start(struct gspca_dev *gspca_dev)
180 181
181 err_code = reg_w(gspca_dev, data[0], 11); 182 err_code = reg_w(gspca_dev, data[0], 11);
182 if (err_code < 0) 183 if (err_code < 0)
183 return; 184 return err_code;
184 185
185 data[0] = 0x23; /* address */ 186 data[0] = 0x23; /* address */
186 data[1] = 0x09; /* reg 35, append frame header */ 187 data[1] = 0x09; /* reg 35, append frame header */
187 188
188 err_code = reg_w(gspca_dev, data[0], 2); 189 err_code = reg_w(gspca_dev, data[0], 2);
189 if (err_code < 0) 190 if (err_code < 0)
190 return; 191 return err_code;
191 192
192 data[0] = 0x3c; /* address */ 193 data[0] = 0x3c; /* address */
193/* if (gspca_dev->width == 1280) */ 194/* if (gspca_dev->width == 1280) */
@@ -198,7 +199,7 @@ static void sd_start(struct gspca_dev *gspca_dev)
198 * (unit: 4KB) 200KB */ 199 * (unit: 4KB) 200KB */
199 err_code = reg_w(gspca_dev, data[0], 2); 200 err_code = reg_w(gspca_dev, data[0], 2);
200 if (err_code < 0) 201 if (err_code < 0)
201 return; 202 return err_code;
202 203
203 if (0) { /* fixed dark-gain */ 204 if (0) { /* fixed dark-gain */
204 data[1] = 0; /* reg 94, Y Gain (1.75) */ 205 data[1] = 0; /* reg 94, Y Gain (1.75) */
@@ -240,13 +241,13 @@ static void sd_start(struct gspca_dev *gspca_dev)
240 241
241 err_code = reg_w(gspca_dev, data[0], 6); 242 err_code = reg_w(gspca_dev, data[0], 6);
242 if (err_code < 0) 243 if (err_code < 0)
243 return; 244 return err_code;
244 245
245 data[0] = 0x67; 246 data[0] = 0x67;
246 data[1] = 0x13; /* reg 103, first pixel B, disable sharpness */ 247 data[1] = 0x13; /* reg 103, first pixel B, disable sharpness */
247 err_code = reg_w(gspca_dev, data[0], 2); 248 err_code = reg_w(gspca_dev, data[0], 2);
248 if (err_code < 0) 249 if (err_code < 0)
249 return; 250 return err_code;
250 251
251 /* 252 /*
252 * initialize the value of MI sensor... 253 * initialize the value of MI sensor...
@@ -326,6 +327,7 @@ static void sd_start(struct gspca_dev *gspca_dev)
326 data[0] = 0x00; 327 data[0] = 0x00;
327 data[1] = 0x4d; /* ISOC transfering enable... */ 328 data[1] = 0x4d; /* ISOC transfering enable... */
328 reg_w(gspca_dev, data[0], 2); 329 reg_w(gspca_dev, data[0], 2);
330 return err_code;
329} 331}
330 332
331static void sd_stopN(struct gspca_dev *gspca_dev) 333static void sd_stopN(struct gspca_dev *gspca_dev)