aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca/sn9c2028.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/gspca/sn9c2028.c')
-rw-r--r--drivers/media/video/gspca/sn9c2028.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/drivers/media/video/gspca/sn9c2028.c b/drivers/media/video/gspca/sn9c2028.c
index 71d9447a7986..40a06680502d 100644
--- a/drivers/media/video/gspca/sn9c2028.c
+++ b/drivers/media/video/gspca/sn9c2028.c
@@ -75,7 +75,7 @@ static int sn9c2028_command(struct gspca_dev *gspca_dev, u8 *command)
75 USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_INTERFACE, 75 USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_INTERFACE,
76 2, 0, gspca_dev->usb_buf, 6, 500); 76 2, 0, gspca_dev->usb_buf, 6, 500);
77 if (rc < 0) { 77 if (rc < 0) {
78 PDEBUG(D_ERR, "command write [%02x] error %d", 78 err("command write [%02x] error %d",
79 gspca_dev->usb_buf[0], rc); 79 gspca_dev->usb_buf[0], rc);
80 return rc; 80 return rc;
81 } 81 }
@@ -93,7 +93,7 @@ static int sn9c2028_read1(struct gspca_dev *gspca_dev)
93 USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_INTERFACE, 93 USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_INTERFACE,
94 1, 0, gspca_dev->usb_buf, 1, 500); 94 1, 0, gspca_dev->usb_buf, 1, 500);
95 if (rc != 1) { 95 if (rc != 1) {
96 PDEBUG(D_ERR, "read1 error %d", rc); 96 err("read1 error %d", rc);
97 return (rc < 0) ? rc : -EIO; 97 return (rc < 0) ? rc : -EIO;
98 } 98 }
99 PDEBUG(D_USBI, "read1 response %02x", gspca_dev->usb_buf[0]); 99 PDEBUG(D_USBI, "read1 response %02x", gspca_dev->usb_buf[0]);
@@ -109,7 +109,7 @@ static int sn9c2028_read4(struct gspca_dev *gspca_dev, u8 *reading)
109 USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_INTERFACE, 109 USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_INTERFACE,
110 4, 0, gspca_dev->usb_buf, 4, 500); 110 4, 0, gspca_dev->usb_buf, 4, 500);
111 if (rc != 4) { 111 if (rc != 4) {
112 PDEBUG(D_ERR, "read4 error %d", rc); 112 err("read4 error %d", rc);
113 return (rc < 0) ? rc : -EIO; 113 return (rc < 0) ? rc : -EIO;
114 } 114 }
115 memcpy(reading, gspca_dev->usb_buf, 4); 115 memcpy(reading, gspca_dev->usb_buf, 4);
@@ -131,7 +131,7 @@ static int sn9c2028_long_command(struct gspca_dev *gspca_dev, u8 *command)
131 for (i = 0; i < 256 && status < 2; i++) 131 for (i = 0; i < 256 && status < 2; i++)
132 status = sn9c2028_read1(gspca_dev); 132 status = sn9c2028_read1(gspca_dev);
133 if (status != 2) { 133 if (status != 2) {
134 PDEBUG(D_ERR, "long command status read error %d", status); 134 err("long command status read error %d", status);
135 return (status < 0) ? status : -EIO; 135 return (status < 0) ? status : -EIO;
136 } 136 }
137 137
@@ -638,7 +638,7 @@ static int sd_start(struct gspca_dev *gspca_dev)
638 err_code = start_vivitar_cam(gspca_dev); 638 err_code = start_vivitar_cam(gspca_dev);
639 break; 639 break;
640 default: 640 default:
641 PDEBUG(D_ERR, "Starting unknown camera, please report this"); 641 err("Starting unknown camera, please report this");
642 return -ENXIO; 642 return -ENXIO;
643 } 643 }
644 644
@@ -738,19 +738,12 @@ static struct usb_driver sd_driver = {
738/* -- module insert / remove -- */ 738/* -- module insert / remove -- */
739static int __init sd_mod_init(void) 739static int __init sd_mod_init(void)
740{ 740{
741 int ret; 741 return usb_register(&sd_driver);
742
743 ret = usb_register(&sd_driver);
744 if (ret < 0)
745 return ret;
746 PDEBUG(D_PROBE, "registered");
747 return 0;
748} 742}
749 743
750static void __exit sd_mod_exit(void) 744static void __exit sd_mod_exit(void)
751{ 745{
752 usb_deregister(&sd_driver); 746 usb_deregister(&sd_driver);
753 PDEBUG(D_PROBE, "deregistered");
754} 747}
755 748
756module_init(sd_mod_init); 749module_init(sd_mod_init);