diff options
author | Joe Perches <joe@perches.com> | 2017-09-22 22:20:33 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-12-08 18:10:15 +0300 |
commit | 37d5efb01910752d8d3846a2c4db0528c1dfa137 (patch) | |
tree | f47a9f8305b6de30b9be179f93f21b8d7ca962e8 /drivers/media/usb/gspca/sunplus.c | |
parent | 52173c5f3f6476eb9100691ec47b10d6740eed4a (diff) | |
download | linux-37d5efb01910752d8d3846a2c4db0528c1dfa137.tar.xz |
media: gspca: Convert PDEBUG to gspca_dbg
Use a more typical 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
o Remove commented out uses of PDEBUG
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/sunplus.c')
-rw-r--r-- | drivers/media/usb/gspca/sunplus.c | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/drivers/media/usb/gspca/sunplus.c b/drivers/media/usb/gspca/sunplus.c index 44b07344f0f7..437a3367ab97 100644 --- a/drivers/media/usb/gspca/sunplus.c +++ b/drivers/media/usb/gspca/sunplus.c @@ -311,8 +311,8 @@ static void reg_w_riv(struct gspca_dev *gspca_dev, gspca_dev->usb_err = ret; return; } - PDEBUG(D_USBO, "reg_w_riv: 0x%02x,0x%04x:0x%04x", - req, index, value); + gspca_dbg(gspca_dev, D_USBO, "reg_w_riv: 0x%02x,0x%04x:0x%04x\n", + req, index, value); } static void write_vector(struct gspca_dev *gspca_dev, @@ -343,12 +343,14 @@ static void spca504_acknowledged_command(struct gspca_dev *gspca_dev, { reg_w_riv(gspca_dev, req, idx, val); reg_r(gspca_dev, 0x01, 0x0001, 1); - PDEBUG(D_FRAM, "before wait 0x%04x", gspca_dev->usb_buf[0]); + gspca_dbg(gspca_dev, D_FRAM, "before wait 0x%04x\n", + gspca_dev->usb_buf[0]); reg_w_riv(gspca_dev, req, idx, val); msleep(200); reg_r(gspca_dev, 0x01, 0x0001, 1); - PDEBUG(D_FRAM, "after wait 0x%04x", gspca_dev->usb_buf[0]); + gspca_dbg(gspca_dev, D_FRAM, "after wait 0x%04x\n", + gspca_dev->usb_buf[0]); } static void spca504_read_info(struct gspca_dev *gspca_dev) @@ -363,10 +365,10 @@ static void spca504_read_info(struct gspca_dev *gspca_dev) reg_r(gspca_dev, 0, i, 1); info[i] = gspca_dev->usb_buf[0]; } - PDEBUG(D_STREAM, - "Read info: %d %d %d %d %d %d. Should be 1,0,2,2,0,0", - info[0], info[1], info[2], - info[3], info[4], info[5]); + gspca_dbg(gspca_dev, D_STREAM, + "Read info: %d %d %d %d %d %d. Should be 1,0,2,2,0,0\n", + info[0], info[1], info[2], + info[3], info[4], info[5]); } static void spca504A_acknowledged_command(struct gspca_dev *gspca_dev, @@ -379,8 +381,8 @@ static void spca504A_acknowledged_command(struct gspca_dev *gspca_dev, reg_r(gspca_dev, 0x01, 0x0001, 1); if (gspca_dev->usb_err < 0) return; - PDEBUG(D_FRAM, "Status 0x%02x Need 0x%02x", - gspca_dev->usb_buf[0], endcode); + gspca_dbg(gspca_dev, D_FRAM, "Status 0x%02x Need 0x%02x\n", + gspca_dev->usb_buf[0], endcode); if (!count) return; count = 200; @@ -391,8 +393,8 @@ static void spca504A_acknowledged_command(struct gspca_dev *gspca_dev, reg_r(gspca_dev, 0x01, 0x0001, 1); status = gspca_dev->usb_buf[0]; if (status == endcode) { - PDEBUG(D_FRAM, "status 0x%04x after wait %d", - status, 200 - count); + gspca_dbg(gspca_dev, D_FRAM, "status 0x%04x after wait %d\n", + status, 200 - count); break; } } @@ -435,8 +437,8 @@ static void spca50x_GetFirmware(struct gspca_dev *gspca_dev) data = gspca_dev->usb_buf; reg_r(gspca_dev, 0x20, 0, 5); - PDEBUG(D_STREAM, "FirmWare: %d %d %d %d %d", - data[0], data[1], data[2], data[3], data[4]); + gspca_dbg(gspca_dev, D_STREAM, "FirmWare: %d %d %d %d %d\n", + data[0], data[1], data[2], data[3], data[4]); reg_r(gspca_dev, 0x23, 0, 64); reg_r(gspca_dev, 0x23, 1, 64); } @@ -651,7 +653,7 @@ static int sd_init(struct gspca_dev *gspca_dev) spca504B_WaitCmdStatus(gspca_dev); break; case BRIDGE_SPCA504C: /* pccam600 */ - PDEBUG(D_STREAM, "Opening SPCA504 (PC-CAM 600)"); + gspca_dbg(gspca_dev, D_STREAM, "Opening SPCA504 (PC-CAM 600)\n"); reg_w_riv(gspca_dev, 0xe0, 0x0000, 0x0000); reg_w_riv(gspca_dev, 0xe0, 0x0000, 0x0001); /* reset */ spca504_wait_status(gspca_dev); @@ -666,7 +668,7 @@ static int sd_init(struct gspca_dev *gspca_dev) break; default: /* case BRIDGE_SPCA504: */ - PDEBUG(D_STREAM, "Opening SPCA504"); + gspca_dbg(gspca_dev, D_STREAM, "Opening SPCA504\n"); if (sd->subtype == AiptekMiniPenCam13) { spca504_read_info(gspca_dev); |