]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/media/video/usbvision/usbvision-core.c
V4L/DVB (10298): remove err macro from few usb devices
[mv-sheeva.git] / drivers / media / video / usbvision / usbvision-core.c
index 9e4f50639975308c0ca23ed446f1aa26d8e4f4df..4444e7e3cdf878fcb23db629c47c51b2138dcd4e 100644 (file)
@@ -381,8 +381,9 @@ int usbvision_scratch_alloc(struct usb_usbvision *usbvision)
        usbvision->scratch = vmalloc_32(scratch_buf_size);
        scratch_reset(usbvision);
        if(usbvision->scratch == NULL) {
-               err("%s: unable to allocate %d bytes for scratch",
-                   __func__, scratch_buf_size);
+               dev_err(&usbvision->dev->dev,
+                       "%s: unable to allocate %d bytes for scratch\n",
+                               __func__, scratch_buf_size);
                return -ENOMEM;
        }
        return 0;
@@ -491,8 +492,9 @@ 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) {
-               err("%s: unable to allocate %d for compr. frame buffer",
-                   __func__, IFB_size);
+               dev_err(&usbvision->dev->dev,
+                       "%s: unable to allocate %d for compr. frame buffer\n",
+                               __func__, IFB_size);
                return -ENOMEM;
        }
        return 0;
@@ -1514,8 +1516,9 @@ static void usbvision_isocIrq(struct urb *urb)
        errCode = usb_submit_urb (urb, GFP_ATOMIC);
 
        if(errCode) {
-               err("%s: usb_submit_urb failed: error %d",
-                   __func__, errCode);
+               dev_err(&usbvision->dev->dev,
+                       "%s: usb_submit_urb failed: error %d\n",
+                               __func__, errCode);
        }
 
        return;
@@ -1546,7 +1549,8 @@ int usbvision_read_reg(struct usb_usbvision *usbvision, unsigned char reg)
                                0, (__u16) reg, buffer, 1, HZ);
 
        if (errCode < 0) {
-               err("%s: failed: error %d", __func__, errCode);
+               dev_err(&usbvision->dev->dev,
+                       "%s: failed: error %d\n", __func__, errCode);
                return errCode;
        }
        return buffer[0];
@@ -1574,7 +1578,8 @@ int usbvision_write_reg(struct usb_usbvision *usbvision, unsigned char reg,
                                USB_RECIP_ENDPOINT, 0, (__u16) reg, &value, 1, HZ);
 
        if (errCode < 0) {
-               err("%s: failed: error %d", __func__, errCode);
+               dev_err(&usbvision->dev->dev,
+                       "%s: failed: error %d\n", __func__, errCode);
        }
        return errCode;
 }
@@ -1850,7 +1855,8 @@ int usbvision_set_output(struct usb_usbvision *usbvision, int width,
                                 0, (__u16) USBVISION_LXSIZE_O, value, 4, HZ);
 
                if (errCode < 0) {
-                       err("%s failed: error %d", __func__, errCode);
+                       dev_err(&usbvision->dev->dev,
+                               "%s failed: error %d\n", __func__, errCode);
                        return errCode;
                }
                usbvision->curwidth = usbvision->stretch_width * UsbWidth;
@@ -2236,7 +2242,7 @@ static int usbvision_set_dram_settings(struct usb_usbvision *usbvision)
                             (__u16) USBVISION_DRM_PRM1, value, 8, HZ);
 
        if (rc < 0) {
-               err("%sERROR=%d", __func__, rc);
+               dev_err(&usbvision->dev->dev, "%sERROR=%d\n", __func__, rc);
                return rc;
        }
 
@@ -2432,8 +2438,9 @@ 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) {
-                       err ("cannot change alternate number to %d (error=%i)",
-                                                       dev->ifaceAlt, errCode);
+                       dev_err(&dev->dev->dev,
+                               "cannot change alternate number to %d (error=%i)\n",
+                                       dev->ifaceAlt, errCode);
                        return errCode;
                }
        }
@@ -2484,7 +2491,8 @@ int usbvision_init_isoc(struct usb_usbvision *usbvision)
 
                urb = usb_alloc_urb(USBVISION_URB_FRAMES, GFP_KERNEL);
                if (urb == NULL) {
-                       err("%s: usb_alloc_urb() failed", __func__);
+                       dev_err(&usbvision->dev->dev,
+                               "%s: usb_alloc_urb() failed\n", __func__);
                        return -ENOMEM;
                }
                usbvision->sbuf[bufIdx].urb = urb;
@@ -2516,8 +2524,9 @@ int usbvision_init_isoc(struct usb_usbvision *usbvision)
                        errCode = usb_submit_urb(usbvision->sbuf[bufIdx].urb,
                                                 GFP_KERNEL);
                if (errCode) {
-                       err("%s: usb_submit_urb(%d) failed: error %d",
-                           __func__, bufIdx, errCode);
+                       dev_err(&usbvision->dev->dev,
+                               "%s: usb_submit_urb(%d) failed: error %d\n",
+                                       __func__, bufIdx, errCode);
                }
        }
 
@@ -2566,8 +2575,9 @@ void usbvision_stop_isoc(struct usb_usbvision *usbvision)
                errCode = usb_set_interface(usbvision->dev, usbvision->iface,
                                            usbvision->ifaceAlt);
                if (errCode < 0) {
-                       err("%s: usb_set_interface() failed: error %d",
-                           __func__, errCode);
+                       dev_err(&usbvision->dev->dev,
+                               "%s: usb_set_interface() failed: error %d\n",
+                                       __func__, errCode);
                        usbvision->last_error = errCode;
                }
                regValue = (16-usbvision_read_reg(usbvision, USBVISION_ALTER_REG)) & 0x0F;