diff options
author | Jean-François Moine <moinejf@free.fr> | 2010-09-13 12:19:58 +0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-10-21 07:05:53 +0400 |
commit | 0b656321f338a2e5e3d9a9bdce959a2d76857967 (patch) | |
tree | 2f1581be1e243ace0cb25a255b71aa09fc4aa2ce /drivers/media/video | |
parent | 548264375b1c0d51b418bf7ab6d2fec647307ab7 (diff) | |
download | linux-0b656321f338a2e5e3d9a9bdce959a2d76857967.tar.xz |
V4L/DVB: gspca - all modules: Display error messages when gspca debug disabled
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video')
35 files changed, 147 insertions, 167 deletions
diff --git a/drivers/media/video/gspca/cpia1.c b/drivers/media/video/gspca/cpia1.c index 696f2c3ae317..c56bf0f761e2 100644 --- a/drivers/media/video/gspca/cpia1.c +++ b/drivers/media/video/gspca/cpia1.c @@ -510,7 +510,7 @@ retry: gspca_dev->usb_buf, databytes, 1000); if (ret < 0) - PDEBUG(D_ERR, "usb_control_msg %02x, error %d", command[1], + err("usb_control_msg %02x, error %d", command[1], ret); if (ret == -EPIPE && retries > 0) { @@ -1236,7 +1236,7 @@ static void monitor_exposure(struct gspca_dev *gspca_dev) cmd[7] = 0; ret = cpia_usb_transferCmd(gspca_dev, cmd); if (ret) { - PDEBUG(D_ERR, "ReadVPRegs(30,4,9,8) - failed: %d", ret); + err("ReadVPRegs(30,4,9,8) - failed: %d", ret); return; } exp_acc = gspca_dev->usb_buf[0]; diff --git a/drivers/media/video/gspca/finepix.c b/drivers/media/video/gspca/finepix.c index 9b915ae50eb7..d78226455d1f 100644 --- a/drivers/media/video/gspca/finepix.c +++ b/drivers/media/video/gspca/finepix.c @@ -182,7 +182,7 @@ static int sd_start(struct gspca_dev *gspca_dev) /* Init the device */ ret = command(gspca_dev, 0); if (ret < 0) { - PDEBUG(D_STREAM, "init failed %d", ret); + err("init failed %d", ret); return ret; } @@ -194,14 +194,14 @@ static int sd_start(struct gspca_dev *gspca_dev) FPIX_MAX_TRANSFER, &len, FPIX_TIMEOUT); if (ret < 0) { - PDEBUG(D_STREAM, "usb_bulk_msg failed %d", ret); + err("usb_bulk_msg failed %d", ret); return ret; } /* Request a frame, but don't read it */ ret = command(gspca_dev, 1); if (ret < 0) { - PDEBUG(D_STREAM, "frame request failed %d", ret); + err("frame request failed %d", ret); return ret; } diff --git a/drivers/media/video/gspca/gl860/gl860.c b/drivers/media/video/gspca/gl860/gl860.c index 04bc805fb176..b05bec7321b5 100644 --- a/drivers/media/video/gspca/gl860/gl860.c +++ b/drivers/media/video/gspca/gl860/gl860.c @@ -585,8 +585,7 @@ int gl860_RTx(struct gspca_dev *gspca_dev, } if (r < 0) - PDEBUG(D_ERR, - "ctrl transfer failed %4d " + err("ctrl transfer failed %4d " "[p%02x r%d v%04x i%04x len%d]", r, pref, req, val, index, len); else if (len > 1 && r < len) diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c index 4609f0e38930..90f058bda7da 100644 --- a/drivers/media/video/gspca/gspca.c +++ b/drivers/media/video/gspca/gspca.c @@ -148,7 +148,7 @@ static void int_irq(struct urb *urb) if (ret == 0) { ret = usb_submit_urb(urb, GFP_ATOMIC); if (ret < 0) - PDEBUG(D_ERR, "Resubmit URB failed with error %i", ret); + err("Resubmit URB failed with error %i", ret); } } @@ -177,8 +177,8 @@ static int gspca_input_connect(struct gspca_dev *dev) err = input_register_device(input_dev); if (err) { - PDEBUG(D_ERR, "Input device registration failed " - "with error %i", err); + err("Input device registration failed with error %i", + err); input_dev->dev.parent = NULL; input_free_device(input_dev); } else { @@ -328,8 +328,7 @@ static void fill_frame(struct gspca_dev *gspca_dev, } st = urb->iso_frame_desc[i].status; if (st) { - PDEBUG(D_ERR, - "ISOC data error: [%d] len=%d, status=%d", + err("ISOC data error: [%d] len=%d, status=%d", i, len, st); gspca_dev->last_packet_type = DISCARD_PACKET; continue; @@ -347,7 +346,7 @@ resubmit: /* resubmit the URB */ st = usb_submit_urb(urb, GFP_ATOMIC); if (st < 0) - PDEBUG(D_ERR|D_PACK, "usb_submit_urb() ret %d", st); + err("usb_submit_urb() ret %d", st); } /* @@ -401,7 +400,7 @@ resubmit: if (gspca_dev->cam.bulk_nurbs != 0) { st = usb_submit_urb(urb, GFP_ATOMIC); if (st < 0) - PDEBUG(D_ERR|D_PACK, "usb_submit_urb() ret %d", st); + err("usb_submit_urb() ret %d", st); } } @@ -590,7 +589,7 @@ static int gspca_set_alt0(struct gspca_dev *gspca_dev) return 0; ret = usb_set_interface(gspca_dev->dev, gspca_dev->iface, 0); if (ret < 0) - PDEBUG(D_ERR|D_STREAM, "set alt 0 err %d", ret); + err("set alt 0 err %d", ret); return ret; } @@ -850,8 +849,7 @@ static int gspca_init_transfer(struct gspca_dev *gspca_dev) break; gspca_stream_off(gspca_dev); if (ret != -ENOSPC) { - PDEBUG(D_ERR|D_STREAM, - "usb_submit_urb alt %d err %d", + err("usb_submit_urb alt %d err %d", gspca_dev->alt, ret); goto out; } @@ -2243,7 +2241,7 @@ int gspca_dev_probe(struct usb_interface *intf, /* we don't handle multi-config cameras */ if (dev->descriptor.bNumConfigurations != 1) { - PDEBUG(D_ERR, "%04x:%04x too many config", + err("%04x:%04x too many config", id->idVendor, id->idProduct); return -ENODEV; } diff --git a/drivers/media/video/gspca/jeilinj.c b/drivers/media/video/gspca/jeilinj.c index c468af5245c2..a35e87bb0388 100644 --- a/drivers/media/video/gspca/jeilinj.c +++ b/drivers/media/video/gspca/jeilinj.c @@ -82,7 +82,7 @@ static int jlj_write2(struct gspca_dev *gspca_dev, unsigned char *command) usb_sndbulkpipe(gspca_dev->dev, 3), gspca_dev->usb_buf, 2, NULL, 500); if (retval < 0) - PDEBUG(D_ERR, "command write [%02x] error %d", + err("command write [%02x] error %d", gspca_dev->usb_buf[0], retval); return retval; } @@ -97,7 +97,7 @@ static int jlj_read1(struct gspca_dev *gspca_dev, unsigned char response) gspca_dev->usb_buf, 1, NULL, 500); response = gspca_dev->usb_buf[0]; if (retval < 0) - PDEBUG(D_ERR, "read command [%02x] error %d", + err("read command [%02x] error %d", gspca_dev->usb_buf[0], retval); return retval; } @@ -191,7 +191,7 @@ static void jlj_dostream(struct work_struct *work) buffer = kmalloc(JEILINJ_MAX_TRANSFER, GFP_KERNEL | GFP_DMA); if (!buffer) { - PDEBUG(D_ERR, "Couldn't allocate USB buffer"); + err("Couldn't allocate USB buffer"); goto quit_stream; } while (gspca_dev->present && gspca_dev->streaming) { diff --git a/drivers/media/video/gspca/konica.c b/drivers/media/video/gspca/konica.c index 3a07096e7088..31ea306abccf 100644 --- a/drivers/media/video/gspca/konica.c +++ b/drivers/media/video/gspca/konica.c @@ -200,7 +200,7 @@ static void reg_w(struct gspca_dev *gspca_dev, u16 value, u16 index) 0, 1000); if (ret < 0) { - PDEBUG(D_ERR, "reg_w err %d", ret); + err("reg_w err %d", ret); gspca_dev->usb_err = ret; } } @@ -221,7 +221,7 @@ static void reg_r(struct gspca_dev *gspca_dev, u16 value, u16 index) 2, 1000); if (ret < 0) { - PDEBUG(D_ERR, "reg_w err %d", ret); + err("reg_w err %d", ret); gspca_dev->usb_err = ret; } } @@ -284,7 +284,7 @@ static int sd_start(struct gspca_dev *gspca_dev) intf = usb_ifnum_to_if(sd->gspca_dev.dev, sd->gspca_dev.iface); alt = usb_altnum_to_altsetting(intf, sd->gspca_dev.alt); if (!alt) { - PDEBUG(D_ERR, "Couldn't get altsetting"); + err("Couldn't get altsetting"); return -EIO; } @@ -386,7 +386,7 @@ static void sd_isoc_irq(struct urb *urb) PDEBUG(D_ERR, "urb status: %d", urb->status); st = usb_submit_urb(urb, GFP_ATOMIC); if (st < 0) - PDEBUG(D_ERR|D_PACK, "resubmit urb error %d", st); + err("resubmit urb error %d", st); return; } @@ -477,7 +477,7 @@ resubmit: } st = usb_submit_urb(status_urb, GFP_ATOMIC); if (st < 0) - PDEBUG(D_ERR|D_PACK, "usb_submit_urb(status_urb) ret %d", st); + err("usb_submit_urb(status_urb) ret %d", st); } static int sd_setbrightness(struct gspca_dev *gspca_dev, __s32 val) diff --git a/drivers/media/video/gspca/mars.c b/drivers/media/video/gspca/mars.c index e21172ef9dee..45be6a872795 100644 --- a/drivers/media/video/gspca/mars.c +++ b/drivers/media/video/gspca/mars.c @@ -150,7 +150,7 @@ static int reg_w(struct gspca_dev *gspca_dev, &alen, 500); /* timeout in milliseconds */ if (ret < 0) - PDEBUG(D_ERR, "reg write [%02x] error %d", + err("reg write [%02x] error %d", gspca_dev->usb_buf[0], ret); return ret; } diff --git a/drivers/media/video/gspca/mr97310a.c b/drivers/media/video/gspca/mr97310a.c index f325b6772515..c6e699b80f12 100644 --- a/drivers/media/video/gspca/mr97310a.c +++ b/drivers/media/video/gspca/mr97310a.c @@ -267,7 +267,7 @@ static int mr_write(struct gspca_dev *gspca_dev, int len) usb_sndbulkpipe(gspca_dev->dev, 4), gspca_dev->usb_buf, len, NULL, 500); if (rc < 0) - PDEBUG(D_ERR, "reg write [%02x] error %d", + err("reg write [%02x] error %d", gspca_dev->usb_buf[0], rc); return rc; } @@ -281,7 +281,7 @@ static int mr_read(struct gspca_dev *gspca_dev, int len) usb_rcvbulkpipe(gspca_dev->dev, 3), gspca_dev->usb_buf, len, NULL, 500); if (rc < 0) - PDEBUG(D_ERR, "reg read [%02x] error %d", + err("reg read [%02x] error %d", gspca_dev->usb_buf[0], rc); return rc; } @@ -540,7 +540,7 @@ static int sd_config(struct gspca_dev *gspca_dev, sd->sensor_type = 1; break; default: - PDEBUG(D_ERR, "Unknown CIF Sensor id : %02x", + err("Unknown CIF Sensor id : %02x", gspca_dev->usb_buf[1]); return -ENODEV; } @@ -575,10 +575,10 @@ static int sd_config(struct gspca_dev *gspca_dev, sd->sensor_type = 2; } else if ((gspca_dev->usb_buf[0] != 0x03) && (gspca_dev->usb_buf[0] != 0x04)) { - PDEBUG(D_ERR, "Unknown VGA Sensor id Byte 0: %02x", + err("Unknown VGA Sensor id Byte 0: %02x", gspca_dev->usb_buf[0]); - PDEBUG(D_ERR, "Defaults assumed, may not work"); - PDEBUG(D_ERR, "Please report this"); + err("Defaults assumed, may not work"); + err("Please report this"); } /* Sakar Digital color needs to be adjusted. */ if ((gspca_dev->usb_buf[0] == 0x03) && @@ -595,12 +595,10 @@ static int sd_config(struct gspca_dev *gspca_dev, /* Nothing to do here. */ break; default: - PDEBUG(D_ERR, - "Unknown VGA Sensor id Byte 1: %02x", + err("Unknown VGA Sensor id Byte 1: %02x", gspca_dev->usb_buf[1]); - PDEBUG(D_ERR, - "Defaults assumed, may not work"); - PDEBUG(D_ERR, "Please report this"); + err("Defaults assumed, may not work"); + err("Please report this"); } } PDEBUG(D_PROBE, "MR97310A VGA camera detected, sensor: %d", diff --git a/drivers/media/video/gspca/ov519.c b/drivers/media/video/gspca/ov519.c index a8ac24a7af8e..307bc8b7b80c 100644 --- a/drivers/media/video/gspca/ov519.c +++ b/drivers/media/video/gspca/ov519.c @@ -1900,7 +1900,7 @@ static int reg_w(struct sd *sd, __u16 index, __u16 value) sd->gspca_dev.usb_buf, 1, 500); leave: if (ret < 0) { - PDEBUG(D_ERR, "Write reg 0x%04x -> [0x%02x] failed", + err("Write reg 0x%04x -> [0x%02x] failed", value, index); return ret; } @@ -1938,7 +1938,7 @@ static int reg_r(struct sd *sd, __u16 index) ret = sd->gspca_dev.usb_buf[0]; PDEBUG(D_USBI, "Read reg [0x%02X] -> 0x%04X", index, ret); } else - PDEBUG(D_ERR, "Read reg [0x%02x] failed", index); + err("Read reg [0x%02x] failed", index); return ret; } @@ -1958,7 +1958,7 @@ static int reg_r8(struct sd *sd, if (ret >= 0) ret = sd->gspca_dev.usb_buf[0]; else - PDEBUG(D_ERR, "Read reg 8 [0x%02x] failed", index); + err("Read reg 8 [0x%02x] failed", index); return ret; } @@ -2006,7 +2006,7 @@ static int ov518_reg_w32(struct sd *sd, __u16 index, u32 value, int n) 0, index, sd->gspca_dev.usb_buf, n, 500); if (ret < 0) { - PDEBUG(D_ERR, "Write reg32 [%02x] %08x failed", index, value); + err("Write reg32 [%02x] %08x failed", index, value); return ret; } @@ -2203,7 +2203,7 @@ static int ovfx2_i2c_w(struct sd *sd, __u8 reg, __u8 value) (__u16)value, (__u16)reg, NULL, 0, 500); if (ret < 0) { - PDEBUG(D_ERR, "i2c 0x%02x -> [0x%02x] failed", value, reg); + err("i2c 0x%02x -> [0x%02x] failed", value, reg); return ret; } @@ -2225,7 +2225,7 @@ static int ovfx2_i2c_r(struct sd *sd, __u8 reg) ret = sd->gspca_dev.usb_buf[0]; PDEBUG(D_USBI, "i2c [0x%02X] -> 0x%02X", reg, ret); } else - PDEBUG(D_ERR, "i2c read [0x%02x] failed", reg); + err("i2c read [0x%02x] failed", reg); return ret; } @@ -2481,7 +2481,7 @@ static int ov_hires_configure(struct sd *sd) int high, low; if (sd->bridge != BRIDGE_OVFX2) { - PDEBUG(D_ERR, "error hires sensors only supported with ovfx2"); + err("error hires sensors only supported with ovfx2"); return -1; } @@ -2498,7 +2498,7 @@ static int ov_hires_configure(struct sd *sd) PDEBUG(D_PROBE, "Sensor is an OV3610"); sd->sensor = SEN_OV3610; } else { - PDEBUG(D_ERR, "Error unknown sensor type: 0x%02x%02x", + err("Error unknown sensor type: 0x%02x%02x", high, low); return -1; } @@ -2526,7 +2526,7 @@ static int ov8xx0_configure(struct sd *sd) if ((rc & 3) == 1) { sd->sensor = SEN_OV8610; } else { - PDEBUG(D_ERR, "Unknown image sensor version: %d", rc & 3); + err("Unknown image sensor version: %d", rc & 3); return -1; } @@ -2589,9 +2589,8 @@ static int ov7xx0_configure(struct sd *sd) if (high == 0x76) { switch (low) { case 0x30: - PDEBUG(D_PROBE, "Sensor is an OV7630/OV7635"); - PDEBUG(D_ERR, - "7630 is not supported by this driver"); + err("Sensor is an OV7630/OV7635"); + err("7630 is not supported by this driver"); return -1; case 0x40: PDEBUG(D_PROBE, "Sensor is an OV7645"); @@ -2614,7 +2613,7 @@ static int ov7xx0_configure(struct sd *sd) sd->sensor = SEN_OV7620; } } else { - PDEBUG(D_ERR, "Unknown image sensor version: %d", rc & 3); + err("Unknown image sensor version: %d", rc & 3); return -1; } @@ -2641,9 +2640,8 @@ static int ov6xx0_configure(struct sd *sd) switch (rc) { case 0x00: sd->sensor = SEN_OV6630; - PDEBUG(D_ERR, - "WARNING: Sensor is an OV66308. Your camera may have"); - PDEBUG(D_ERR, "been misdetected in previous driver versions."); + warn("WARNING: Sensor is an OV66308. Your camera may have"); + warn("been misdetected in previous driver versions."); break; case 0x01: sd->sensor = SEN_OV6620; @@ -2659,12 +2657,11 @@ static int ov6xx0_configure(struct sd *sd) break; case 0x90: sd->sensor = SEN_OV6630; - PDEBUG(D_ERR, - "WARNING: Sensor is an OV66307. Your camera may have"); - PDEBUG(D_ERR, "been misdetected in previous driver versions."); + warn("WARNING: Sensor is an OV66307. Your camera may have"); + warn("been misdetected in previous driver versions."); break; default: - PDEBUG(D_ERR, "FATAL: Unknown sensor version: 0x%02x", rc); + err("FATAL: Unknown sensor version: 0x%02x", rc); return -1; } @@ -3082,7 +3079,7 @@ static int sd_config(struct gspca_dev *gspca_dev, goto error; } } else { - PDEBUG(D_ERR, "Can't determine sensor slave IDs"); + err("Can't determine sensor slave IDs"); goto error; } @@ -3253,7 +3250,7 @@ static int ov511_mode_init_regs(struct sd *sd) intf = usb_ifnum_to_if(sd->gspca_dev.dev, sd->gspca_dev.iface); alt = usb_altnum_to_altsetting(intf, sd->gspca_dev.alt); if (!alt) { - PDEBUG(D_ERR, "Couldn't get altsetting"); + err("Couldn't get altsetting"); return -EIO; } @@ -3377,7 +3374,7 @@ static int ov518_mode_init_regs(struct sd *sd) intf = usb_ifnum_to_if(sd->gspca_dev.dev, sd->gspca_dev.iface); alt = usb_altnum_to_altsetting(intf, sd->gspca_dev.alt); if (!alt) { - PDEBUG(D_ERR, "Couldn't get altsetting"); + err("Couldn't get altsetting"); return -EIO; } diff --git a/drivers/media/video/gspca/ov534.c b/drivers/media/video/gspca/ov534.c index b6ed9d0956a0..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) USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, 0x00, reg, gspca_dev->usb_buf, 1, CTRL_TIMEOUT); if (ret < 0) - PDEBUG(D_ERR, "write failed"); + err("write failed %d", ret); } 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) 0x00, reg, gspca_dev->usb_buf, 1, CTRL_TIMEOUT); PDEBUG(D_USBI, "reg=0x%04x, data=0x%02x", reg, gspca_dev->usb_buf[0]); if (ret < 0) - PDEBUG(D_ERR, "read failed"); + err("read failed %d", ret); return gspca_dev->usb_buf[0]; } @@ -564,7 +564,7 @@ static void sccb_reg_write(struct gspca_dev *gspca_dev, u8 reg, u8 val) ov534_reg_write(gspca_dev, OV534_REG_OPERATION, OV534_OP_WRITE_3); if (!sccb_check_status(gspca_dev)) - PDEBUG(D_ERR, "sccb_reg_write failed"); + err("sccb_reg_write failed"); } 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) ov534_reg_write(gspca_dev, OV534_REG_SUBADDR, reg); ov534_reg_write(gspca_dev, OV534_REG_OPERATION, OV534_OP_WRITE_2); if (!sccb_check_status(gspca_dev)) - PDEBUG(D_ERR, "sccb_reg_read failed 1"); + err("sccb_reg_read failed 1"); ov534_reg_write(gspca_dev, OV534_REG_OPERATION, OV534_OP_READ_2); if (!sccb_check_status(gspca_dev)) - PDEBUG(D_ERR, "sccb_reg_read failed 2"); + err("sccb_reg_read failed 2"); return ov534_reg_read(gspca_dev, OV534_REG_READ); } diff --git a/drivers/media/video/gspca/ov534_9.c b/drivers/media/video/gspca/ov534_9.c index 59e50df2dbdd..e831f0d280ea 100644 --- a/drivers/media/video/gspca/ov534_9.c +++ b/drivers/media/video/gspca/ov534_9.c @@ -785,7 +785,7 @@ static void reg_w_i(struct gspca_dev *gspca_dev, u16 reg, u8 val) USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, 0x00, reg, gspca_dev->usb_buf, 1, CTRL_TIMEOUT); if (ret < 0) { - PDEBUG(D_ERR, "reg_w failed %d", ret); + err("reg_w failed %d", ret); gspca_dev->usb_err = ret; } } @@ -810,7 +810,7 @@ static u8 reg_r(struct gspca_dev *gspca_dev, u16 reg) 0x00, reg, gspca_dev->usb_buf, 1, CTRL_TIMEOUT); PDEBUG(D_USBI, "reg_r [%04x] -> %02x", reg, gspca_dev->usb_buf[0]); if (ret < 0) { - PDEBUG(D_ERR, "reg_r err %d", ret); + err("reg_r err %d", ret); gspca_dev->usb_err = ret; } return gspca_dev->usb_buf[0]; @@ -848,7 +848,7 @@ static void sccb_write(struct gspca_dev *gspca_dev, u8 reg, u8 val) reg_w_i(gspca_dev, OV534_REG_OPERATION, OV534_OP_WRITE_3); if (!sccb_check_status(gspca_dev)) - PDEBUG(D_ERR, "sccb_write failed"); + err("sccb_write failed"); } static u8 sccb_read(struct gspca_dev *gspca_dev, u16 reg) @@ -856,11 +856,11 @@ static u8 sccb_read(struct gspca_dev *gspca_dev, u16 reg) reg_w(gspca_dev, OV534_REG_SUBADDR, reg); reg_w(gspca_dev, OV534_REG_OPERATION, OV534_OP_WRITE_2); if (!sccb_check_status(gspca_dev)) - PDEBUG(D_ERR, "sccb_read failed 1"); + err("sccb_read failed 1"); reg_w(gspca_dev, OV534_REG_OPERATION, OV534_OP_READ_2); if (!sccb_check_status(gspca_dev)) - PDEBUG(D_ERR, "sccb_read failed 2"); + err("sccb_read failed 2"); return reg_r(gspca_dev, OV534_REG_READ); } diff --git a/drivers/media/video/gspca/pac207.c b/drivers/media/video/gspca/pac207.c index 8c711dfb3902..c8da04bd115c 100644 --- a/drivers/media/video/gspca/pac207.c +++ b/drivers/media/video/gspca/pac207.c @@ -178,8 +178,7 @@ static int pac207_write_regs(struct gspca_dev *gspca_dev, u16 index, 0x00, index, gspca_dev->usb_buf, length, PAC207_CTRL_TIMEOUT); if (err < 0) - PDEBUG(D_ERR, - "Failed to write registers to index 0x%04X, error %d)", + err("Failed to write registers to index 0x%04X, error %d)", index, err); return err; @@ -195,7 +194,7 @@ static int pac207_write_reg(struct gspca_dev *gspca_dev, u16 index, u16 value) USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_INTERFACE, value, index, NULL, 0, PAC207_CTRL_TIMEOUT); if (err) - PDEBUG(D_ERR, "Failed to write a register (index 0x%04X," + err("Failed to write a register (index 0x%04X," " value 0x%02X, error %d)", index, value, err); return err; @@ -211,8 +210,7 @@ static int pac207_read_reg(struct gspca_dev *gspca_dev, u16 index) 0x00, index, gspca_dev->usb_buf, 1, PAC207_CTRL_TIMEOUT); if (res < 0) { - PDEBUG(D_ERR, - "Failed to read a register (index 0x%04X, error %d)", + err("Failed to read a register (index 0x%04X, error %d)", index, res); return res; } diff --git a/drivers/media/video/gspca/pac7302.c b/drivers/media/video/gspca/pac7302.c index e50c54a3f738..f41c4edc5fe5 100644 --- a/drivers/media/video/gspca/pac7302.c +++ b/drivers/media/video/gspca/pac7302.c @@ -408,9 +408,8 @@ static void reg_w_buf(struct gspca_dev *gspca_dev, index, gspca_dev->usb_buf, len, 500); if (ret < 0) { - PDEBUG(D_ERR, "reg_w_buf(): " - "Failed to write registers to index 0x%x, error %i", - index, ret); + err("reg_w_buf failed index 0x%02x, error %d", + index, ret); gspca_dev->usb_err = ret; } } @@ -432,9 +431,8 @@ static void reg_w(struct gspca_dev *gspca_dev, 0, index, gspca_dev->usb_buf, 1, 500); if (ret < 0) { - PDEBUG(D_ERR, "reg_w(): " - "Failed to write register to index 0x%x, value 0x%x, error %i", - index, value, ret); + err("reg_w() failed index 0x%02x, value 0x%02x, error %d", + index, value, ret); gspca_dev->usb_err = ret; } } @@ -468,10 +466,9 @@ static void reg_w_page(struct gspca_dev *gspca_dev, 0, index, gspca_dev->usb_buf, 1, 500); if (ret < 0) { - PDEBUG(D_ERR, "reg_w_page(): " - "Failed to write register to index 0x%x, " - "value 0x%x, error %i", - index, page[index], ret); + err("reg_w_page() failed index 0x%02x, " + "value 0x%02x, error %d", + index, page[index], ret); gspca_dev->usb_err = ret; break; } diff --git a/drivers/media/video/gspca/pac7311.c b/drivers/media/video/gspca/pac7311.c index 76989d7cab59..041dffcb5767 100644 --- a/drivers/media/video/gspca/pac7311.c +++ b/drivers/media/video/gspca/pac7311.c @@ -276,9 +276,8 @@ static void reg_w_buf(struct gspca_dev *gspca_dev, index, gspca_dev->usb_buf, len, 500); if (ret < 0) { - PDEBUG(D_ERR, "reg_w_buf(): " - "Failed to write registers to index 0x%x, error %i", - index, ret); + err("reg_w_buf() failed index 0x%02x, error %d", + index, ret); gspca_dev->usb_err = ret; } } @@ -300,9 +299,8 @@ static void reg_w(struct gspca_dev *gspca_dev, 0, index, gspca_dev->usb_buf, 1, 500); if (ret < 0) { - PDEBUG(D_ERR, "reg_w(): " - "Failed to write register to index 0x%x, value 0x%x, error %i", - index, value, ret); + err("reg_w() failed index 0x%02x, value 0x%02x, error %d", + index, value, ret); gspca_dev->usb_err = ret; } } @@ -336,10 +334,9 @@ static void reg_w_page(struct gspca_dev *gspca_dev, 0, index, gspca_dev->usb_buf, 1, 500); if (ret < 0) { - PDEBUG(D_ERR, "reg_w_page(): " - "Failed to write register to index 0x%x, " - "value 0x%x, error %i", - index, page[index], ret); + err("reg_w_page() failed index 0x%02x, " + "value 0x%02x, error %d", + index, page[index], ret); gspca_dev->usb_err = ret; break; } diff --git a/drivers/media/video/gspca/sn9c2028.c b/drivers/media/video/gspca/sn9c2028.c index 198afc85b4cb..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) USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_INTERFACE, 2, 0, gspca_dev->usb_buf, 6, 500); if (rc < 0) { - PDEBUG(D_ERR, "command write [%02x] error %d", + err("command write [%02x] error %d", gspca_dev->usb_buf[0], rc); return rc; } @@ -93,7 +93,7 @@ static int sn9c2028_read1(struct gspca_dev *gspca_dev) USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_INTERFACE, 1, 0, gspca_dev->usb_buf, 1, 500); if (rc != 1) { - PDEBUG(D_ERR, "read1 error %d", rc); + err("read1 error %d", rc); return (rc < 0) ? rc : -EIO; } 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) USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_INTERFACE, 4, 0, gspca_dev->usb_buf, 4, 500); if (rc != 4) { - PDEBUG(D_ERR, "read4 error %d", rc); + err("read4 error %d", rc); return (rc < 0) ? rc : -EIO; } memcpy(reading, gspca_dev->usb_buf, 4); @@ -131,7 +131,7 @@ static int sn9c2028_long_command(struct gspca_dev *gspca_dev, u8 *command) for (i = 0; i < 256 && status < 2; i++) status = sn9c2028_read1(gspca_dev); if (status != 2) { - PDEBUG(D_ERR, "long command status read error %d", status); + err("long command status read error %d", status); return (status < 0) ? status : -EIO; } @@ -638,7 +638,7 @@ static int sd_start(struct gspca_dev *gspca_dev) err_code = start_vivitar_cam(gspca_dev); break; default: - PDEBUG(D_ERR, "Starting unknown camera, please report this"); + err("Starting unknown camera, please report this"); return -ENXIO; } diff --git a/drivers/media/video/gspca/sonixj.c b/drivers/media/video/gspca/sonixj.c index 38b25fbca550..6e410121df25 100644 --- a/drivers/media/video/gspca/sonixj.c +++ b/drivers/media/video/gspca/sonixj.c @@ -1599,7 +1599,7 @@ static void ov7648_probe(struct gspca_dev *gspca_dev) return; } - PDEBUG(D_PROBE, "Unknown sensor %04x", val); + err("Unknown sensor %04x", val); } /* 0c45:6142 sensor may be po2030n, gc0305 or gc0307 */ @@ -1635,7 +1635,7 @@ static void po2030n_probe(struct gspca_dev *gspca_dev) PDEBUG(D_PROBE, "Sensor po2030n"); /* sd->sensor = SENSOR_PO2030N; */ } else { - PDEBUG(D_PROBE, "Unknown sensor ID %04x", val); + err("Unknown sensor ID %04x", val); } } diff --git a/drivers/media/video/gspca/spca1528.c b/drivers/media/video/gspca/spca1528.c index 873d63926548..e64338664410 100644 --- a/drivers/media/video/gspca/spca1528.c +++ b/drivers/media/video/gspca/spca1528.c @@ -171,7 +171,7 @@ static void reg_r(struct gspca_dev *gspca_dev, PDEBUG(D_USBI, "GET %02x 0000 %04x %02x", req, index, gspca_dev->usb_buf[0]); if (ret < 0) { - PDEBUG(D_ERR, "reg_r err %d", ret); + err("reg_r err %d", ret); gspca_dev->usb_err = ret; } } @@ -193,7 +193,7 @@ static void reg_w(struct gspca_dev *gspca_dev, value, index, NULL, 0, 500); if (ret < 0) { - PDEBUG(D_ERR, "reg_w err %d", ret); + err("reg_w err %d", ret); gspca_dev->usb_err = ret; } } @@ -217,7 +217,7 @@ static void reg_wb(struct gspca_dev *gspca_dev, value, index, gspca_dev->usb_buf, 1, 500); if (ret < 0) { - PDEBUG(D_ERR, "reg_w err %d", ret); + err("reg_w err %d", ret); gspca_dev->usb_err = ret; } } diff --git a/drivers/media/video/gspca/spca500.c b/drivers/media/video/gspca/spca500.c index 669717fffe20..8e202b9039f1 100644 --- a/drivers/media/video/gspca/spca500.c +++ b/drivers/media/video/gspca/spca500.c @@ -396,7 +396,7 @@ static int reg_w(struct gspca_dev *gspca_dev, USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, value, index, NULL, 0, 500); if (ret < 0) - PDEBUG(D_ERR, "reg write: error %d", ret); + err("reg write: error %d", ret); return ret; } @@ -418,8 +418,8 @@ static int reg_r_12(struct gspca_dev *gspca_dev, gspca_dev->usb_buf, length, 500); /* timeout */ if (ret < 0) { - PDEBUG(D_ERR, "reg_r_12 err %d", ret); - return -1; + err("reg_r_12 err %d", ret); + return ret; } return (gspca_dev->usb_buf[1] << 8) + gspca_dev->usb_buf[0]; } diff --git a/drivers/media/video/gspca/spca501.c b/drivers/media/video/gspca/spca501.c index 6e2e85c993d4..c4bc520735f3 100644 --- a/drivers/media/video/gspca/spca501.c +++ b/drivers/media/video/gspca/spca501.c @@ -1852,7 +1852,7 @@ static int reg_write(struct usb_device *dev, PDEBUG(D_USBO, "reg write: 0x%02x 0x%02x 0x%02x", req, index, value); if (ret < 0) - PDEBUG(D_ERR, "reg write: error %d", ret); + err("reg write: error %d", ret); return ret; } diff --git a/drivers/media/video/gspca/spca505.c b/drivers/media/video/gspca/spca505.c index 148df0032000..5ad203a1b2d6 100644 --- a/drivers/media/video/gspca/spca505.c +++ b/drivers/media/video/gspca/spca505.c @@ -582,7 +582,7 @@ static int reg_write(struct usb_device *dev, PDEBUG(D_USBO, "reg write: 0x%02x,0x%02x:0x%02x, %d", req, index, value, ret); if (ret < 0) - PDEBUG(D_ERR, "reg write: error %d", ret); + err("reg write: error %d", ret); return ret; } @@ -689,8 +689,7 @@ static int sd_start(struct gspca_dev *gspca_dev) return ret; } if (ret != 0x0101) { - PDEBUG(D_ERR|D_CONF, - "After vector read returns 0x%04x should be 0x0101", + err("After vector read returns 0x%04x should be 0x0101", ret); } diff --git a/drivers/media/video/gspca/spca508.c b/drivers/media/video/gspca/spca508.c index 2ec7f452a9ea..9d5b6666a9ae 100644 --- a/drivers/media/video/gspca/spca508.c +++ b/drivers/media/video/gspca/spca508.c @@ -1276,7 +1276,7 @@ static int reg_write(struct usb_device *dev, PDEBUG(D_USBO, "reg write i:0x%04x = 0x%02x", index, value); if (ret < 0) - PDEBUG(D_ERR|D_USBO, "reg write: error %d", ret); + err("reg write: error %d", ret); return ret; } @@ -1298,7 +1298,7 @@ static int reg_read(struct gspca_dev *gspca_dev, PDEBUG(D_USBI, "reg read i:%04x --> %02x", index, gspca_dev->usb_buf[0]); if (ret < 0) { - PDEBUG(D_ERR|D_USBI, "reg_read err %d", ret); + err("reg_read err %d", ret); return ret; } return gspca_dev->usb_buf[0]; diff --git a/drivers/media/video/gspca/spca561.c b/drivers/media/video/gspca/spca561.c index d561fe9eb553..c530f50307ad 100644 --- a/drivers/media/video/gspca/spca561.c +++ b/drivers/media/video/gspca/spca561.c @@ -315,7 +315,7 @@ static void reg_w_val(struct usb_device *dev, __u16 index, __u8 value) value, index, NULL, 0, 500); PDEBUG(D_USBO, "reg write: 0x%02x:0x%02x", index, value); if (ret < 0) - PDEBUG(D_ERR, "reg write: error %d", ret); + err("reg write: error %d", ret); } static void write_vector(struct gspca_dev *gspca_dev, diff --git a/drivers/media/video/gspca/sq905.c b/drivers/media/video/gspca/sq905.c index 1e39afc5d088..404067745775 100644 --- a/drivers/media/video/gspca/sq905.c +++ b/drivers/media/video/gspca/sq905.c @@ -123,7 +123,7 @@ static int sq905_command(struct gspca_dev *gspca_dev, u16 index) SQ905_COMMAND, index, gspca_dev->usb_buf, 1, SQ905_CMD_TIMEOUT); if (ret < 0) { - PDEBUG(D_ERR, "%s: usb_control_msg failed (%d)", + err("%s: usb_control_msg failed (%d)", __func__, ret); return ret; } @@ -135,7 +135,7 @@ static int sq905_command(struct gspca_dev *gspca_dev, u16 index) SQ905_PING, 0, gspca_dev->usb_buf, 1, SQ905_CMD_TIMEOUT); if (ret < 0) { - PDEBUG(D_ERR, "%s: usb_control_msg failed 2 (%d)", + err("%s: usb_control_msg failed 2 (%d)", __func__, ret); return ret; } @@ -158,7 +158,7 @@ static int sq905_ack_frame(struct gspca_dev *gspca_dev) SQ905_READ_DONE, 0, gspca_dev->usb_buf, 1, SQ905_CMD_TIMEOUT); if (ret < 0) { - PDEBUG(D_ERR, "%s: usb_control_msg failed (%d)", __func__, ret); + err("%s: usb_control_msg failed (%d)", __func__, ret); return ret; } @@ -186,7 +186,7 @@ sq905_read_data(struct gspca_dev *gspca_dev, u8 *data, int size, int need_lock) if (need_lock) mutex_unlock(&gspca_dev->usb_lock); if (ret < 0) { - PDEBUG(D_ERR, "%s: usb_control_msg failed (%d)", __func__, ret); + err("%s: usb_control_msg failed (%d)", __func__, ret); return ret; } ret = usb_bulk_msg(gspca_dev->dev, @@ -195,7 +195,7 @@ sq905_read_data(struct gspca_dev *gspca_dev, u8 *data, int size, int need_lock) /* successful, it returns 0, otherwise negative */ if (ret < 0 || act_len != size) { - PDEBUG(D_ERR, "bulk read fail (%d) len %d/%d", + err("bulk read fail (%d) len %d/%d", ret, act_len, size); return -EIO; } @@ -226,7 +226,7 @@ static void sq905_dostream(struct work_struct *work) buffer = kmalloc(SQ905_MAX_TRANSFER, GFP_KERNEL | GFP_DMA); if (!buffer) { - PDEBUG(D_ERR, "Couldn't allocate USB buffer"); + err("Couldn't allocate USB buffer"); goto quit_stream; } diff --git a/drivers/media/video/gspca/sq905c.c b/drivers/media/video/gspca/sq905c.c index 18c8145bdfb4..c2e88b5303cb 100644 --- a/drivers/media/video/gspca/sq905c.c +++ b/drivers/media/video/gspca/sq905c.c @@ -95,7 +95,7 @@ static int sq905c_command(struct gspca_dev *gspca_dev, u16 command, u16 index) command, index, NULL, 0, SQ905C_CMD_TIMEOUT); if (ret < 0) { - PDEBUG(D_ERR, "%s: usb_control_msg failed (%d)", + err("%s: usb_control_msg failed (%d)", __func__, ret); return ret; } @@ -115,7 +115,7 @@ static int sq905c_read(struct gspca_dev *gspca_dev, u16 command, u16 index, command, index, gspca_dev->usb_buf, size, SQ905C_CMD_TIMEOUT); if (ret < 0) { - PDEBUG(D_ERR, "%s: usb_control_msg failed (%d)", + err("%s: usb_control_msg failed (%d)", __func__, ret); return ret; } @@ -146,7 +146,7 @@ static void sq905c_dostream(struct work_struct *work) buffer = kmalloc(SQ905C_MAX_TRANSFER, GFP_KERNEL | GFP_DMA); if (!buffer) { - PDEBUG(D_ERR, "Couldn't allocate USB buffer"); + err("Couldn't allocate USB buffer"); goto quit_stream; } diff --git a/drivers/media/video/gspca/sq930x.c b/drivers/media/video/gspca/sq930x.c index 8edffed24a0d..3e4b0b94c700 100644 --- a/drivers/media/video/gspca/sq930x.c +++ b/drivers/media/video/gspca/sq930x.c @@ -468,7 +468,7 @@ static void reg_r(struct gspca_dev *gspca_dev, value, 0, gspca_dev->usb_buf, len, 500); if (ret < 0) { - PDEBUG(D_ERR, "reg_r %04x failed %d", value, ret); + err("reg_r %04x failed %d", value, ret); gspca_dev->usb_err = ret; } } @@ -488,7 +488,7 @@ static void reg_w(struct gspca_dev *gspca_dev, u16 value, u16 index) 500); msleep(30); if (ret < 0) { - PDEBUG(D_ERR, "reg_w %04x %04x failed %d", value, index, ret); + err("reg_w %04x %04x failed %d", value, index, ret); gspca_dev->usb_err = ret; } } @@ -511,7 +511,7 @@ static void reg_wb(struct gspca_dev *gspca_dev, u16 value, u16 index, 1000); msleep(30); if (ret < 0) { - PDEBUG(D_ERR, "reg_wb %04x %04x failed %d", value, index, ret); + err("reg_wb %04x %04x failed %d", value, index, ret); gspca_dev->usb_err = ret; } } @@ -556,7 +556,7 @@ static void i2c_write(struct sd *sd, gspca_dev->usb_buf, buf - gspca_dev->usb_buf, 500); if (ret < 0) { - PDEBUG(D_ERR, "i2c_write failed %d", ret); + err("i2c_write failed %d", ret); gspca_dev->usb_err = ret; } } @@ -612,7 +612,7 @@ static void ucbus_write(struct gspca_dev *gspca_dev, gspca_dev->usb_buf, buf - gspca_dev->usb_buf, 500); if (ret < 0) { - PDEBUG(D_ERR, "ucbus_write failed %d", ret); + err("ucbus_write failed %d", ret); gspca_dev->usb_err = ret; return; } @@ -688,7 +688,7 @@ static void cmos_probe(struct gspca_dev *gspca_dev) break; } if (i >= ARRAY_SIZE(probe_order)) - PDEBUG(D_PROBE, "Unknown sensor"); + err("Unknown sensor"); else sd->sensor = probe_order[i]; } @@ -1079,7 +1079,7 @@ static void sd_dq_callback(struct gspca_dev *gspca_dev) gspca_dev->cam.bulk_nurbs = 1; ret = usb_submit_urb(gspca_dev->urb[0], GFP_ATOMIC); if (ret < 0) - PDEBUG(D_ERR|D_PACK, "sd_dq_callback() err %d", ret); + err("sd_dq_callback() err %d", ret); /* wait a little time, otherwise the webcam crashes */ msleep(100); diff --git a/drivers/media/video/gspca/stk014.c b/drivers/media/video/gspca/stk014.c index 3266a5397170..14601d887c4f 100644 --- a/drivers/media/video/gspca/stk014.c +++ b/drivers/media/video/gspca/stk014.c @@ -142,7 +142,7 @@ static u8 reg_r(struct gspca_dev *gspca_dev, gspca_dev->usb_buf, 1, 500); if (ret < 0) { - PDEBUG(D_ERR, "reg_r err %d", ret); + err("reg_r err %d", ret); gspca_dev->usb_err = ret; return 0; } @@ -167,7 +167,7 @@ static void reg_w(struct gspca_dev *gspca_dev, 0, 500); if (ret < 0) { - PDEBUG(D_ERR, "reg_w err %d", ret); + err("reg_w err %d", ret); gspca_dev->usb_err = ret; } } @@ -197,7 +197,7 @@ static void rcv_val(struct gspca_dev *gspca_dev, &alen, 500); /* timeout in milliseconds */ if (ret < 0) { - PDEBUG(D_ERR, "rcv_val err %d", ret); + err("rcv_val err %d", ret); gspca_dev->usb_err = ret; } } @@ -240,7 +240,7 @@ static void snd_val(struct gspca_dev *gspca_dev, &alen, 500); /* timeout in milliseconds */ if (ret < 0) { - PDEBUG(D_ERR, "snd_val err %d", ret); + err("snd_val err %d", ret); gspca_dev->usb_err = ret; } else { if (ads == 0x003f08) { @@ -323,7 +323,7 @@ static int sd_init(struct gspca_dev *gspca_dev) ret = reg_r(gspca_dev, 0x0740); if (gspca_dev->usb_err >= 0) { if (ret != 0xff) { - PDEBUG(D_ERR|D_STREAM, "init reg: 0x%02x", ret); + err("init reg: 0x%02x", ret); gspca_dev->usb_err = -EIO; } } @@ -357,7 +357,7 @@ static int sd_start(struct gspca_dev *gspca_dev) gspca_dev->iface, gspca_dev->alt); if (ret < 0) { - PDEBUG(D_ERR|D_STREAM, "set intf %d %d failed", + err("set intf %d %d failed", gspca_dev->iface, gspca_dev->alt); gspca_dev->usb_err = ret; goto out; diff --git a/drivers/media/video/gspca/stv0680.c b/drivers/media/video/gspca/stv0680.c index 4cc1c0ad1b92..b199ad4666bd 100644 --- a/drivers/media/video/gspca/stv0680.c +++ b/drivers/media/video/gspca/stv0680.c @@ -79,8 +79,7 @@ static int stv_sndctrl(struct gspca_dev *gspca_dev, int set, u8 req, u16 val, val, 0, gspca_dev->usb_buf, size, 500); if ((ret < 0) && (req != 0x0a)) - PDEBUG(D_ERR, - "usb_control_msg error %i, request = 0x%x, error = %i", + err("usb_control_msg error %i, request = 0x%x, error = %i", set, req, ret); return ret; @@ -237,7 +236,7 @@ static int sd_config(struct gspca_dev *gspca_dev, if (stv_sndctrl(gspca_dev, 2, 0x06, 0x0100, 0x12) != 0x12 || gspca_dev->usb_buf[8] != 0x53 || gspca_dev->usb_buf[9] != 0x05) { - PDEBUG(D_ERR, "Could not get descriptor 0100."); + err("Could not get descriptor 0100."); return stv0680_handle_error(gspca_dev, -EIO); } diff --git a/drivers/media/video/gspca/stv06xx/stv06xx.c b/drivers/media/video/gspca/stv06xx/stv06xx.c index ffb49228c8bd..b818ab80304c 100644 --- a/drivers/media/video/gspca/stv06xx/stv06xx.c +++ b/drivers/media/video/gspca/stv06xx/stv06xx.c @@ -189,7 +189,7 @@ int stv06xx_read_sensor(struct sd *sd, const u8 address, u16 *value) 0x04, 0x40, 0x1400, 0, buf, I2C_BUFFER_LENGTH, STV06XX_URB_MSG_TIMEOUT); if (err < 0) { - PDEBUG(D_ERR, "I2C: Read error writing address: %d", err); + err("I2C: Read error writing address: %d", err); return err; } diff --git a/drivers/media/video/gspca/stv06xx/stv06xx_st6422.c b/drivers/media/video/gspca/stv06xx/stv06xx_st6422.c index c11f06e4ae76..3af53264a364 100644 --- a/drivers/media/video/gspca/stv06xx/stv06xx_st6422.c +++ b/drivers/media/video/gspca/stv06xx/stv06xx_st6422.c @@ -246,7 +246,7 @@ static int st6422_start(struct sd *sd) intf = usb_ifnum_to_if(sd->gspca_dev.dev, sd->gspca_dev.iface); alt = usb_altnum_to_altsetting(intf, sd->gspca_dev.alt); if (!alt) { - PDEBUG(D_ERR, "Couldn't get altsetting"); + err("Couldn't get altsetting"); return -EIO; } diff --git a/drivers/media/video/gspca/sunplus.c b/drivers/media/video/gspca/sunplus.c index 7cd5582a0bd0..d46a39f02afb 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, len ? gspca_dev->usb_buf : NULL, len, 500); if (ret < 0) { - PDEBUG(D_ERR, "reg_r err %d", ret); + err("reg_r err %d", ret); gspca_dev->usb_err = ret; } } @@ -368,7 +368,7 @@ static void reg_w_1(struct gspca_dev *gspca_dev, gspca_dev->usb_buf, 1, 500); if (ret < 0) { - PDEBUG(D_ERR, "reg_w_1 err %d", ret); + err("reg_w_1 err %d", ret); gspca_dev->usb_err = ret; } } @@ -388,7 +388,7 @@ static void reg_w_riv(struct gspca_dev *gspca_dev, USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, value, index, NULL, 0, 500); if (ret < 0) { - PDEBUG(D_ERR, "reg_w_riv err %d", ret); + err("reg_w_riv err %d", ret); gspca_dev->usb_err = ret; return; } @@ -413,7 +413,7 @@ static u8 reg_r_1(struct gspca_dev *gspca_dev, gspca_dev->usb_buf, 1, 500); /* timeout */ if (ret < 0) { - PDEBUG(D_ERR, "reg_r_1 err %d", ret); + err("reg_r_1 err %d", ret); gspca_dev->usb_err = ret; return 0; } @@ -440,7 +440,7 @@ static u16 reg_r_12(struct gspca_dev *gspca_dev, gspca_dev->usb_buf, length, 500); if (ret < 0) { - PDEBUG(D_ERR, "reg_r_12 err %d", ret); + err("reg_r_12 err %d", ret); gspca_dev->usb_err = ret; return 0; } diff --git a/drivers/media/video/gspca/t613.c b/drivers/media/video/gspca/t613.c index 3818e87939ef..b45f4d0f3997 100644 --- a/drivers/media/video/gspca/t613.c +++ b/drivers/media/video/gspca/t613.c @@ -892,7 +892,7 @@ static int sd_init(struct gspca_dev *gspca_dev) sd->sensor = SENSOR_OM6802; break; default: - PDEBUG(D_ERR|D_PROBE, "unknown sensor %04x", sensor_id); + err("unknown sensor %04x", sensor_id); return -EINVAL; } diff --git a/drivers/media/video/gspca/vc032x.c b/drivers/media/video/gspca/vc032x.c index eb7b1210d757..38a6efe1a5f9 100644 --- a/drivers/media/video/gspca/vc032x.c +++ b/drivers/media/video/gspca/vc032x.c @@ -3164,7 +3164,7 @@ static void reg_r_i(struct gspca_dev *gspca_dev, index, gspca_dev->usb_buf, len, 500); if (ret < 0) { - PDEBUG(D_ERR, "reg_r err %d", ret); + err("reg_r err %d", ret); gspca_dev->usb_err = ret; } } @@ -3205,7 +3205,7 @@ static void reg_w_i(struct gspca_dev *gspca_dev, value, index, NULL, 0, 500); if (ret < 0) { - PDEBUG(D_ERR, "reg_w err %d", ret); + err("reg_w err %d", ret); gspca_dev->usb_err = ret; } } @@ -3230,7 +3230,7 @@ static u16 read_sensor_register(struct gspca_dev *gspca_dev, reg_r(gspca_dev, 0xa1, 0xb33f, 1); if (!(gspca_dev->usb_buf[0] & 0x02)) { - PDEBUG(D_ERR, "I2c Bus Busy Wait %02x", + err("I2c Bus Busy Wait %02x", gspca_dev->usb_buf[0]); return 0; } @@ -3344,7 +3344,7 @@ static void i2c_write(struct gspca_dev *gspca_dev, msleep(20); } while (--retry > 0); if (retry <= 0) - PDEBUG(D_ERR, "i2c_write timeout"); + err("i2c_write timeout"); } static void put_tab_to_reg(struct gspca_dev *gspca_dev, @@ -3440,7 +3440,7 @@ static int sd_init(struct gspca_dev *gspca_dev) switch (sensor) { case -1: - PDEBUG(D_PROBE, "Unknown sensor..."); + err("Unknown sensor..."); return -EINVAL; case SENSOR_HV7131R: PDEBUG(D_PROBE, "Find Sensor HV7131R"); diff --git a/drivers/media/video/gspca/w996Xcf.c b/drivers/media/video/gspca/w996Xcf.c index 38a68591ce48..1c6c89419577 100644 --- a/drivers/media/video/gspca/w996Xcf.c +++ b/drivers/media/video/gspca/w996Xcf.c @@ -78,7 +78,7 @@ static int w9968cf_write_fsb(struct sd *sd, u16* data) USB_TYPE_VENDOR | USB_DIR_OUT | USB_RECIP_DEVICE, value, 0x06, sd->gspca_dev.usb_buf, 6, 500); if (ret < 0) { - PDEBUG(D_ERR, "Write FSB registers failed (%d)", ret); + err("Write FSB registers failed (%d)", ret); return ret; } @@ -104,7 +104,7 @@ static int w9968cf_write_sb(struct sd *sd, u16 value) udelay(W9968CF_I2C_BUS_DELAY); if (ret < 0) { - PDEBUG(D_ERR, "Write SB reg [01] %04x failed", value); + err("Write SB reg [01] %04x failed", value); return ret; } @@ -130,7 +130,7 @@ static int w9968cf_read_sb(struct sd *sd) ret = sd->gspca_dev.usb_buf[0] | (sd->gspca_dev.usb_buf[1] << 8); else - PDEBUG(D_ERR, "Read SB reg [01] failed"); + err("Read SB reg [01] failed"); udelay(W9968CF_I2C_BUS_DELAY); diff --git a/drivers/media/video/gspca/xirlink_cit.c b/drivers/media/video/gspca/xirlink_cit.c index 36aa44f2464f..8715577bc2d8 100644 --- a/drivers/media/video/gspca/xirlink_cit.c +++ b/drivers/media/video/gspca/xirlink_cit.c @@ -798,7 +798,7 @@ static int cit_write_reg(struct gspca_dev *gspca_dev, u16 value, u16 index) USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_ENDPOINT, value, index, NULL, 0, 1000); if (err < 0) - PDEBUG(D_ERR, "Failed to write a register (index 0x%04X," + err("Failed to write a register (index 0x%04X," " value 0x%02X, error %d)", index, value, err); return 0; @@ -814,8 +814,7 @@ static int cit_read_reg(struct gspca_dev *gspca_dev, u16 index) USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_ENDPOINT, 0x00, index, buf, 8, 1000); if (res < 0) { - PDEBUG(D_ERR, - "Failed to read a register (index 0x%04X, error %d)", + err("Failed to read a register (index 0x%04X, error %d)", index, res); return res; } @@ -1586,7 +1585,7 @@ static int cit_get_packet_size(struct gspca_dev *gspca_dev) intf = usb_ifnum_to_if(gspca_dev->dev, gspca_dev->iface); alt = usb_altnum_to_altsetting(intf, gspca_dev->alt); if (!alt) { - PDEBUG(D_ERR, "Couldn't get altsetting"); + err("Couldn't get altsetting"); return -EIO; } @@ -2784,7 +2783,7 @@ static int sd_isoc_nego(struct gspca_dev *gspca_dev) ret = usb_set_interface(gspca_dev->dev, gspca_dev->iface, 1); if (ret < 0) - PDEBUG(D_ERR|D_STREAM, "set alt 1 err %d", ret); + err("set alt 1 err %d", ret); return ret; } diff --git a/drivers/media/video/gspca/zc3xx.c b/drivers/media/video/gspca/zc3xx.c index 71d2b1be6f66..e2f1a0e1e2c2 100644 --- a/drivers/media/video/gspca/zc3xx.c +++ b/drivers/media/video/gspca/zc3xx.c @@ -5698,7 +5698,7 @@ static u8 reg_r_i(struct gspca_dev *gspca_dev, index, gspca_dev->usb_buf, 1, 500); if (ret < 0) { - PDEBUG(D_ERR, "reg_r_i err %d", ret); + err("reg_r_i err %d", ret); gspca_dev->usb_err = ret; return 0; } @@ -5730,7 +5730,7 @@ static void reg_w_i(struct gspca_dev *gspca_dev, value, index, NULL, 0, 500); if (ret < 0) { - PDEBUG(D_ERR, "reg_w_i err %d", ret); + err("reg_w_i err %d", ret); gspca_dev->usb_err = ret; } } @@ -6503,8 +6503,7 @@ static int sd_init(struct gspca_dev *gspca_dev) PDEBUG(D_PROBE, "Sensor Tas5130 (VF0250)"); break; default: - PDEBUG(D_PROBE, - "Unknown sensor - set to TAS5130C"); + warn("Unknown sensor - set to TAS5130C"); sd->sensor = SENSOR_TAS5130C; } break; @@ -6610,7 +6609,7 @@ static int sd_init(struct gspca_dev *gspca_dev) sd->sensor = SENSOR_OV7620; /* same sensor (?) */ break; default: - PDEBUG(D_ERR|D_PROBE, "Unknown sensor %04x", sensor); + err("Unknown sensor %04x", sensor); return -EINVAL; } } |