diff options
author | Joe Perches <joe@perches.com> | 2017-09-22 20:33:35 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-12-08 16:08:50 +0100 |
commit | 52173c5f3f6476eb9100691ec47b10d6740eed4a (patch) | |
tree | 0aa21aa9e5da8c384381c9213c3ff2f2045e0df2 /drivers/media/usb/gspca/cpia1.c | |
parent | media: stk-webcam: Fix use after free on disconnect (diff) | |
download | linux-52173c5f3f6476eb9100691ec47b10d6740eed4a.tar.xz linux-52173c5f3f6476eb9100691ec47b10d6740eed4a.zip |
media: gspca: Convert PERR to gspca_err
Use a more typical kernel logging style.
The current macro hides the gspca_dev argument so add it to the
macro uses instead.
Miscellanea:
o Add missing '\n' terminations to formats
o Realign arguments to open parenthesis
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/usb/gspca/cpia1.c')
-rw-r--r-- | drivers/media/usb/gspca/cpia1.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/drivers/media/usb/gspca/cpia1.c b/drivers/media/usb/gspca/cpia1.c index e91d00762e94..99b456d64729 100644 --- a/drivers/media/usb/gspca/cpia1.c +++ b/drivers/media/usb/gspca/cpia1.c @@ -419,7 +419,8 @@ 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 { - PERR("Unexpected first byte of command: %x", command[0]); + gspca_err(gspca_dev, "Unexpected first byte of command: %x\n", + command[0]); return -EINVAL; } @@ -722,8 +723,8 @@ 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) { - PERR("unexpected state after lo power cmd: %02x", - sd->params.status.systemState); + gspca_err(gspca_dev, "unexpected state after lo power cmd: %02x\n", + sd->params.status.systemState); printstatus(gspca_dev, &sd->params); } return -EIO; @@ -752,8 +753,8 @@ static int goto_high_power(struct gspca_dev *gspca_dev) return ret; if (sd->params.status.systemState != HI_POWER_STATE) { - PERR("unexpected state after hi power cmd: %02x", - sd->params.status.systemState); + gspca_err(gspca_dev, "unexpected state after hi power cmd: %02x\n", + sd->params.status.systemState); printstatus(gspca_dev, &sd->params); return -EIO; } @@ -1445,8 +1446,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) { - PERR("only firmware version 1 is supported (got: %d)", - sd->params.version.firmwareVersion); + gspca_err(gspca_dev, "only firmware version 1 is supported (got: %d)\n", + sd->params.version.firmwareVersion); return -ENODEV; } @@ -1471,8 +1472,8 @@ 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) { - PERR("unexpected systemstate: %02x", - sd->params.status.systemState); + gspca_err(gspca_dev, "unexpected systemstate: %02x\n", + sd->params.status.systemState); printstatus(gspca_dev, &sd->params); return -ENODEV; } @@ -1519,8 +1520,9 @@ static int sd_start(struct gspca_dev *gspca_dev) return ret; if (sd->params.status.fatalError) { - PERR("fatal_error: %04x, vp_status: %04x", - sd->params.status.fatalError, sd->params.status.vpStatus); + gspca_err(gspca_dev, "fatal_error: %04x, vp_status: %04x\n", + sd->params.status.fatalError, + sd->params.status.vpStatus); return -EIO; } |