aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca/sunplus.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/gspca/sunplus.c')
-rw-r--r--drivers/media/video/gspca/sunplus.c27
1 files changed, 11 insertions, 16 deletions
diff --git a/drivers/media/video/gspca/sunplus.c b/drivers/media/video/gspca/sunplus.c
index 9494f86b9a85..a9cbcd6011d9 100644
--- a/drivers/media/video/gspca/sunplus.c
+++ b/drivers/media/video/gspca/sunplus.c
@@ -343,7 +343,7 @@ static void reg_r(struct gspca_dev *gspca_dev,
343 len ? gspca_dev->usb_buf : NULL, len, 343 len ? gspca_dev->usb_buf : NULL, len,
344 500); 344 500);
345 if (ret < 0) { 345 if (ret < 0) {
346 PDEBUG(D_ERR, "reg_r err %d", ret); 346 err("reg_r err %d", ret);
347 gspca_dev->usb_err = ret; 347 gspca_dev->usb_err = ret;
348 } 348 }
349} 349}
@@ -368,7 +368,7 @@ static void reg_w_1(struct gspca_dev *gspca_dev,
368 gspca_dev->usb_buf, 1, 368 gspca_dev->usb_buf, 1,
369 500); 369 500);
370 if (ret < 0) { 370 if (ret < 0) {
371 PDEBUG(D_ERR, "reg_w_1 err %d", ret); 371 err("reg_w_1 err %d", ret);
372 gspca_dev->usb_err = ret; 372 gspca_dev->usb_err = ret;
373 } 373 }
374} 374}
@@ -388,7 +388,7 @@ static void reg_w_riv(struct gspca_dev *gspca_dev,
388 USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, 388 USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
389 value, index, NULL, 0, 500); 389 value, index, NULL, 0, 500);
390 if (ret < 0) { 390 if (ret < 0) {
391 PDEBUG(D_ERR, "reg_w_riv err %d", ret); 391 err("reg_w_riv err %d", ret);
392 gspca_dev->usb_err = ret; 392 gspca_dev->usb_err = ret;
393 return; 393 return;
394 } 394 }
@@ -413,7 +413,7 @@ static u8 reg_r_1(struct gspca_dev *gspca_dev,
413 gspca_dev->usb_buf, 1, 413 gspca_dev->usb_buf, 1,
414 500); /* timeout */ 414 500); /* timeout */
415 if (ret < 0) { 415 if (ret < 0) {
416 PDEBUG(D_ERR, "reg_r_1 err %d", ret); 416 err("reg_r_1 err %d", ret);
417 gspca_dev->usb_err = ret; 417 gspca_dev->usb_err = ret;
418 return 0; 418 return 0;
419 } 419 }
@@ -440,7 +440,7 @@ static u16 reg_r_12(struct gspca_dev *gspca_dev,
440 gspca_dev->usb_buf, length, 440 gspca_dev->usb_buf, length,
441 500); 441 500);
442 if (ret < 0) { 442 if (ret < 0) {
443 PDEBUG(D_ERR, "reg_r_12 err %d", ret); 443 err("reg_r_12 err %d", ret);
444 gspca_dev->usb_err = ret; 444 gspca_dev->usb_err = ret;
445 return 0; 445 return 0;
446 } 446 }
@@ -463,7 +463,7 @@ static void setup_qtable(struct gspca_dev *gspca_dev,
463 463
464 /* loop over y components */ 464 /* loop over y components */
465 for (i = 0; i < 64; i++) 465 for (i = 0; i < 64; i++)
466 reg_w_riv(gspca_dev, 0x00, 0x2800 + i, qtable[0][i]); 466 reg_w_riv(gspca_dev, 0x00, 0x2800 + i, qtable[0][i]);
467 467
468 /* loop over c components */ 468 /* loop over c components */
469 for (i = 0; i < 64; i++) 469 for (i = 0; i < 64; i++)
@@ -712,8 +712,9 @@ static int sd_config(struct gspca_dev *gspca_dev,
712 sd->subtype = id->driver_info; 712 sd->subtype = id->driver_info;
713 713
714 if (sd->subtype == AiptekMiniPenCam13) { 714 if (sd->subtype == AiptekMiniPenCam13) {
715/* try to get the firmware as some cam answer 2.0.1.2.2 715
716 * and should be a spca504b then overwrite that setting */ 716 /* try to get the firmware as some cam answer 2.0.1.2.2
717 * and should be a spca504b then overwrite that setting */
717 reg_r(gspca_dev, 0x20, 0, 1); 718 reg_r(gspca_dev, 0x20, 0, 1);
718 switch (gspca_dev->usb_buf[0]) { 719 switch (gspca_dev->usb_buf[0]) {
719 case 1: 720 case 1:
@@ -733,7 +734,7 @@ static int sd_config(struct gspca_dev *gspca_dev,
733/* case BRIDGE_SPCA504: */ 734/* case BRIDGE_SPCA504: */
734/* case BRIDGE_SPCA536: */ 735/* case BRIDGE_SPCA536: */
735 cam->cam_mode = vga_mode; 736 cam->cam_mode = vga_mode;
736 cam->nmodes =ARRAY_SIZE(vga_mode); 737 cam->nmodes = ARRAY_SIZE(vga_mode);
737 break; 738 break;
738 case BRIDGE_SPCA533: 739 case BRIDGE_SPCA533:
739 cam->cam_mode = custom_mode; 740 cam->cam_mode = custom_mode;
@@ -1247,17 +1248,11 @@ static struct usb_driver sd_driver = {
1247/* -- module insert / remove -- */ 1248/* -- module insert / remove -- */
1248static int __init sd_mod_init(void) 1249static int __init sd_mod_init(void)
1249{ 1250{
1250 int ret; 1251 return usb_register(&sd_driver);
1251 ret = usb_register(&sd_driver);
1252 if (ret < 0)
1253 return ret;
1254 PDEBUG(D_PROBE, "registered");
1255 return 0;
1256} 1252}
1257static void __exit sd_mod_exit(void) 1253static void __exit sd_mod_exit(void)
1258{ 1254{
1259 usb_deregister(&sd_driver); 1255 usb_deregister(&sd_driver);
1260 PDEBUG(D_PROBE, "deregistered");
1261} 1256}
1262 1257
1263module_init(sd_mod_init); 1258module_init(sd_mod_init);