The patch number 9340 was added via Mauro Carvalho Chehab <[EMAIL PROTECTED]>
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
        [EMAIL PROTECTED]

------

From: Mauro Carvalho Chehab  <[EMAIL PROTECTED]>
backport commit aa82661baf8a48379355ffa8bf162b07cf487600


Author: Greg Kroah-Hartman <[EMAIL PROTECTED]>

    USB: remove warn() macro from usb media drivers

    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().

kernel-sync:

Priority: normal

Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]>


---

 linux/drivers/media/radio/dsbr100.c                     |   13 ++++--
 linux/drivers/media/video/dabusb.c                      |    4 +-
 linux/drivers/media/video/ov511.c                       |   19 ++++++----
 linux/drivers/media/video/usbvideo/konicawc.c           |    8 ++--
 linux/drivers/media/video/usbvideo/quickcam_messenger.c |   14 ++++---
 5 files changed, 35 insertions(+), 23 deletions(-)

diff -r add7478742b4 -r 7015ea64356b linux/drivers/media/radio/dsbr100.c
--- a/linux/drivers/media/radio/dsbr100.c       Sat Oct 18 20:28:37 2008 -0700
+++ b/linux/drivers/media/radio/dsbr100.c       Thu Aug 14 09:37:34 2008 -0700
@@ -311,7 +311,7 @@ static int vidioc_s_frequency(struct fil
 
        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 *fi
        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;
                        }
                }
@@ -417,7 +419,8 @@ static int usb_dsbr100_open(struct inode
        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;
@@ -514,7 +517,7 @@ static int usb_dsbr100_probe(struct usb_
        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);
diff -r add7478742b4 -r 7015ea64356b linux/drivers/media/video/dabusb.c
--- a/linux/drivers/media/video/dabusb.c        Sat Oct 18 20:28:37 2008 -0700
+++ b/linux/drivers/media/video/dabusb.c        Thu Aug 14 09:37:34 2008 -0700
@@ -202,7 +202,7 @@ static void dabusb_iso_complete (struct 
                                        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);
        }
@@ -299,7 +299,7 @@ static int dabusb_bulk (pdabusb_t s, pbu
        }
 
        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");
        }
diff -r add7478742b4 -r 7015ea64356b linux/drivers/media/video/ov511.c
--- a/linux/drivers/media/video/ov511.c Sat Oct 18 20:28:37 2008 -0700
+++ b/linux/drivers/media/video/ov511.c Thu Aug 14 09:37:34 2008 -0700
@@ -1098,9 +1098,10 @@ ov51x_clear_snapshot(struct usb_ov511 *o
                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 *o
        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;
@@ -5221,7 +5224,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;
 }
@@ -5460,7 +5464,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) {
diff -r add7478742b4 -r 7015ea64356b 
linux/drivers/media/video/usbvideo/konicawc.c
--- a/linux/drivers/media/video/usbvideo/konicawc.c     Sat Oct 18 20:28:37 
2008 -0700
+++ b/linux/drivers/media/video/usbvideo/konicawc.c     Thu Aug 14 09:37:34 
2008 -0700
@@ -234,7 +234,8 @@ static void konicawc_register_input(stru
 
        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;
        }
 
@@ -252,8 +253,9 @@ static void konicawc_register_input(stru
 
        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;
        }
diff -r add7478742b4 -r 7015ea64356b 
linux/drivers/media/video/usbvideo/quickcam_messenger.c
--- a/linux/drivers/media/video/usbvideo/quickcam_messenger.c   Sat Oct 18 
20:28:37 2008 -0700
+++ b/linux/drivers/media/video/usbvideo/quickcam_messenger.c   Thu Aug 14 
09:37:34 2008 -0700
@@ -98,7 +98,7 @@ static void qcm_register_input(struct qc
 
        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;
        }
 
@@ -116,8 +116,9 @@ static void qcm_register_input(struct qc
 
        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;
        }
@@ -600,8 +601,9 @@ static int qcm_compress_iso(struct uvd *
                        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;
                }
@@ -716,7 +718,7 @@ static void qcm_stop_data(struct uvd *uv
 
        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;
 


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/7015ea64356bcad77996cafe3e301e481e96293a

_______________________________________________
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to