diff options
Diffstat (limited to 'drivers/media/video/gspca/ov534.c')
-rw-r--r-- | drivers/media/video/gspca/ov534.c | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/drivers/media/video/gspca/ov534.c b/drivers/media/video/gspca/ov534.c index 96cb3a976581..88ef03f6235b 100644 --- a/drivers/media/video/gspca/ov534.c +++ b/drivers/media/video/gspca/ov534.c | |||
@@ -487,7 +487,7 @@ static void ov534_reg_write(struct gspca_dev *gspca_dev, u16 reg, u8 val) | |||
487 | USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, | 487 | USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, |
488 | 0x00, reg, gspca_dev->usb_buf, 1, CTRL_TIMEOUT); | 488 | 0x00, reg, gspca_dev->usb_buf, 1, CTRL_TIMEOUT); |
489 | if (ret < 0) | 489 | if (ret < 0) |
490 | PDEBUG(D_ERR, "write failed"); | 490 | err("write failed %d", ret); |
491 | } | 491 | } |
492 | 492 | ||
493 | static u8 ov534_reg_read(struct gspca_dev *gspca_dev, u16 reg) | 493 | static u8 ov534_reg_read(struct gspca_dev *gspca_dev, u16 reg) |
@@ -502,7 +502,7 @@ static u8 ov534_reg_read(struct gspca_dev *gspca_dev, u16 reg) | |||
502 | 0x00, reg, gspca_dev->usb_buf, 1, CTRL_TIMEOUT); | 502 | 0x00, reg, gspca_dev->usb_buf, 1, CTRL_TIMEOUT); |
503 | PDEBUG(D_USBI, "reg=0x%04x, data=0x%02x", reg, gspca_dev->usb_buf[0]); | 503 | PDEBUG(D_USBI, "reg=0x%04x, data=0x%02x", reg, gspca_dev->usb_buf[0]); |
504 | if (ret < 0) | 504 | if (ret < 0) |
505 | PDEBUG(D_ERR, "read failed"); | 505 | err("read failed %d", ret); |
506 | return gspca_dev->usb_buf[0]; | 506 | return gspca_dev->usb_buf[0]; |
507 | } | 507 | } |
508 | 508 | ||
@@ -564,7 +564,7 @@ static void sccb_reg_write(struct gspca_dev *gspca_dev, u8 reg, u8 val) | |||
564 | ov534_reg_write(gspca_dev, OV534_REG_OPERATION, OV534_OP_WRITE_3); | 564 | ov534_reg_write(gspca_dev, OV534_REG_OPERATION, OV534_OP_WRITE_3); |
565 | 565 | ||
566 | if (!sccb_check_status(gspca_dev)) | 566 | if (!sccb_check_status(gspca_dev)) |
567 | PDEBUG(D_ERR, "sccb_reg_write failed"); | 567 | err("sccb_reg_write failed"); |
568 | } | 568 | } |
569 | 569 | ||
570 | static u8 sccb_reg_read(struct gspca_dev *gspca_dev, u16 reg) | 570 | static u8 sccb_reg_read(struct gspca_dev *gspca_dev, u16 reg) |
@@ -572,11 +572,11 @@ static u8 sccb_reg_read(struct gspca_dev *gspca_dev, u16 reg) | |||
572 | ov534_reg_write(gspca_dev, OV534_REG_SUBADDR, reg); | 572 | ov534_reg_write(gspca_dev, OV534_REG_SUBADDR, reg); |
573 | ov534_reg_write(gspca_dev, OV534_REG_OPERATION, OV534_OP_WRITE_2); | 573 | ov534_reg_write(gspca_dev, OV534_REG_OPERATION, OV534_OP_WRITE_2); |
574 | if (!sccb_check_status(gspca_dev)) | 574 | if (!sccb_check_status(gspca_dev)) |
575 | PDEBUG(D_ERR, "sccb_reg_read failed 1"); | 575 | err("sccb_reg_read failed 1"); |
576 | 576 | ||
577 | ov534_reg_write(gspca_dev, OV534_REG_OPERATION, OV534_OP_READ_2); | 577 | ov534_reg_write(gspca_dev, OV534_REG_OPERATION, OV534_OP_READ_2); |
578 | if (!sccb_check_status(gspca_dev)) | 578 | if (!sccb_check_status(gspca_dev)) |
579 | PDEBUG(D_ERR, "sccb_reg_read failed 2"); | 579 | err("sccb_reg_read failed 2"); |
580 | 580 | ||
581 | return ov534_reg_read(gspca_dev, OV534_REG_READ); | 581 | return ov534_reg_read(gspca_dev, OV534_REG_READ); |
582 | } | 582 | } |
@@ -1327,19 +1327,12 @@ static struct usb_driver sd_driver = { | |||
1327 | /* -- module insert / remove -- */ | 1327 | /* -- module insert / remove -- */ |
1328 | static int __init sd_mod_init(void) | 1328 | static int __init sd_mod_init(void) |
1329 | { | 1329 | { |
1330 | int ret; | 1330 | return usb_register(&sd_driver); |
1331 | |||
1332 | ret = usb_register(&sd_driver); | ||
1333 | if (ret < 0) | ||
1334 | return ret; | ||
1335 | PDEBUG(D_PROBE, "registered"); | ||
1336 | return 0; | ||
1337 | } | 1331 | } |
1338 | 1332 | ||
1339 | static void __exit sd_mod_exit(void) | 1333 | static void __exit sd_mod_exit(void) |
1340 | { | 1334 | { |
1341 | usb_deregister(&sd_driver); | 1335 | usb_deregister(&sd_driver); |
1342 | PDEBUG(D_PROBE, "deregistered"); | ||
1343 | } | 1336 | } |
1344 | 1337 | ||
1345 | module_init(sd_mod_init); | 1338 | module_init(sd_mod_init); |