]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
USB: remove warn() macro from usb media drivers
authorGreg Kroah-Hartman <gregkh@suse.de>
Thu, 14 Aug 2008 16:37:34 +0000 (09:37 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 17 Oct 2008 21:41:08 +0000 (14:41 -0700)
USB should not be having it's own printk macros, so remove warn() and
use the system-wide standard of dev_warn() wherever possible.  In the
few places that will not work out, use a basic printk().

Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/media/radio/dsbr100.c
drivers/media/video/dabusb.c
drivers/media/video/ov511.c
drivers/media/video/usbvideo/konicawc.c
drivers/media/video/usbvideo/quickcam_messenger.c

index 66783fffe4c1c34dc0e57e9b32feb775c8da3fc2..78f56944e640f53b53e37273f436ac3490e045db 100644 (file)
@@ -310,7 +310,7 @@ static int vidioc_s_frequency(struct file *file, void *priv,
 
        radio->curfreq = f->frequency;
        if (dsbr100_setfreq(radio, radio->curfreq)==-1)
-               warn("Set frequency failed");
+               dev_warn(&radio->usbdev->dev, "Set frequency failed\n");
        return 0;
 }
 
@@ -361,12 +361,14 @@ static int vidioc_s_ctrl(struct file *file, void *priv,
        case V4L2_CID_AUDIO_MUTE:
                if (ctrl->value) {
                        if (dsbr100_stop(radio) == -1) {
-                               warn("Radio did not respond properly");
+                               dev_warn(&radio->usbdev->dev,
+                                        "Radio did not respond properly\n");
                                return -EBUSY;
                        }
                } else {
                        if (dsbr100_start(radio) == -1) {
-                               warn("Radio did not respond properly");
+                               dev_warn(&radio->usbdev->dev,
+                                        "Radio did not respond properly\n");
                                return -EBUSY;
                        }
                }
@@ -416,7 +418,8 @@ static int usb_dsbr100_open(struct inode *inode, struct file *file)
        radio->muted = 1;
 
        if (dsbr100_start(radio)<0) {
-               warn("Radio did not start up properly");
+               dev_warn(&radio->usbdev->dev,
+                        "Radio did not start up properly\n");
                radio->users = 0;
                unlock_kernel();
                return -EIO;
@@ -501,7 +504,7 @@ static int usb_dsbr100_probe(struct usb_interface *intf,
        radio->curfreq = FREQ_MIN*FREQ_MUL;
        video_set_drvdata(radio->videodev, radio);
        if (video_register_device(radio->videodev, VFL_TYPE_RADIO, radio_nr) < 0) {
-               warn("Could not register video device");
+               dev_warn(&intf->dev, "Could not register video device\n");
                video_device_release(radio->videodev);
                kfree(radio->transfer_buffer);
                kfree(radio);
index 3aa538afcc0b3ab2343c2c29833cfe02621370f3..298810d5262bc7b31e5cd0acb06c194543f84541 100644 (file)
@@ -192,7 +192,7 @@ static void dabusb_iso_complete (struct urb *purb)
                                        err("dabusb_iso_complete: invalid len %d", len);
                        }
                        else
-                               warn("dabusb_iso_complete: corrupted packet status: %d", purb->iso_frame_desc[i].status);
+                               dev_warn(&purb->dev->dev, "dabusb_iso_complete: corrupted packet status: %d\n", purb->iso_frame_desc[i].status);
                if (dst != purb->actual_length)
                        err("dst!=purb->actual_length:%d!=%d", dst, purb->actual_length);
        }
@@ -289,7 +289,7 @@ static int dabusb_bulk (pdabusb_t s, pbulk_transfer_t pb)
        }
 
        if( ret == -EPIPE ) {
-               warn("CLEAR_FEATURE request to remove STALL condition.");
+               dev_warn(&s->usbdev->dev, "CLEAR_FEATURE request to remove STALL condition.\n");
                if(usb_clear_halt(s->usbdev, usb_pipeendpoint(pipe)))
                        err("request failed");
        }
index 935d73de57bd3c8cf78ade18ff9245c2ab4c4799..210f1240b331ccc8dff41094df4d138a5a3ebb8b 100644 (file)
@@ -1098,9 +1098,10 @@ ov51x_clear_snapshot(struct usb_ov511 *ov)
                reg_w(ov, R51x_SYS_SNAP, 0x02);
                reg_w(ov, R51x_SYS_SNAP, 0x00);
        } else if (ov->bclass == BCL_OV518) {
-               warn("snapshot reset not supported yet on OV518(+)");
+               dev_warn(&ov->dev->dev,
+                        "snapshot reset not supported yet on OV518(+)\n");
        } else {
-               err("clear snap: invalid bridge type");
+               dev_err(&ov->dev->dev, "clear snap: invalid bridge type\n");
        }
 }
 
