summaryrefslogtreecommitdiff
path: root/drivers/usb/input/powermate.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dtor_core@ameritech.net>2005-06-30 00:49:08 -0500
committerDmitry Torokhov <dtor_core@ameritech.net>2005-06-30 00:49:08 -0500
commit16a334c0de5a94b1d10a1ac9a33f4dedac89a075 (patch)
treebb01b1185d806994cd318a7af68a438a9e57c2a2 /drivers/usb/input/powermate.c
parentc27a748225fe5c7e485ea471178c26e43f9f7fbe (diff)
Input: introduce usb_to_input_id() to uniformly produce
struct input_id for USB input devices. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/usb/input/powermate.c')
-rw-r--r--drivers/usb/input/powermate.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/usb/input/powermate.c b/drivers/usb/input/powermate.c
index 3975b309d55f..ad4afe7e5897 100644
--- a/drivers/usb/input/powermate.c
+++ b/drivers/usb/input/powermate.c
@@ -35,6 +35,7 @@
#include <linux/init.h>
#include <linux/spinlock.h>
#include <linux/usb.h>
+#include <linux/usb_input.h>
#define POWERMATE_VENDOR 0x077d /* Griffin Technology, Inc. */
#define POWERMATE_PRODUCT_NEW 0x0410 /* Griffin PowerMate */
@@ -389,10 +390,7 @@ static int powermate_probe(struct usb_interface *intf, const struct usb_device_i
pm->input.keybit[LONG(BTN_0)] = BIT(BTN_0);
pm->input.relbit[LONG(REL_DIAL)] = BIT(REL_DIAL);
pm->input.mscbit[LONG(MSC_PULSELED)] = BIT(MSC_PULSELED);
- pm->input.id.bustype = BUS_USB;
- pm->input.id.vendor = le16_to_cpu(udev->descriptor.idVendor);
- pm->input.id.product = le16_to_cpu(udev->descriptor.idProduct);
- pm->input.id.version = le16_to_cpu(udev->descriptor.bcdDevice);
+ usb_to_input_id(udev, &pm->input.id);
pm->input.event = powermate_input_event;
pm->input.dev = &intf->dev;
pm->input.phys = pm->phys;