ChangeSet 1.971.1.9, 2003/01/15 12:49:35-08:00, henning@meier-geinitz.de

[PATCH] scanner.c: print user-supplied ids only on start-up

With this patch, information about user-supplied ids is printed only
once at startup instead of everytime any USB device is plugged in.

The patch is on top of the new ids patch.


diff -Nru a/drivers/usb/scanner.c b/drivers/usb/scanner.c
--- a/drivers/usb/scanner.c	Thu Jan 16 10:51:57 2003
+++ b/drivers/usb/scanner.c	Thu Jan 16 10:51:57 2003
@@ -332,6 +332,8 @@
  *
  * 0.4.10  01/07/2003
  *    - Added vendor/product ids for Visioneer scanners.
+ *    - Print information about user-supplied ids only once at startup instead
+ *      of everytime any USB device is plugged in.
  *
  * TODO
  *    - Remove the 2/3 endpoint limitation
@@ -852,10 +854,6 @@
 	char have_bulk_in, have_bulk_out, have_intr;
 	char name[10];
 
-	if (vendor != -1 && product != -1) {
-		info("probe_scanner: User specified USB scanner -- Vendor:Product - %x:%x", vendor, product);
-	}
-
 	dbg("probe_scanner: USB dev address:%p", dev);
 	dbg("probe_scanner: ifnum:%u", ifnum);
 
@@ -1154,6 +1152,8 @@
                 return -1;
 
 	info(DRIVER_VERSION ":" DRIVER_DESC);
+	if (vendor != -1 && product != -1)
+		info("probe_scanner: User specified USB scanner -- Vendor:Product - %x:%x", vendor, product);
 	return 0;
 }
 
