Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9f6b37275a9f5fbb0b6657a226a633533a1b2e09
Commit:     9f6b37275a9f5fbb0b6657a226a633533a1b2e09
Parent:     628edcde87592a7ac6e72b555bb03ea265bcfbd2
Author:     Pascal Terjan <[EMAIL PROTECTED]>
AuthorDate: Mon Nov 26 14:03:52 2007 +0100
Committer:  Jiri Kosina <[EMAIL PROTECTED]>
CommitDate: Mon Jan 28 14:51:21 2008 +0100

    HID: Use hid blacklist in usbmouse/usbkbd
    
    This fixes wacom tablets not working if usbmouse is loaded.
    
    Signed-off-by: Pascal Terjan <[EMAIL PROTECTED]>
    Signed-off-by: Jiri Kosina <[EMAIL PROTECTED]>
---
 drivers/hid/usbhid/hid-quirks.c |    2 ++
 drivers/hid/usbhid/usbkbd.c     |    6 ++++++
 drivers/hid/usbhid/usbmouse.c   |    6 ++++++
 3 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c
index dcb102d..23c8993 100644
--- a/drivers/hid/usbhid/hid-quirks.c
+++ b/drivers/hid/usbhid/hid-quirks.c
@@ -911,6 +911,8 @@ u32 usbhid_lookup_quirk(const u16 idVendor, const u16 
idProduct)
        return quirks;
 }
 
+EXPORT_SYMBOL_GPL(usbhid_lookup_quirk);
+
 /*
  * Cherry Cymotion keyboard have an invalid HID report descriptor,
  * that needs fixing before we can parse it.
diff --git a/drivers/hid/usbhid/usbkbd.c b/drivers/hid/usbhid/usbkbd.c
index 775a1ef..a31ccb4 100644
--- a/drivers/hid/usbhid/usbkbd.c
+++ b/drivers/hid/usbhid/usbkbd.c
@@ -235,6 +235,12 @@ static int usb_kbd_probe(struct usb_interface *iface,
        if (!usb_endpoint_is_int_in(endpoint))
                return -ENODEV;
 
+       if (usbhid_lookup_quirk(le16_to_cpu(dev->descriptor.idVendor),
+                               le16_to_cpu(dev->descriptor.idProduct))
+                       & HID_QUIRK_IGNORE) {
+               return -ENODEV;
+       }
+
        pipe = usb_rcvintpipe(dev, endpoint->bEndpointAddress);
        maxp = usb_maxpacket(dev, pipe, usb_pipeout(pipe));
 
diff --git a/drivers/hid/usbhid/usbmouse.c b/drivers/hid/usbhid/usbmouse.c
index f8ad691..8ff1b3f 100644
--- a/drivers/hid/usbhid/usbmouse.c
+++ b/drivers/hid/usbhid/usbmouse.c
@@ -131,6 +131,12 @@ static int usb_mouse_probe(struct usb_interface *intf, 
const struct usb_device_i
        if (!usb_endpoint_is_int_in(endpoint))
                return -ENODEV;
 
+       if (usbhid_lookup_quirk(le16_to_cpu(dev->descriptor.idVendor),
+                               le16_to_cpu(dev->descriptor.idProduct))
+                       & (HID_QUIRK_IGNORE|HID_QUIRK_IGNORE_MOUSE)) {
+               return -ENODEV;
+       }
+
        pipe = usb_rcvintpipe(dev, endpoint->bEndpointAddress);
        maxp = usb_maxpacket(dev, pipe, usb_pipeout(pipe));
 
-
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  http://vger.kernel.org/majordomo-info.html

Reply via email to