USB HID: specify explicit size for hid_blacklist.quirks
authorPaul Walmsley <paul@booyaka.com>
Tue, 20 Mar 2007 18:23:16 +0000 (19:23 +0100)
committerJiri Kosina <jkosina@suse.cz>
Wed, 11 Apr 2007 08:36:02 +0000 (10:36 +0200)
Explicitly specify the size of the hid_blacklist quirks member, to guard
against surprises on architectures where unsigned ints aren't 32 bits long.

Signed-off-by: Paul Walmsley <paul@booyaka.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/usbhid/hid-core.c

index 35a41e60f54178fa887c9be2bc9da58b0a1d3464..5e430813d4d4602578757504b5a9d0585aea9191 100644 (file)
@@ -287,7 +287,7 @@ MODULE_PARM_DESC(mousepoll, "Polling interval of mice");
 static const struct hid_blacklist {
        __u16 idVendor;
        __u16 idProduct;
-       unsigned quirks;
+       __u32 quirks;
 } hid_blacklist[] = {
 
        { USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_WCP32PU, HID_QUIRK_2WHEEL_MOUSE_HACK_7 },
@@ -1063,7 +1063,8 @@ static struct hid_device *usb_hid_configure(struct usb_interface *intf)
        struct usb_device *dev = interface_to_usbdev (intf);
        struct hid_descriptor *hdesc;
        struct hid_device *hid;
-       unsigned quirks = 0, rsize = 0;
+       __u32 quirks = 0;
+       unsigned rsize = 0;
        char *rdesc;
        int n, len, insize = 0;
        struct usbhid_device *usbhid;