summaryrefslogtreecommitdiff
path: root/drivers/media/usb/cx231xx/cx231xx-417.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>2014-11-03 06:07:38 -0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2014-11-03 15:59:59 -0200
commit336fea922936c114f68b8c0bcbff5fcfac3507d9 (patch)
treee196bb60d2c661f18b805f4e557e7179b08bdc71 /drivers/media/usb/cx231xx/cx231xx-417.c
parentac550faabd7cc63f3726e21063931cb0d286c59d (diff)
[media] cx231xx: Improve the log message
Unfortunately, on devices that have multiple interfaces, udev->dev points to the parent device (usb) instead of the cx231xx specific one. Due to that the logs don't look too nice, as they'll print messages as if they were produced by USB core: usb-1-2: New device Conexant Corporation Polaris AV Capturb @ 480 Mbps (1554:5010) with 7 interfaces Instead of using the name of the parent device, let's use the name of the first cx231xx interface for all cx231xx sub-modules. With this path, the logs will be nicer: cx231xx 1-2:1.1: New device Conexant Corporation Polaris AV Capturb @ 480 Mbps (1554:5010) with 7 interfaces Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/usb/cx231xx/cx231xx-417.c')
-rw-r--r--drivers/media/usb/cx231xx/cx231xx-417.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/media/usb/cx231xx/cx231xx-417.c b/drivers/media/usb/cx231xx/cx231xx-417.c
index 0773da4dc29b..8998fa4a43f6 100644
--- a/drivers/media/usb/cx231xx/cx231xx-417.c
+++ b/drivers/media/usb/cx231xx/cx231xx-417.c
@@ -987,25 +987,25 @@ static int cx231xx_load_firmware(struct cx231xx *dev)
IVTV_REG_APU, 0);
if (retval != 0) {
- dev_err(&dev->udev->dev,
+ dev_err(dev->dev,
"%s: Error with mc417_register_write\n", __func__);
return -1;
}
retval = request_firmware(&firmware, CX231xx_FIRM_IMAGE_NAME,
- &dev->udev->dev);
+ dev->dev);
if (retval != 0) {
- dev_err(&dev->udev->dev,
+ dev_err(dev->dev,
"ERROR: Hotplug firmware request failed (%s).\n",
CX231xx_FIRM_IMAGE_NAME);
- dev_err(&dev->udev->dev,
+ dev_err(dev->dev,
"Please fix your hotplug setup, the board will not work without firmware loaded!\n");
return -1;
}
if (firmware->size != CX231xx_FIRM_IMAGE_SIZE) {
- dev_err(&dev->udev->dev,
+ dev_err(dev->dev,
"ERROR: Firmware size mismatch (have %zd, expected %d)\n",
firmware->size, CX231xx_FIRM_IMAGE_SIZE);
release_firmware(firmware);
@@ -1013,7 +1013,7 @@ static int cx231xx_load_firmware(struct cx231xx *dev)
}
if (0 != memcmp(firmware->data, magic, 8)) {
- dev_err(&dev->udev->dev,
+ dev_err(dev->dev,
"ERROR: Firmware magic mismatch, wrong file?\n");
release_firmware(firmware);
return -1;
@@ -1061,7 +1061,7 @@ 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) {
- dev_err(&dev->udev->dev,
+ dev_err(dev->dev,
"%s: Error with mc417_register_write\n",
__func__);
return retval;
@@ -1074,7 +1074,7 @@ static int cx231xx_load_firmware(struct cx231xx *dev)
retval |= mc417_register_write(dev, IVTV_REG_VPU, value & 0xFFFFFFE8);
if (retval < 0) {
- dev_err(&dev->udev->dev,
+ dev_err(dev->dev,
"%s: Error with mc417_register_write\n",
__func__);
return retval;
@@ -1123,27 +1123,27 @@ static int cx231xx_initialize_codec(struct cx231xx *dev)
dprintk(2, "%s: PING OK\n", __func__);
retval = cx231xx_load_firmware(dev);
if (retval < 0) {
- dev_err(&dev->udev->dev,
+ dev_err(dev->dev,
"%s: f/w load failed\n", __func__);
return retval;
}
retval = cx231xx_find_mailbox(dev);
if (retval < 0) {
- dev_err(&dev->udev->dev, "%s: mailbox < 0, error\n",
+ dev_err(dev->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) {
- dev_err(&dev->udev->dev,
+ dev_err(dev->dev,
"ERROR: cx23417 firmware ping failed!\n");
return -1;
}
retval = cx231xx_api_cmd(dev, CX2341X_ENC_GET_VERSION, 0, 1,
&version);
if (retval < 0) {
- dev_err(&dev->udev->dev,
+ dev_err(dev->dev,
"ERROR: cx23417 firmware get encoder: version failed!\n");
return -1;
}
@@ -1425,7 +1425,7 @@ static int bb_buf_prepare(struct videobuf_queue *q,
if (!dev->video_mode.bulk_ctl.num_bufs)
urb_init = 1;
}
- dev_dbg(&dev->udev->dev,
+ dev_dbg(dev->dev,
"urb_init=%d dev->video_mode.max_pkt_size=%d\n",
urb_init, dev->video_mode.max_pkt_size);
dev->mode_tv = 1;
@@ -1698,7 +1698,7 @@ static int mpeg_open(struct file *file)
sizeof(struct cx231xx_buffer), fh, &dev->lock);
/*
videobuf_queue_sg_init(&fh->vidq, &cx231xx_qops,
- &dev->udev->dev, &dev->ts1.slock,
+ dev->dev, &dev->ts1.slock,
V4L2_BUF_TYPE_VIDEO_CAPTURE,
V4L2_FIELD_INTERLACED,
sizeof(struct cx231xx_buffer),