The patch number 9717 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]>
em28xx: improve message probing logs


On some em28xx devices, there's an unused interface. This is printed on
the logs as an error. We can just ignore that interface.

Priority: normal

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


---

 linux/drivers/media/video/em28xx/em28xx-video.c |   40 ++++++++++------
 1 file changed, 26 insertions(+), 14 deletions(-)

diff -r 90deb49c4730 -r 1f8fb668c54b 
linux/drivers/media/video/em28xx/em28xx-video.c
--- a/linux/drivers/media/video/em28xx/em28xx-video.c   Sat Nov 22 11:39:10 
2008 -0200
+++ b/linux/drivers/media/video/em28xx/em28xx-video.c   Sat Nov 22 11:50:38 
2008 -0200
@@ -2280,12 +2280,6 @@ static int em28xx_usb_probe(struct usb_i
                return -ENODEV;
        }
 
-       em28xx_err(DRIVER_NAME " new video device (%04x:%04x): interface %i, 
class %i\n",
-                       udev->descriptor.idVendor,
-                       udev->descriptor.idProduct,
-                       ifnum,
-                       interface->altsetting[0].desc.bInterfaceClass);
-
        endpoint = &interface->cur_altsetting->endpoint[0].desc;
 
        /* check if the device has the iso in endpoint at the correct place */
@@ -2296,20 +2290,38 @@ static int em28xx_usb_probe(struct usb_i
                /* It's a newer em2874/em2875 device */
                isoc_pipe = 0;
        } else {
+               int check_interface = 1;
                isoc_pipe = 1;
                endpoint = &interface->cur_altsetting->endpoint[1].desc;
                if ((endpoint->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) !=
-                   USB_ENDPOINT_XFER_ISOC) {
-                       em28xx_err(DRIVER_NAME " probing error: endpoint is 
non-ISO endpoint!\n");
+                   USB_ENDPOINT_XFER_ISOC)
+                       check_interface = 0;
+
+               if ((endpoint->bEndpointAddress & USB_ENDPOINT_DIR_MASK) == 
USB_DIR_OUT)
+                       check_interface = 0;
+
+               if (!check_interface) {
+                       em28xx_err(DRIVER_NAME " video device (%04x:%04x): "
+                               "interface %i, class %i found.\n",
+                               udev->descriptor.idVendor,
+                               udev->descriptor.idProduct,
+                               ifnum,
+                               interface->altsetting[0].desc.bInterfaceClass);
+
+                       em28xx_err(DRIVER_NAME " This is an anciliary "
+                               "interface not used by the driver\n");
+
                        em28xx_devused &= ~(1<<nr);
                        return -ENODEV;
                }
-               if ((endpoint->bEndpointAddress & USB_ENDPOINT_DIR_MASK) == 
USB_DIR_OUT) {
-                       em28xx_err(DRIVER_NAME " probing error: endpoint is ISO 
OUT endpoint!\n");
-                       em28xx_devused &= ~(1<<nr);
-                       return -ENODEV;
-               }
-       }
+
+       }
+
+       em28xx_err(DRIVER_NAME " new video device (%04x:%04x): interface %i, 
class %i\n",
+                       udev->descriptor.idVendor,
+                       udev->descriptor.idProduct,
+                       ifnum,
+                       interface->altsetting[0].desc.bInterfaceClass);
 
        if (nr >= EM28XX_MAXBOARDS) {
                printk(DRIVER_NAME ": Supports only %i em28xx boards.\n",


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/1f8fb668c54b952f9ead9d93a4278b3ef76e8353

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

Reply via email to