diff options
Diffstat (limited to 'linux/drivers/media/video/usbvision')
-rw-r--r-- | linux/drivers/media/video/usbvision/usbvision-core.c | 44 | ||||
-rw-r--r-- | linux/drivers/media/video/usbvision/usbvision-i2c.c | 6 | ||||
-rw-r--r-- | linux/drivers/media/video/usbvision/usbvision-video.c | 36 |
3 files changed, 33 insertions, 53 deletions
diff --git a/linux/drivers/media/video/usbvision/usbvision-core.c b/linux/drivers/media/video/usbvision/usbvision-core.c index 440f1b05a..33f37ac46 100644 --- a/linux/drivers/media/video/usbvision/usbvision-core.c +++ b/linux/drivers/media/video/usbvision/usbvision-core.c @@ -381,9 +381,8 @@ int usbvision_scratch_alloc(struct usb_usbvision *usbvision) usbvision->scratch = vmalloc_32(scratch_buf_size); scratch_reset(usbvision); if(usbvision->scratch == NULL) { - dev_err(&usbvision->dev->dev, - "%s: unable to allocate %d bytes for scratch\n", - __func__, scratch_buf_size); + err("%s: unable to allocate %d bytes for scratch", + __func__, scratch_buf_size); return -ENOMEM; } return 0; @@ -492,9 +491,8 @@ int usbvision_decompress_alloc(struct usb_usbvision *usbvision) int IFB_size = MAX_FRAME_WIDTH * MAX_FRAME_HEIGHT * 3 / 2; usbvision->IntraFrameBuffer = vmalloc_32(IFB_size); if (usbvision->IntraFrameBuffer == NULL) { - dev_err(&usbvision->dev->dev, - "%s: unable to allocate %d for compr. frame buffer\n", - __func__, IFB_size); + err("%s: unable to allocate %d for compr. frame buffer", + __func__, IFB_size); return -ENOMEM; } return 0; @@ -1521,9 +1519,8 @@ static void usbvision_isocIrq(struct urb *urb, struct pt_regs *regs) errCode = usb_submit_urb (urb, GFP_ATOMIC); if(errCode) { - dev_err(&usbvision->dev->dev, - "%s: usb_submit_urb failed: error %d\n", - __func__, errCode); + err("%s: usb_submit_urb failed: error %d", + __func__, errCode); } return; @@ -1554,8 +1551,7 @@ int usbvision_read_reg(struct usb_usbvision *usbvision, unsigned char reg) 0, (__u16) reg, buffer, 1, HZ); if (errCode < 0) { - dev_err(&usbvision->dev->dev, - "%s: failed: error %d\n", __func__, errCode); + err("%s: failed: error %d", __func__, errCode); return errCode; } return buffer[0]; @@ -1583,8 +1579,7 @@ int usbvision_write_reg(struct usb_usbvision *usbvision, unsigned char reg, USB_RECIP_ENDPOINT, 0, (__u16) reg, &value, 1, HZ); if (errCode < 0) { - dev_err(&usbvision->dev->dev, - "%s: failed: error %d\n", __func__, errCode); + err("%s: failed: error %d", __func__, errCode); } return errCode; } @@ -1864,8 +1859,7 @@ int usbvision_set_output(struct usb_usbvision *usbvision, int width, 0, (__u16) USBVISION_LXSIZE_O, value, 4, HZ); if (errCode < 0) { - dev_err(&usbvision->dev->dev, - "%s failed: error %d\n", __func__, errCode); + err("%s failed: error %d", __func__, errCode); return errCode; } usbvision->curwidth = usbvision->stretch_width * UsbWidth; @@ -2251,7 +2245,7 @@ static int usbvision_set_dram_settings(struct usb_usbvision *usbvision) (__u16) USBVISION_DRM_PRM1, value, 8, HZ); if (rc < 0) { - dev_err(&usbvision->dev->dev, "%sERROR=%d\n", __func__, rc); + err("%sERROR=%d", __func__, rc); return rc; } @@ -2459,9 +2453,8 @@ int usbvision_set_alternate(struct usb_usbvision *dev) PDEBUG(DBG_FUNC,"setting alternate %d with wMaxPacketSize=%u", dev->ifaceAlt,dev->isocPacketSize); errCode = usb_set_interface(dev->dev, dev->iface, dev->ifaceAlt); if (errCode < 0) { - dev_err(&dev->dev->dev, - "cannot change alternate number to %d (error=%i)\n", - dev->ifaceAlt, errCode); + err ("cannot change alternate number to %d (error=%i)", + dev->ifaceAlt, errCode); return errCode; } } @@ -2512,8 +2505,7 @@ int usbvision_init_isoc(struct usb_usbvision *usbvision) urb = usb_alloc_urb(USBVISION_URB_FRAMES, GFP_KERNEL); if (urb == NULL) { - dev_err(&usbvision->dev->dev, - "%s: usb_alloc_urb() failed\n", __func__); + err("%s: usb_alloc_urb() failed", __func__); return -ENOMEM; } usbvision->sbuf[bufIdx].urb = urb; @@ -2545,9 +2537,8 @@ int usbvision_init_isoc(struct usb_usbvision *usbvision) errCode = usb_submit_urb(usbvision->sbuf[bufIdx].urb, GFP_KERNEL); if (errCode) { - dev_err(&usbvision->dev->dev, - "%s: usb_submit_urb(%d) failed: error %d\n", - __func__, bufIdx, errCode); + err("%s: usb_submit_urb(%d) failed: error %d", + __func__, bufIdx, errCode); } } @@ -2596,9 +2587,8 @@ void usbvision_stop_isoc(struct usb_usbvision *usbvision) errCode = usb_set_interface(usbvision->dev, usbvision->iface, usbvision->ifaceAlt); if (errCode < 0) { - dev_err(&usbvision->dev->dev, - "%s: usb_set_interface() failed: error %d\n", - __func__, errCode); + err("%s: usb_set_interface() failed: error %d", + __func__, errCode); usbvision->last_error = errCode; } regValue = (16-usbvision_read_reg(usbvision, USBVISION_ALTER_REG)) & 0x0F; diff --git a/linux/drivers/media/video/usbvision/usbvision-i2c.c b/linux/drivers/media/video/usbvision/usbvision-i2c.c index 4c74861f4..1d37e6206 100644 --- a/linux/drivers/media/video/usbvision/usbvision-i2c.c +++ b/linux/drivers/media/video/usbvision/usbvision-i2c.c @@ -120,8 +120,7 @@ static inline int usb_find_address(struct i2c_adapter *i2c_adap, /* try extended address code... */ ret = try_write_address(i2c_adap, addr, retries); if (ret != 1) { - dev_err(&i2c_adap->dev, - "died at extended address code, while writing\n"); + err("died at extended address code, while writing"); return -EREMOTEIO; } add[0] = addr; @@ -130,8 +129,7 @@ static inline int usb_find_address(struct i2c_adapter *i2c_adap, addr |= 0x01; ret = try_read_address(i2c_adap, addr, retries); if (ret != 1) { - dev_err(&i2c_adap->dev, - "died at extended address code, while reading\n"); + err("died at extended address code, while reading"); return -EREMOTEIO; } } diff --git a/linux/drivers/media/video/usbvision/usbvision-video.c b/linux/drivers/media/video/usbvision/usbvision-video.c index 47d672da5..2622de003 100644 --- a/linux/drivers/media/video/usbvision/usbvision-video.c +++ b/linux/drivers/media/video/usbvision/usbvision-video.c @@ -329,7 +329,7 @@ static void usbvision_create_sysfs(struct video_device *vdev) return; } while (0); - dev_err(&vdev->dev, "%s error: %d\n", __func__, res); + err("%s error: %d\n", __func__, res); } static void usbvision_remove_sysfs(struct video_device *vdev) @@ -487,9 +487,8 @@ static int vidioc_g_register (struct file *file, void *priv, /* NT100x has a 8-bit register space */ errCode = usbvision_read_reg(usbvision, reg->reg&0xff); if (errCode < 0) { - dev_err(&usbvision->vdev->dev, - "%s: VIDIOC_DBG_G_REGISTER failed: error %d\n", - __func__, errCode); + err("%s: VIDIOC_DBG_G_REGISTER failed: error %d", + __func__, errCode); return errCode; } reg->val = errCode; @@ -508,9 +507,8 @@ static int vidioc_s_register (struct file *file, void *priv, /* NT100x has a 8-bit register space */ errCode = usbvision_write_reg(usbvision, reg->reg&0xff, reg->val); if (errCode < 0) { - dev_err(&usbvision->vdev->dev, - "%s: VIDIOC_DBG_S_REGISTER failed: error %d\n", - __func__, errCode); + err("%s: VIDIOC_DBG_S_REGISTER failed: error %d", + __func__, errCode); return errCode; } return 0; @@ -1191,9 +1189,7 @@ static int usbvision_radio_open(struct file *file) mutex_lock(&usbvision->lock); if (usbvision->user) { - dev_err(&usbvision->rdev->dev, - "%s: Someone tried to open an already opened USBVision Radio!\n", - __func__); + err("%s: Someone tried to open an already opened USBVision Radio!", __func__); errCode = -EBUSY; } else { @@ -1417,8 +1413,7 @@ static struct video_device *usbvision_vdev_init(struct usb_usbvision *usbvision, struct video_device *vdev; if (usb_dev == NULL) { - dev_err(&usbvision->dev->dev, - "%s: usbvision->dev is not set\n", __func__); + err("%s: usbvision->dev is not set", __func__); return NULL; } @@ -1529,9 +1524,7 @@ static int __devinit usbvision_register_video(struct usb_usbvision *usbvision) return 0; err_exit: - dev_err(&usbvision->dev->dev, - "USBVision[%d]: video_register_device() failed\n", - usbvision->nr); + err("USBVision[%d]: video_register_device() failed", usbvision->nr); usbvision_unregister_video(usbvision); return -1; } @@ -1682,20 +1675,20 @@ static int __devinit usbvision_probe(struct usb_interface *intf, } endpoint = &interface->endpoint[1].desc; if (!usb_endpoint_xfer_isoc(endpoint)) { - dev_err(&intf->dev, "%s: interface %d. has non-ISO endpoint!\n", + err("%s: interface %d. has non-ISO endpoint!", __func__, ifnum); - dev_err(&intf->dev, "%s: Endpoint attributes %d", + err("%s: Endpoint attributes %d", __func__, endpoint->bmAttributes); return -ENODEV; } if (usb_endpoint_dir_out(endpoint)) { - dev_err(&intf->dev, "%s: interface %d. has ISO OUT endpoint!\n", + err("%s: interface %d. has ISO OUT endpoint!", __func__, ifnum); return -ENODEV; } if ((usbvision = usbvision_alloc(dev)) == NULL) { - dev_err(&intf->dev, "%s: couldn't allocate USBVision struct\n", __func__); + err("%s: couldn't allocate USBVision struct", __func__); return -ENOMEM; } @@ -1718,7 +1711,7 @@ static int __devinit usbvision_probe(struct usb_interface *intf, usbvision->alt_max_pkt_size = kmalloc(32* usbvision->num_alt,GFP_KERNEL); if (usbvision->alt_max_pkt_size == NULL) { - dev_err(&intf->dev, "usbvision: out of memory!\n"); + err("usbvision: out of memory!\n"); mutex_unlock(&usbvision->lock); return -ENOMEM; } @@ -1779,8 +1772,7 @@ static void __devexit usbvision_disconnect(struct usb_interface *intf) PDEBUG(DBG_PROBE, ""); if (usbvision == NULL) { - dev_err(&usbvision->dev->dev, - "%s: usb_get_intfdata() failed\n", __func__); + err("%s: usb_get_intfdata() failed", __func__); return; } usb_set_intfdata (intf, NULL); |