aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/em28xx
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2008-11-22 08:50:38 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-12-29 14:53:40 -0500
commitc9455fbb159711ca7a2ee5a67f0e7ca43287bbd7 (patch)
tree3dded838cf6abd509be74fb56a3a39a5575882ec /drivers/media/video/em28xx
parent6e4ae872c580d6a388a52ddfdfc93b4215af1180 (diff)
V4L/DVB (9717): 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. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/em28xx')
-rw-r--r--drivers/media/video/em28xx/em28xx-video.c38
1 files changed, 25 insertions, 13 deletions
diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c
index b262091415b..5cf32aed8c2 100644
--- a/drivers/media/video/em28xx/em28xx-video.c
+++ b/drivers/media/video/em28xx/em28xx-video.c
@@ -2196,12 +2196,6 @@ static int em28xx_usb_probe(struct usb_interface *interface,
2196 return -ENODEV; 2196 return -ENODEV;
2197 } 2197 }
2198 2198
2199 em28xx_err(DRIVER_NAME " new video device (%04x:%04x): interface %i, class %i\n",
2200 udev->descriptor.idVendor,
2201 udev->descriptor.idProduct,
2202 ifnum,
2203 interface->altsetting[0].desc.bInterfaceClass);
2204
2205 endpoint = &interface->cur_altsetting->endpoint[0].desc; 2199 endpoint = &interface->cur_altsetting->endpoint[0].desc;
2206 2200
2207 /* check if the device has the iso in endpoint at the correct place */ 2201 /* check if the device has the iso in endpoint at the correct place */
@@ -2212,21 +2206,39 @@ static int em28xx_usb_probe(struct usb_interface *interface,
2212 /* It's a newer em2874/em2875 device */ 2206 /* It's a newer em2874/em2875 device */
2213 isoc_pipe = 0; 2207 isoc_pipe = 0;
2214 } else { 2208 } else {
2209 int check_interface = 1;
2215 isoc_pipe = 1; 2210 isoc_pipe = 1;
2216 endpoint = &interface->cur_altsetting->endpoint[1].desc; 2211 endpoint = &interface->cur_altsetting->endpoint[1].desc;
2217 if ((endpoint->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) != 2212 if ((endpoint->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) !=
2218 USB_ENDPOINT_XFER_ISOC) { 2213 USB_ENDPOINT_XFER_ISOC)
2219 em28xx_err(DRIVER_NAME " probing error: endpoint is non-ISO endpoint!\n"); 2214 check_interface = 0;
2220 em28xx_devused &= ~(1<<nr); 2215
2221 return -ENODEV; 2216 if ((endpoint->bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_OUT)
2222 } 2217 check_interface = 0;
2223 if ((endpoint->bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_OUT) { 2218
2224 em28xx_err(DRIVER_NAME " probing error: endpoint is ISO OUT endpoint!\n"); 2219 if (!check_interface) {
2220 em28xx_err(DRIVER_NAME " video device (%04x:%04x): "
2221 "interface %i, class %i found.\n",
2222 udev->descriptor.idVendor,
2223 udev->descriptor.idProduct,
2224 ifnum,
2225 interface->altsetting[0].desc.bInterfaceClass);
2226
2227 em28xx_err(DRIVER_NAME " This is an anciliary "
2228 "interface not used by the driver\n");
2229
2225 em28xx_devused &= ~(1<<nr); 2230 em28xx_devused &= ~(1<<nr);
2226 return -ENODEV; 2231 return -ENODEV;
2227 } 2232 }
2233
2228 } 2234 }
2229 2235
2236 em28xx_err(DRIVER_NAME " new video device (%04x:%04x): interface %i, class %i\n",
2237 udev->descriptor.idVendor,
2238 udev->descriptor.idProduct,
2239 ifnum,
2240 interface->altsetting[0].desc.bInterfaceClass);
2241
2230 if (nr >= EM28XX_MAXBOARDS) { 2242 if (nr >= EM28XX_MAXBOARDS) {
2231 printk(DRIVER_NAME ": Supports only %i em28xx boards.\n", 2243 printk(DRIVER_NAME ": Supports only %i em28xx boards.\n",
2232 EM28XX_MAXBOARDS); 2244 EM28XX_MAXBOARDS);