Skip to content

Commit

Permalink
HID: wacom: Set default device name to value from wacom->features
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
jigpu authored and Jiri Kosina committed Jul 17, 2015
1 parent d9f2d20 commit 2bdd163
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/hid/wacom_sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -1130,7 +1130,7 @@ static struct input_dev *wacom_allocate_input(struct wacom *wacom)
if (!input_dev)
return NULL;

input_dev->name = wacom_wac->pen_name;
input_dev->name = wacom_wac->features.name;
input_dev->phys = hdev->phys;
input_dev->dev.parent = &hdev->dev;
input_dev->open = wacom_open;
Expand Down Expand Up @@ -1183,6 +1183,7 @@ static int wacom_allocate_inputs(struct wacom *wacom)
return -ENOMEM;
}

wacom_wac->pen_input->name = wacom_wac->pen_name;
wacom_wac->touch_input->name = wacom_wac->touch_name;
wacom_wac->pad_input->name = wacom_wac->pad_name;

Expand Down

0 comments on commit 2bdd163

Please sign in to comment.