diff options
author | Jason Gerecke <killertofu@gmail.com> | 2015-07-13 21:03:45 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.com> | 2015-07-17 05:25:20 -0400 |
commit | 2bdd163cfd262914e8f6152e37aebea2034f801e (patch) | |
tree | 7f7d1800b7a71040427ee6454b9aef1a1ccab59f | |
parent | d9f2d203ab42f099b32ec4580e43eb08b3e4c412 (diff) |
HID: wacom: Set default device name to value from wacom->features
Allocated input devices should not use the 'pen_name' by default since
we do not know at that point in time if that is an appropriate choice
of name. Instead, use the (tool-agnostic) name that is stored in the
device's 'wacom_features' structure. This also has the nice side-effect
of requring us to be explicit about the naming of the pen device, as
we already are for touch and pad devices.
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
-rw-r--r-- | drivers/hid/wacom_sys.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c index 3512d833cc24..2a221630d8dc 100644 --- a/drivers/hid/wacom_sys.c +++ b/drivers/hid/wacom_sys.c | |||
@@ -1130,7 +1130,7 @@ static struct input_dev *wacom_allocate_input(struct wacom *wacom) | |||
1130 | if (!input_dev) | 1130 | if (!input_dev) |
1131 | return NULL; | 1131 | return NULL; |
1132 | 1132 | ||
1133 | input_dev->name = wacom_wac->pen_name; | 1133 | input_dev->name = wacom_wac->features.name; |
1134 | input_dev->phys = hdev->phys; | 1134 | input_dev->phys = hdev->phys; |
1135 | input_dev->dev.parent = &hdev->dev; | 1135 | input_dev->dev.parent = &hdev->dev; |
1136 | input_dev->open = wacom_open; | 1136 | input_dev->open = wacom_open; |
@@ -1183,6 +1183,7 @@ static int wacom_allocate_inputs(struct wacom *wacom) | |||
1183 | return -ENOMEM; | 1183 | return -ENOMEM; |
1184 | } | 1184 | } |
1185 | 1185 | ||
1186 | wacom_wac->pen_input->name = wacom_wac->pen_name; | ||
1186 | wacom_wac->touch_input->name = wacom_wac->touch_name; | 1187 | wacom_wac->touch_input->name = wacom_wac->touch_name; |
1187 | wacom_wac->pad_input->name = wacom_wac->pad_name; | 1188 | wacom_wac->pad_input->name = wacom_wac->pad_name; |
1188 | 1189 | ||