patch-2.3.50 linux/drivers/usb/usb.c

Next file: linux/drivers/video/Config.in
Previous file: linux/drivers/usb/usb-serial.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.49/linux/drivers/usb/usb.c linux/drivers/usb/usb.c
@@ -410,21 +410,27 @@
 {
 	unsigned ifnum;
 	unsigned rejected = 0;
+	unsigned claimed = 0;
 
 	for (ifnum = 0; ifnum < dev->actconfig->bNumInterfaces; ifnum++) {
 		/* if this interface hasn't already been claimed */
 		if (!usb_interface_claimed(dev->actconfig->interface + ifnum)) {
 			if (usb_find_interface_driver(dev, ifnum))
 				rejected++;
+			else
+				claimed++;
 		}
 	}
  
 	if (rejected)
 		dbg("unhandled interfaces on device");
 
+	if (!claimed) {
+		warn("This device is not recognized by any installed USB driver.");
 #ifdef DEBUG
-	usb_show_device(dev);
+		usb_show_device(dev);
 #endif
+	}
 }
 
 /*

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)