aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Tissoires <benjamin.tissoires@redhat.com>2014-07-24 16:00:03 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2014-07-25 21:53:52 -0400
commitb6c79f2ca1032e2da7ad8523b83f0cf5cc04dbc0 (patch)
tree862c76a0cac60a0f135a9965333e15eb6ca671be
parentc31a408f7a44cd5fd134a7f0c0d29744261de2d9 (diff)
Input: wacom - register the input devices on top of the HID one
Matches the current behavior of the HID subsystem and removes one more dependency over USB. The current user space clients which relies on this to fetch the LEDs path need an update. However, we already break them in the kernel v3.11 for the Bluetooth Wacom devices. They are going to be fixed soon. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: Jason Gerecke <killertofu@gmail.com> Tested-by: Jason Gerecke <killertofu@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-rw-r--r--drivers/input/tablet/wacom.h1
-rw-r--r--drivers/input/tablet/wacom_sys.c15
2 files changed, 8 insertions, 8 deletions
diff --git a/drivers/input/tablet/wacom.h b/drivers/input/tablet/wacom.h
index b9212390db71..dd67b7da8a97 100644
--- a/drivers/input/tablet/wacom.h
+++ b/drivers/input/tablet/wacom.h
@@ -112,7 +112,6 @@ struct wacom {
112 struct hid_device *hdev; 112 struct hid_device *hdev;
113 struct mutex lock; 113 struct mutex lock;
114 struct work_struct work; 114 struct work_struct work;
115 char phys[32];
116 struct wacom_led { 115 struct wacom_led {
117 u8 select[2]; /* status led selector (0..3) */ 116 u8 select[2]; /* status led selector (0..3) */
118 u8 llv; /* status led brightness no button (1..127) */ 117 u8 llv; /* status led brightness no button (1..127) */
diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c
index 6e21064de661..265044313fce 100644
--- a/drivers/input/tablet/wacom_sys.c
+++ b/drivers/input/tablet/wacom_sys.c
@@ -986,8 +986,7 @@ static void wacom_destroy_battery(struct wacom *wacom)
986static struct input_dev *wacom_allocate_input(struct wacom *wacom) 986static struct input_dev *wacom_allocate_input(struct wacom *wacom)
987{ 987{
988 struct input_dev *input_dev; 988 struct input_dev *input_dev;
989 struct usb_interface *intf = wacom->intf; 989 struct hid_device *hdev = wacom->hdev;
990 struct usb_device *dev = interface_to_usbdev(intf);
991 struct wacom_wac *wacom_wac = &(wacom->wacom_wac); 990 struct wacom_wac *wacom_wac = &(wacom->wacom_wac);
992 991
993 input_dev = input_allocate_device(); 992 input_dev = input_allocate_device();
@@ -995,11 +994,15 @@ static struct input_dev *wacom_allocate_input(struct wacom *wacom)
995 return NULL; 994 return NULL;
996 995
997 input_dev->name = wacom_wac->name; 996 input_dev->name = wacom_wac->name;
998 input_dev->phys = wacom->phys; 997 input_dev->phys = hdev->phys;
999 input_dev->dev.parent = &intf->dev; 998 input_dev->dev.parent = &hdev->dev;
1000 input_dev->open = wacom_open; 999 input_dev->open = wacom_open;
1001 input_dev->close = wacom_close; 1000 input_dev->close = wacom_close;
1002 usb_to_input_id(dev, &input_dev->id); 1001 input_dev->uniq = hdev->uniq;
1002 input_dev->id.bustype = hdev->bus;
1003 input_dev->id.vendor = hdev->vendor;
1004 input_dev->id.product = hdev->product;
1005 input_dev->id.version = hdev->version;
1003 input_set_drvdata(input_dev, wacom); 1006 input_set_drvdata(input_dev, wacom);
1004 1007
1005 return input_dev; 1008 return input_dev;
@@ -1266,8 +1269,6 @@ static int wacom_probe(struct hid_device *hdev,
1266 wacom->intf = intf; 1269 wacom->intf = intf;
1267 mutex_init(&wacom->lock); 1270 mutex_init(&wacom->lock);
1268 INIT_WORK(&wacom->work, wacom_wireless_work); 1271 INIT_WORK(&wacom->work, wacom_wireless_work);
1269 usb_make_path(dev, wacom->phys, sizeof(wacom->phys));
1270 strlcat(wacom->phys, "/input0", sizeof(wacom->phys));
1271 1272
1272 /* set the default size in case we do not get them from hid */ 1273 /* set the default size in case we do not get them from hid */
1273 wacom_set_default_phy(features); 1274 wacom_set_default_phy(features);