diff options
Diffstat (limited to 'drivers/media/video/usbvision/usbvision-video.c')
-rw-r--r-- | drivers/media/video/usbvision/usbvision-video.c | 36 |
1 files changed, 22 insertions, 14 deletions
diff --git a/drivers/media/video/usbvision/usbvision-video.c b/drivers/media/video/usbvision/usbvision-video.c index 2622de003a45..47d672da5415 100644 --- a/drivers/media/video/usbvision/usbvision-video.c +++ b/drivers/media/video/usbvision/usbvision-video.c | |||
@@ -329,7 +329,7 @@ static void usbvision_create_sysfs(struct video_device *vdev) | |||
329 | return; | 329 | return; |
330 | } while (0); | 330 | } while (0); |
331 | 331 | ||
332 | err("%s error: %d\n", __func__, res); | 332 | dev_err(&vdev->dev, "%s error: %d\n", __func__, res); |
333 | } | 333 | } |
334 | 334 | ||
335 | static void usbvision_remove_sysfs(struct video_device *vdev) | 335 | static void usbvision_remove_sysfs(struct video_device *vdev) |
@@ -487,8 +487,9 @@ static int vidioc_g_register (struct file *file, void *priv, | |||
487 | /* NT100x has a 8-bit register space */ | 487 | /* NT100x has a 8-bit register space */ |
488 | errCode = usbvision_read_reg(usbvision, reg->reg&0xff); | 488 | errCode = usbvision_read_reg(usbvision, reg->reg&0xff); |
489 | if (errCode < 0) { | 489 | if (errCode < 0) { |
490 | err("%s: VIDIOC_DBG_G_REGISTER failed: error %d", | 490 | dev_err(&usbvision->vdev->dev, |
491 | __func__, errCode); | 491 | "%s: VIDIOC_DBG_G_REGISTER failed: error %d\n", |
492 | __func__, errCode); | ||
492 | return errCode; | 493 | return errCode; |
493 | } | 494 | } |
494 | reg->val = errCode; | 495 | reg->val = errCode; |
@@ -507,8 +508,9 @@ static int vidioc_s_register (struct file *file, void *priv, | |||
507 | /* NT100x has a 8-bit register space */ | 508 | /* NT100x has a 8-bit register space */ |
508 | errCode = usbvision_write_reg(usbvision, reg->reg&0xff, reg->val); | 509 | errCode = usbvision_write_reg(usbvision, reg->reg&0xff, reg->val); |
509 | if (errCode < 0) { | 510 | if (errCode < 0) { |
510 | err("%s: VIDIOC_DBG_S_REGISTER failed: error %d", | 511 | dev_err(&usbvision->vdev->dev, |
511 | __func__, errCode); | 512 | "%s: VIDIOC_DBG_S_REGISTER failed: error %d\n", |
513 | __func__, errCode); | ||
512 | return errCode; | 514 | return errCode; |
513 | } | 515 | } |
514 | return 0; | 516 | return 0; |
@@ -1189,7 +1191,9 @@ static int usbvision_radio_open(struct file *file) | |||
1189 | mutex_lock(&usbvision->lock); | 1191 | mutex_lock(&usbvision->lock); |
1190 | 1192 | ||
1191 | if (usbvision->user) { | 1193 | if (usbvision->user) { |
1192 | err("%s: Someone tried to open an already opened USBVision Radio!", __func__); | 1194 | dev_err(&usbvision->rdev->dev, |
1195 | "%s: Someone tried to open an already opened USBVision Radio!\n", | ||
1196 | __func__); | ||
1193 | errCode = -EBUSY; | 1197 | errCode = -EBUSY; |
1194 | } | 1198 | } |
1195 | else { | 1199 | else { |
@@ -1413,7 +1417,8 @@ static struct video_device *usbvision_vdev_init(struct usb_usbvision *usbvision, | |||
1413 | struct video_device *vdev; | 1417 | struct video_device *vdev; |
1414 | 1418 | ||
1415 | if (usb_dev == NULL) { | 1419 | if (usb_dev == NULL) { |
1416 | err("%s: usbvision->dev is not set", __func__); | 1420 | dev_err(&usbvision->dev->dev, |
1421 | "%s: usbvision->dev is not set\n", __func__); | ||
1417 | return NULL; | 1422 | return NULL; |
1418 | } | 1423 | } |
1419 | 1424 | ||
@@ -1524,7 +1529,9 @@ static int __devinit usbvision_register_video(struct usb_usbvision *usbvision) | |||
1524 | return 0; | 1529 | return 0; |
1525 | 1530 | ||
1526 | err_exit: | 1531 | err_exit: |
1527 | err("USBVision[%d]: video_register_device() failed", usbvision->nr); | 1532 | dev_err(&usbvision->dev->dev, |
1533 | "USBVision[%d]: video_register_device() failed\n", | ||
1534 | usbvision->nr); | ||
1528 | usbvision_unregister_video(usbvision); | 1535 | usbvision_unregister_video(usbvision); |
1529 | return -1; | 1536 | return -1; |
1530 | } | 1537 | } |
@@ -1675,20 +1682,20 @@ static int __devinit usbvision_probe(struct usb_interface *intf, | |||
1675 | } | 1682 | } |
1676 | endpoint = &interface->endpoint[1].desc; | 1683 | endpoint = &interface->endpoint[1].desc; |
1677 | if (!usb_endpoint_xfer_isoc(endpoint)) { | 1684 | if (!usb_endpoint_xfer_isoc(endpoint)) { |
1678 | err("%s: interface %d. has non-ISO endpoint!", | 1685 | dev_err(&intf->dev, "%s: interface %d. has non-ISO endpoint!\n", |
1679 | __func__, ifnum); | 1686 | __func__, ifnum); |
1680 | err("%s: Endpoint attributes %d", | 1687 | dev_err(&intf->dev, "%s: Endpoint attributes %d", |
1681 | __func__, endpoint->bmAttributes); | 1688 | __func__, endpoint->bmAttributes); |
1682 | return -ENODEV; | 1689 | return -ENODEV; |
1683 | } | 1690 | } |
1684 | if (usb_endpoint_dir_out(endpoint)) { | 1691 | if (usb_endpoint_dir_out(endpoint)) { |
1685 | err("%s: interface %d. has ISO OUT endpoint!", | 1692 | dev_err(&intf->dev, "%s: interface %d. has ISO OUT endpoint!\n", |
1686 | __func__, ifnum); | 1693 | __func__, ifnum); |
1687 | return -ENODEV; | 1694 | return -ENODEV; |
1688 | } | 1695 | } |
1689 | 1696 | ||
1690 | if ((usbvision = usbvision_alloc(dev)) == NULL) { | 1697 | if ((usbvision = usbvision_alloc(dev)) == NULL) { |
1691 | err("%s: couldn't allocate USBVision struct", __func__); | 1698 | dev_err(&intf->dev, "%s: couldn't allocate USBVision struct\n", __func__); |
1692 | return -ENOMEM; | 1699 | return -ENOMEM; |
1693 | } | 1700 | } |
1694 | 1701 | ||
@@ -1711,7 +1718,7 @@ static int __devinit usbvision_probe(struct usb_interface *intf, | |||
1711 | usbvision->alt_max_pkt_size = kmalloc(32* | 1718 | usbvision->alt_max_pkt_size = kmalloc(32* |
1712 | usbvision->num_alt,GFP_KERNEL); | 1719 | usbvision->num_alt,GFP_KERNEL); |
1713 | if (usbvision->alt_max_pkt_size == NULL) { | 1720 | if (usbvision->alt_max_pkt_size == NULL) { |
1714 | err("usbvision: out of memory!\n"); | 1721 | dev_err(&intf->dev, "usbvision: out of memory!\n"); |
1715 | mutex_unlock(&usbvision->lock); | 1722 | mutex_unlock(&usbvision->lock); |
1716 | return -ENOMEM; | 1723 | return -ENOMEM; |
1717 | } | 1724 | } |
@@ -1772,7 +1779,8 @@ static void __devexit usbvision_disconnect(struct usb_interface *intf) | |||
1772 | PDEBUG(DBG_PROBE, ""); | 1779 | PDEBUG(DBG_PROBE, ""); |
1773 | 1780 | ||
1774 | if (usbvision == NULL) { | 1781 | if (usbvision == NULL) { |
1775 | err("%s: usb_get_intfdata() failed", __func__); | 1782 | dev_err(&usbvision->dev->dev, |
1783 | "%s: usb_get_intfdata() failed\n", __func__); | ||
1776 | return; | 1784 | return; |
1777 | } | 1785 | } |
1778 | usb_set_intfdata (intf, NULL); | 1786 | usb_set_intfdata (intf, NULL); |