]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/media/video/usbvideo/konicawc.c
USB: remove warn() macro from usb media drivers
[linux-2.6-omap-h63xx.git] / drivers / media / video / usbvideo / konicawc.c
index 719b17ce83f832c87bf2ce50590af74d0a266bc0..da27a5287983f79716bf61543b1cfe834d03188a 100644 (file)
@@ -57,11 +57,11 @@ static struct usbvideo *cams;
 static int debug;
 #define DEBUG(n, format, arg...) \
        if (n <= debug) {        \
-               printk(KERN_DEBUG __FILE__ ":%s(): " format "\n", __FUNCTION__ , ## arg); \
+               printk(KERN_DEBUG __FILE__ ":%s(): " format "\n", __func__ , ## arg); \
        }
 #else
 #define DEBUG(n, arg...)
-static const int debug = 0;
+static const int debug;
 #endif
 
 
@@ -229,7 +229,8 @@ static void konicawc_register_input(struct konicawc *cam, struct usb_device *dev
 
        cam->input = input_dev = input_allocate_device();
        if (!input_dev) {
-               warn("Not enough memory for camera's input device\n");
+               dev_warn(&dev->dev,
+                        "Not enough memory for camera's input device\n");
                return;
        }
 
@@ -243,8 +244,9 @@ static void konicawc_register_input(struct konicawc *cam, struct usb_device *dev
 
        error = input_register_device(cam->input);
        if (error) {
-               warn("Failed to register camera's input device, err: %d\n",
-                    error);
+               dev_warn(&dev->dev,
+                        "Failed to register camera's input device, err: %d\n",
+                        error);
                input_free_device(cam->input);
                cam->input = NULL;
        }
@@ -337,7 +339,8 @@ static int konicawc_compress_iso(struct uvd *uvd, struct urb *dataurb, struct ur
                }
 
                if((sts > 0x01) && (sts < 0x80)) {
-                       info("unknown status %2.2x", sts);
+                       dev_info(&uvd->dev->dev, "unknown status %2.2x\n",
+                                sts);
                        bad++;
                        continue;
                }
@@ -568,8 +571,12 @@ static void konicawc_process_isoc(struct uvd *uvd, struct usbvideo_frame *frame)
                                        fdrops = (0x80 + curframe - cam->lastframe) & 0x7F;
                                        fdrops--;
                                        if(fdrops) {
-                                               info("Dropped %d frames (%d -> %d)", fdrops,
-                                                    cam->lastframe, curframe);
+                                               dev_info(&uvd->dev->dev,
+                                                        "Dropped %d frames "
+                                                        "(%d -> %d)\n",
+                                                        fdrops,
+                                                        cam->lastframe,
+                                                        curframe);
                                        }
                                }
                                cam->lastframe = curframe;
@@ -784,7 +791,8 @@ static int konicawc_probe(struct usb_interface *intf, const struct usb_device_id
        if (dev->descriptor.bNumConfigurations != 1)
                return -ENODEV;
 
-       info("Konica Webcam (rev. 0x%04x)", le16_to_cpu(dev->descriptor.bcdDevice));
+       dev_info(&intf->dev, "Konica Webcam (rev. 0x%04x)\n",
+                le16_to_cpu(dev->descriptor.bcdDevice));
        RESTRICT_TO_RANGE(speed, 0, MAX_SPEED);
 
        /* Validate found interface: must have one ISO endpoint */
@@ -925,7 +933,8 @@ static struct usb_device_id id_table[] = {
 static int __init konicawc_init(void)
 {
        struct usbvideo_cb cbTbl;
-       info(DRIVER_DESC " " DRIVER_VERSION);
+       printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":"
+              DRIVER_DESC "\n");
        memset(&cbTbl, 0, sizeof(cbTbl));
        cbTbl.probe = konicawc_probe;
        cbTbl.setupOnOpen = konicawc_setup_on_open;