From 37d5efb01910752d8d3846a2c4db0528c1dfa137 Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Fri, 22 Sep 2017 15:20:33 -0400 Subject: 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 Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- drivers/media/usb/gspca/nw80x.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'drivers/media/usb/gspca/nw80x.c') diff --git a/drivers/media/usb/gspca/nw80x.c b/drivers/media/usb/gspca/nw80x.c index 5d2d0bcb038d..bedc04a72e97 100644 --- a/drivers/media/usb/gspca/nw80x.c +++ b/drivers/media/usb/gspca/nw80x.c @@ -1543,10 +1543,11 @@ static void reg_w(struct gspca_dev *gspca_dev, if (gspca_dev->usb_err < 0) return; if (len == 1) - PDEBUG(D_USBO, "SET 00 0000 %04x %02x", index, *data); + gspca_dbg(gspca_dev, D_USBO, "SET 00 0000 %04x %02x\n", + index, *data); else - PDEBUG(D_USBO, "SET 00 0000 %04x %02x %02x ...", - index, *data, data[1]); + gspca_dbg(gspca_dev, D_USBO, "SET 00 0000 %04x %02x %02x ...\n", + index, *data, data[1]); memcpy(gspca_dev->usb_buf, data, len); ret = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), 0x00, @@ -1583,12 +1584,12 @@ static void reg_r(struct gspca_dev *gspca_dev, return; } if (len == 1) - PDEBUG(D_USBI, "GET 00 0000 %04x %02x", - index, gspca_dev->usb_buf[0]); + gspca_dbg(gspca_dev, D_USBI, "GET 00 0000 %04x %02x\n", + index, gspca_dev->usb_buf[0]); else - PDEBUG(D_USBI, "GET 00 0000 %04x %02x %02x ..", - index, gspca_dev->usb_buf[0], - gspca_dev->usb_buf[1]); + gspca_dbg(gspca_dev, D_USBI, "GET 00 0000 %04x %02x %02x ..\n", + index, gspca_dev->usb_buf[0], + gspca_dev->usb_buf[1]); } static void i2c_w(struct gspca_dev *gspca_dev, @@ -1762,8 +1763,8 @@ static int sd_config(struct gspca_dev *gspca_dev, sd->webcam = P35u; } else if (id->idVendor == 0x06a5 && id->idProduct == 0xd800) { reg_r(gspca_dev, 0x0403, 1); /* GPIO */ - PDEBUG(D_PROBE, "et31x110 sensor type %02x", - gspca_dev->usb_buf[0]); + gspca_dbg(gspca_dev, D_PROBE, "et31x110 sensor type %02x\n", + gspca_dev->usb_buf[0]); switch (gspca_dev->usb_buf[0] >> 1) { case 0x00: /* ?? */ if (sd->webcam == Generic800) @@ -1785,7 +1786,8 @@ static int sd_config(struct gspca_dev *gspca_dev, gspca_dev->usb_err = -ENODEV; return gspca_dev->usb_err; } - PDEBUG(D_PROBE, "Bridge nw80%d - type: %d", sd->bridge, sd->webcam); + gspca_dbg(gspca_dev, D_PROBE, "Bridge nw80%d - type: %d\n", + sd->bridge, sd->webcam); if (sd->bridge == BRIDGE_NW800) { switch (sd->webcam) { -- cgit