diff options
author | Theodore Kilgore <kilgota@banach.math.auburn.edu> | 2013-02-04 17:17:55 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-03-05 19:13:48 +0100 |
commit | c93396e13576928a073154b5715761ff8a998368 (patch) | |
tree | 2ef9873a27412fe6d5dbe361d7298301510573f6 /drivers/media/usb/gspca/cpia1.c | |
parent | [media] gspca: Remove old control code now that all drivers are converted (diff) | |
download | linux-c93396e13576928a073154b5715761ff8a998368.tar.xz linux-c93396e13576928a073154b5715761ff8a998368.zip |
[media] gspca: Remove gspca-specific debug magic
Instead use v4l2_dbg and v4l2_err. Note that the PDEBUG macro is kept to
make this patch-set less invasive, but it is simply a wrapper around
v4l2_dbg now. Most of the other changes are there to make the dev parameter
for the v4l2_xxx macros available everywhere we do logging.
Signed-off-by: Theodore Kilgore <kilgota@auburn.edu>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/usb/gspca/cpia1.c')
-rw-r--r-- | drivers/media/usb/gspca/cpia1.c | 33 |
1 files changed, 15 insertions, 18 deletions
diff --git a/drivers/media/usb/gspca/cpia1.c b/drivers/media/usb/gspca/cpia1.c index 1dcdd9f95f1c..064b53043b15 100644 --- a/drivers/media/usb/gspca/cpia1.c +++ b/drivers/media/usb/gspca/cpia1.c @@ -421,8 +421,7 @@ static int cpia_usb_transferCmd(struct gspca_dev *gspca_dev, u8 *command) pipe = usb_sndctrlpipe(gspca_dev->dev, 0); requesttype = USB_TYPE_VENDOR | USB_RECIP_DEVICE; } else { - PDEBUG(D_ERR, "Unexpected first byte of command: %x", - command[0]); + PERR("Unexpected first byte of command: %x", command[0]); return -EINVAL; } @@ -701,7 +700,7 @@ static void reset_camera_params(struct gspca_dev *gspca_dev) params->qx3.cradled = 0; } -static void printstatus(struct cam_params *params) +static void printstatus(struct gspca_dev *gspca_dev, struct cam_params *params) { PDEBUG(D_PROBE, "status: %02x %02x %02x %02x %02x %02x %02x %02x", params->status.systemState, params->status.grabState, @@ -725,10 +724,9 @@ static int goto_low_power(struct gspca_dev *gspca_dev) if (sd->params.status.systemState != LO_POWER_STATE) { if (sd->params.status.systemState != WARM_BOOT_STATE) { - PDEBUG(D_ERR, - "unexpected state after lo power cmd: %02x", - sd->params.status.systemState); - printstatus(&sd->params); + PERR("unexpected state after lo power cmd: %02x", + sd->params.status.systemState); + printstatus(gspca_dev, &sd->params); } return -EIO; } @@ -756,9 +754,9 @@ static int goto_high_power(struct gspca_dev *gspca_dev) return ret; if (sd->params.status.systemState != HI_POWER_STATE) { - PDEBUG(D_ERR, "unexpected state after hi power cmd: %02x", - sd->params.status.systemState); - printstatus(&sd->params); + PERR("unexpected state after hi power cmd: %02x", + sd->params.status.systemState); + printstatus(gspca_dev, &sd->params); return -EIO; } @@ -1449,8 +1447,8 @@ static int sd_config(struct gspca_dev *gspca_dev, sd->params.version.firmwareVersion = 0; get_version_information(gspca_dev); if (sd->params.version.firmwareVersion != 1) { - PDEBUG(D_ERR, "only firmware version 1 is supported (got: %d)", - sd->params.version.firmwareVersion); + PERR("only firmware version 1 is supported (got: %d)", + sd->params.version.firmwareVersion); return -ENODEV; } @@ -1475,9 +1473,9 @@ static int sd_start(struct gspca_dev *gspca_dev) /* Start the camera in low power mode */ if (goto_low_power(gspca_dev)) { if (sd->params.status.systemState != WARM_BOOT_STATE) { - PDEBUG(D_ERR, "unexpected systemstate: %02x", - sd->params.status.systemState); - printstatus(&sd->params); + PERR("unexpected systemstate: %02x", + sd->params.status.systemState); + printstatus(gspca_dev, &sd->params); return -ENODEV; } @@ -1523,9 +1521,8 @@ static int sd_start(struct gspca_dev *gspca_dev) return ret; if (sd->params.status.fatalError) { - PDEBUG(D_ERR, "fatal_error: %04x, vp_status: %04x", - sd->params.status.fatalError, - sd->params.status.vpStatus); + PERR("fatal_error: %04x, vp_status: %04x", + sd->params.status.fatalError, sd->params.status.vpStatus); return -EIO; } |