summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Kempin <denniskempin@chromium.org>2013-06-05 13:03:58 -0700
committerPeter Wu <lekensteyn@gmail.com>2013-09-04 22:28:57 +0200
commit2eadb6ff496ced1daa7e4481ae99a9c97a3dd928 (patch)
treed956ed68ed3072b21243bed4dce0db1149412f13
parentc2d078024e4cab62b360cdc1b88b06ad1fccfb61 (diff)
downloadlinux-2eadb6ff496ced1daa7e4481ae99a9c97a3dd928.tar.gz
CHROMIUM: hid.h: Added HID_DJ_DEVICE macro
This macro allows devices on the DJ bus to be defined the same way as devices on the bluetooth and usb bus. Most importantly it has the same API for Kernel 3.8 and 3.4, which is not the case for the HID_DEVICE macro. BUG=chromium:240850 TEST=no functional change. Change-Id: I89e197a5c7f0129f1f5b55182cbba6af5c326e91 Signed-off-by: Dennis Kempin <denniskempin@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/57662 Reviewed-by: Andrew de los Reyes <adlr@chromium.org>
-rw-r--r--drivers/hid/hid-core.c2
-rw-r--r--drivers/hid/hid-logitech-wtp.c4
-rw-r--r--include/linux/hid.h4
3 files changed, 7 insertions, 3 deletions
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index e7e69f2f9a81..43d8027e0204 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -1635,6 +1635,8 @@ static const struct hid_device_id hid_have_special_driver[] = {
{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_UNIFYING_RECEIVER) },
{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_UNIFYING_RECEIVER_2) },
#endif
+ { HID_DJ_DEVICE(USB_VENDOR_ID_LOGITECH, UNIFYING_DEVICE_ID_WIRELESS_TOUCHPAD) },
+ { HID_DJ_DEVICE(USB_VENDOR_ID_LOGITECH, UNIFYING_DEVICE_ID_WIRELESS_TOUCHPAD_T650) },
{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_WII_WHEEL) },
{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_RUMBLEPAD2) },
{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_SPACETRAVELLER) },
diff --git a/drivers/hid/hid-logitech-wtp.c b/drivers/hid/hid-logitech-wtp.c
index 2f0ecc6b9202..239ed4a041a8 100644
--- a/drivers/hid/hid-logitech-wtp.c
+++ b/drivers/hid/hid-logitech-wtp.c
@@ -69,8 +69,8 @@ MODULE_LICENSE("GPL");
/* Supported Devices */
static const struct hid_device_id wtp_devices[] = {
- {HID_DEVICE(BUS_DJ, USB_VENDOR_ID_LOGITECH, UNIFYING_DEVICE_ID_WIRELESS_TOUCHPAD) },
- {HID_DEVICE(BUS_DJ, USB_VENDOR_ID_LOGITECH, UNIFYING_DEVICE_ID_WIRELESS_TOUCHPAD_T650) },
+ {HID_DJ_DEVICE(USB_VENDOR_ID_LOGITECH, UNIFYING_DEVICE_ID_WIRELESS_TOUCHPAD) },
+ {HID_DJ_DEVICE(USB_VENDOR_ID_LOGITECH, UNIFYING_DEVICE_ID_WIRELESS_TOUCHPAD_T650) },
{HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_WIRELESS_TOUCHPAD_T651) },
{ }
};
diff --git a/include/linux/hid.h b/include/linux/hid.h
index 0c48991b0402..2d66c4152a40 100644
--- a/include/linux/hid.h
+++ b/include/linux/hid.h
@@ -559,10 +559,12 @@ struct hid_descriptor {
#define HID_DEVICE(b, g, ven, prod) \
.bus = (b), .group = (g), .vendor = (ven), .product = (prod)
-#define HID_USB_DEVICE(ven, prod) \
+#define HID_USB_DEVICE(ven, prod) \
.bus = BUS_USB, .vendor = (ven), .product = (prod)
#define HID_BLUETOOTH_DEVICE(ven, prod) \
.bus = BUS_BLUETOOTH, .vendor = (ven), .product = (prod)
+#define HID_DJ_DEVICE(ven, prod) \
+ .bus = BUS_DJ, .vendor = (ven), .product = (prod)
#define HID_REPORT_ID(rep) \
.report_type = (rep)