Commit:     de6f92b9ee00e9f841fb1a63d0bd60593ec55dbe
Parent:     6ce4560a39f72e45a273c652ee116f8b0fc6386f
Author:     Greg Kroah-Hartman <[EMAIL PROTECTED]>
AuthorDate: Mon Jan 28 09:50:12 2008 -0800
Committer:  Greg Kroah-Hartman <[EMAIL PROTECTED]>
CommitDate: Fri Feb 1 14:34:46 2008 -0800

    USB: handle idVendor of 0x0000
    Some crazy devices in the wild have a vendor id of 0x0000.  If we try to
    add a module alias with this id, we just can't do it due to a check in
    the file2alias.c file.  Change the test to verify that both the vendor
    and product ids are 0x0000 to show a real "blank" module alias.
    Note, the module-init-tools package also needs to be changed to properly
    generate the depmod tables.
    Cc: Janusz <[EMAIL PROTECTED]>
    Cc: stable <[EMAIL PROTECTED]>
    Cc: Jon Masters <[EMAIL PROTECTED]>
    Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
 drivers/usb/core/driver.c |    4 ++--
 scripts/mod/file2alias.c  |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c
index 7c3aaa9..96d3f85 100644
--- a/drivers/usb/core/driver.c
+++ b/drivers/usb/core/driver.c
@@ -534,8 +534,8 @@ const struct usb_device_id *usb_match_id(struct 
usb_interface *interface,
           id->driver_info is the way to create an entry that
           indicates that the driver want to examine every
           device and interface. */
-       for (; id->idVendor || id->bDeviceClass || id->bInterfaceClass ||
-              id->driver_info; id++) {
+       for (; id->idVendor || id->idProduct || id->bDeviceClass ||
+              id->bInterfaceClass || id->driver_info; id++) {
                if (usb_match_one_id(interface, id))
                        return id;
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
index d802b5a..9ddf944 100644
--- a/scripts/mod/file2alias.c
+++ b/scripts/mod/file2alias.c
@@ -155,7 +155,7 @@ static void do_usb_entry_multi(struct usb_device_id *id, 
struct module *mod)
         * Some modules (visor) have empty slots as placeholder for
         * run-time specification that results in catch-all alias
-       if (!(id->idVendor | id->bDeviceClass | id->bInterfaceClass))
+       if (!(id->idVendor | id->idProduct | id->bDeviceClass | 
        /* Convert numeric bcdDevice range into fnmatch-able pattern(s) */
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to