From b7085c08647598aafbf8f6223ebcdd413745449c Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sun, 2 Nov 2014 07:21:44 -0300 Subject: [media] cx231xx: convert from pr_foo to dev_foo Replace all pr_foo occurrences by dev_foo, as this is the recommended way for drivers. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/usb/cx231xx/cx231xx-417.c | 38 +++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 14 deletions(-) (limited to 'drivers/media/usb/cx231xx/cx231xx-417.c') diff --git a/drivers/media/usb/cx231xx/cx231xx-417.c b/drivers/media/usb/cx231xx/cx231xx-417.c index a0d1156d1df1..0773da4dc29b 100644 --- a/drivers/media/usb/cx231xx/cx231xx-417.c +++ b/drivers/media/usb/cx231xx/cx231xx-417.c @@ -39,7 +39,6 @@ #include #include #include -#include #define CX231xx_FIRM_IMAGE_SIZE 376836 #define CX231xx_FIRM_IMAGE_NAME "v4l-cx23885-enc.fw" @@ -988,7 +987,8 @@ static int cx231xx_load_firmware(struct cx231xx *dev) IVTV_REG_APU, 0); if (retval != 0) { - pr_err("%s: Error with mc417_register_write\n", __func__); + dev_err(&dev->udev->dev, + "%s: Error with mc417_register_write\n", __func__); return -1; } @@ -996,21 +996,25 @@ static int cx231xx_load_firmware(struct cx231xx *dev) &dev->udev->dev); if (retval != 0) { - pr_err("ERROR: Hotplug firmware request failed (%s).\n", + dev_err(&dev->udev->dev, + "ERROR: Hotplug firmware request failed (%s).\n", CX231xx_FIRM_IMAGE_NAME); - pr_err("Please fix your hotplug setup, the board will not work without firmware loaded!\n"); + dev_err(&dev->udev->dev, + "Please fix your hotplug setup, the board will not work without firmware loaded!\n"); return -1; } if (firmware->size != CX231xx_FIRM_IMAGE_SIZE) { - pr_err("ERROR: Firmware size mismatch (have %zd, expected %d)\n", + dev_err(&dev->udev->dev, + "ERROR: Firmware size mismatch (have %zd, expected %d)\n", firmware->size, CX231xx_FIRM_IMAGE_SIZE); release_firmware(firmware); return -1; } if (0 != memcmp(firmware->data, magic, 8)) { - pr_err("ERROR: Firmware magic mismatch, wrong file?\n"); + dev_err(&dev->udev->dev, + "ERROR: Firmware magic mismatch, wrong file?\n"); release_firmware(firmware); return -1; } @@ -1057,7 +1061,8 @@ static int cx231xx_load_firmware(struct cx231xx *dev) retval |= mc417_register_write(dev, IVTV_REG_HW_BLOCKS, IVTV_CMD_HW_BLOCKS_RST); if (retval < 0) { - pr_err("%s: Error with mc417_register_write\n", + dev_err(&dev->udev->dev, + "%s: Error with mc417_register_write\n", __func__); return retval; } @@ -1069,7 +1074,8 @@ static int cx231xx_load_firmware(struct cx231xx *dev) retval |= mc417_register_write(dev, IVTV_REG_VPU, value & 0xFFFFFFE8); if (retval < 0) { - pr_err("%s: Error with mc417_register_write\n", + dev_err(&dev->udev->dev, + "%s: Error with mc417_register_write\n", __func__); return retval; } @@ -1117,25 +1123,28 @@ static int cx231xx_initialize_codec(struct cx231xx *dev) dprintk(2, "%s: PING OK\n", __func__); retval = cx231xx_load_firmware(dev); if (retval < 0) { - pr_err("%s: f/w load failed\n", __func__); + dev_err(&dev->udev->dev, + "%s: f/w load failed\n", __func__); return retval; } retval = cx231xx_find_mailbox(dev); if (retval < 0) { - pr_err("%s: mailbox < 0, error\n", + dev_err(&dev->udev->dev, "%s: mailbox < 0, error\n", __func__); return -1; } dev->cx23417_mailbox = retval; retval = cx231xx_api_cmd(dev, CX2341X_ENC_PING_FW, 0, 0); if (retval < 0) { - pr_err("ERROR: cx23417 firmware ping failed!\n"); + dev_err(&dev->udev->dev, + "ERROR: cx23417 firmware ping failed!\n"); return -1; } retval = cx231xx_api_cmd(dev, CX2341X_ENC_GET_VERSION, 0, 1, &version); if (retval < 0) { - pr_err("ERROR: cx23417 firmware get encoder: version failed!\n"); + dev_err(&dev->udev->dev, + "ERROR: cx23417 firmware get encoder: version failed!\n"); return -1; } dprintk(1, "cx23417 firmware version is 0x%08x\n", version); @@ -1416,8 +1425,9 @@ static int bb_buf_prepare(struct videobuf_queue *q, if (!dev->video_mode.bulk_ctl.num_bufs) urb_init = 1; } - /*pr_info("urb_init=%d dev->video_mode.max_pkt_size=%d\n", - urb_init, dev->video_mode.max_pkt_size);*/ + dev_dbg(&dev->udev->dev, + "urb_init=%d dev->video_mode.max_pkt_size=%d\n", + urb_init, dev->video_mode.max_pkt_size); dev->mode_tv = 1; if (urb_init) { -- cgit