aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca/sunplus.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-10-28 12:35:11 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-10-28 12:35:11 -0400
commit0851668fdd97e526b2a41f794b785c204dd3d3e0 (patch)
tree4ef7c20a8be8393006c6fe9627eb29dd30877d61 /drivers/media/video/gspca/sunplus.c
parent00ebb6382b8d9c7c15b5f8ad230670d8161d38dd (diff)
parent7655e594945289b418af39f6669fea4666a7b520 (diff)
Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (505 commits) [media] af9015: Fix max I2C message size when used with tda18271 [media] IR: initialize ir_raw_event in few more drivers [media] Guard a divide in v4l1 compat layer [media] imon: fix nomouse modprobe option [media] imon: remove redundant change_protocol call [media] imon: fix my egregious brown paper bag w/rdev/idev split [media] cafe_ccic: Configure ov7670 correctly [media] ov7670: allow configuration of image size, clock speed, and I/O method [media] af9015: support for DigitalNow TinyTwin v3 [1f4d:9016] [media] af9015: map DigitalNow TinyTwin v2 remote [media] DigitalNow TinyTwin remote controller [media] af9015: RC fixes and improvements videodev2.h.xml: Update to reflect the latest changes at videodev2.h [media] v4l: document new Bayer and monochrome pixel formats [media] DocBook/v4l: Add missing formats used on gspca cpia1 and sn9c2028 [media] firedtv: add parameter to fake ca_system_ids in CA_INFO [media] tm6000: fix a macro coding style issue tm6000: Remove some ugly debug code [media] Nova-S-Plus audio line input [media] [RFC,1/1] V4L2: Use new CAP bits in existing RDS capable drivers ...
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);