diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2008-01-28 12:50:12 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-02-01 17:34:46 -0500 |
commit | de6f92b9ee00e9f841fb1a63d0bd60593ec55dbe (patch) | |
tree | fcd4403920eb1a29a515a5b59130ea61e6e9cffc /drivers | |
parent | 6ce4560a39f72e45a273c652ee116f8b0fc6386f (diff) |
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 <janumix@poczta.fm>
Cc: stable <stable@kernel.org>
Cc: Jon Masters <jcm@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/core/driver.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c index 7c3aaa9c5402..96d3f852f4ad 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, | |||
534 | id->driver_info is the way to create an entry that | 534 | id->driver_info is the way to create an entry that |
535 | indicates that the driver want to examine every | 535 | indicates that the driver want to examine every |
536 | device and interface. */ | 536 | device and interface. */ |
537 | for (; id->idVendor || id->bDeviceClass || id->bInterfaceClass || | 537 | for (; id->idVendor || id->idProduct || id->bDeviceClass || |
538 | id->driver_info; id++) { | 538 | id->bInterfaceClass || id->driver_info; id++) { |
539 | if (usb_match_one_id(interface, id)) | 539 | if (usb_match_one_id(interface, id)) |
540 | return id; | 540 | return id; |
541 | } | 541 | } |