@@ -1115,14 +1116,16 @@ ov51x_check_snapshot(struct usb_ov511 *ov)
        if (ov->bclass == BCL_OV511) {
                ret = reg_r(ov, R51x_SYS_SNAP);
                if (ret < 0) {
-                       err("Error checking snspshot status (%d)", ret);
+                       dev_err(&ov->dev->dev,
+                               "Error checking snspshot status (%d)\n", ret);
                } else if (ret & 0x08) {
                        status = 1;
                }
        } else if (ov->bclass == BCL_OV518) {
-               warn("snapshot check not supported yet on OV518(+)");
+               dev_warn(&ov->dev->dev,
+                        "snapshot check not supported yet on OV518(+)\n");
        } else {
-               err("check snap: invalid bridge type");
+               dev_err(&ov->dev->dev, "clear snap: invalid bridge type\n");
        }
 
        return status;
@@ -5217,7 +5220,8 @@ saa7111a_configure(struct usb_ov511 *ov)
        if (ov->bclass == BCL_OV511)
                reg_w(ov, 0x11, 0x00);
        else
-               warn("SAA7111A not yet supported with OV518/OV518+");
+               dev_warn(&ov->dev->dev,
+                        "SAA7111A not yet supported with OV518/OV518+\n");
 
        return 0;
 }
@@ -5456,7 +5460,8 @@ ov518_configure(struct usb_ov511 *ov)
         * required. OV518 has no uncompressed mode, to save RAM. */
        if (!dumppix && !ov->compress) {
                ov->compress = 1;
-               warn("Compression required with OV518...enabling");
+               dev_warn(&ov->dev->dev,
+                        "Compression required with OV518...enabling\n");
        }
 
        if (ov->bridge == BRG_OV518) {
index e986c28b7bb0f73ab289260c12f24a5cc44b5e1c..da27a5287983f79716bf61543b1cfe834d03188a 100644 (file)
@@ -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;
        }
index 05c61b52311541dbee042c9d9039f8260ede9d5a..4459b8a7f818775359ebecdef1926fe211cd27a9 100644 (file)
@@ -93,7 +93,7 @@ static void qcm_register_input(struct qcm *cam, struct usb_device *dev)
 
        cam->input = input_dev = input_allocate_device();
        if (!input_dev) {
-               warn("insufficient mem for cam input device");
+               dev_warn(&dev->dev, "insufficient mem for cam input device\n");
                return;
        }
 
@@ -107,8 +107,9 @@ static void qcm_register_input(struct qcm *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;
        }
@@ -587,8 +588,9 @@ static int qcm_compress_iso(struct uvd *uvd, struct urb *dataurb)
                        dataurb->iso_frame_desc[i].offset;
 
                if (st < 0) {
-                       warn("Data error: packet=%d. len=%d. status=%d.",
-                             i, n, st);
+                       dev_warn(&uvd->dev->dev,
+                                "Data error: packet=%d. len=%d. status=%d.\n",
+                                i, n, st);
                        uvd->stats.iso_err_count++;
                        continue;
                }
@@ -699,7 +701,7 @@ static void qcm_stop_data(struct uvd *uvd)
 
        ret = qcm_camera_off(uvd);
        if (ret)
-               warn("couldn't turn the cam off.");
+               dev_warn(&uvd->dev->dev, "couldn't turn the cam off.\n");
 
        uvd->streaming = 0;