summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Kempin <denniskempin@chromium.org>2013-06-05 13:03:58 -0700
committerPeter Wu <lekensteyn@gmail.com>2013-08-26 15:45:31 +0200
commitdf25eb0dc7ddf3042ca664fd849dac6b1f3630da (patch)
tree875a1eb5ba2494100053e6a4ec63405f7aad6a8d
parentca45ff80203552458df8bc3f44dcf94819d2ae8b (diff)
downloadlinux-df25eb0dc7ddf3042ca664fd849dac6b1f3630da.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: Id34ab2d21fe80c4cf19b750f245be677dbdf7774 Signed-off-by: Dennis Kempin <denniskempin@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/57655 Reviewed-by: Andrew de los Reyes <adlr@chromium.org>
-rw-r--r--drivers/hid/hid-core.c4
-rw-r--r--drivers/hid/hid-logitech-wtp.c4
-rw-r--r--include/linux/hid.h2
3 files changed, 6 insertions, 4 deletions
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 0acea72aee47..bf3334bfe4fe 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -1635,8 +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_DEVICE(BUS_DJ, 0, USB_VENDOR_ID_LOGITECH, UNIFYING_DEVICE_ID_WIRELESS_TOUCHPAD) },
- { HID_DEVICE(BUS_DJ, 0, 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_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 44dbcfa5c576..0d2422722e84 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, 0, USB_VENDOR_ID_LOGITECH, UNIFYING_DEVICE_ID_WIRELESS_TOUCHPAD) },
- {HID_DEVICE(BUS_DJ, 0, 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..2aed13e8aa3e 100644
--- a/include/linux/hid.h
+++ b/include/linux/hid.h
@@ -563,6 +563,8 @@ struct hid_descriptor {
.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)