diff options
author | Jason Gerecke <killertofu@gmail.com> | 2015-06-15 18:01:44 -0700 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2015-06-18 10:42:39 +0200 |
commit | 2636a3f2d1421e3e629dfc96489c23727bab17d7 (patch) | |
tree | 6ba45e6baebd01a3c091f8099213dfbb392f76d0 /drivers/hid/wacom_sys.c | |
parent | 862cf5535c0cf4b39ce71a3b7e9a1c22ae4f70ae (diff) | |
download | linux-2636a3f2d1421e3e629dfc96489c23727bab17d7.tar.bz2 |
HID: wacom: Split apart 'wacom_setup_pentouch_input_capabilites'
This splits the 'wacom_setup_pentouch_input_capabilites' function into
pieces dedicated to doing setup for just the pen interface and just
the touch interface. This makes it easier to focus on the relevant
piece when making changes.
This patch introduces no functional changes.
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/wacom_sys.c')
-rw-r--r-- | drivers/hid/wacom_sys.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c index aaa9c84fd985..ca15c7f59dc7 100644 --- a/drivers/hid/wacom_sys.c +++ b/drivers/hid/wacom_sys.c @@ -1199,7 +1199,8 @@ static int wacom_register_inputs(struct wacom *wacom) { struct input_dev *input_dev, *pad_input_dev; struct wacom_wac *wacom_wac = &(wacom->wacom_wac); - int error; + struct wacom_features *features = &wacom_wac->features; + int error = 0; input_dev = wacom_wac->input; pad_input_dev = wacom_wac->pad_input; @@ -1207,7 +1208,10 @@ static int wacom_register_inputs(struct wacom *wacom) if (!input_dev || !pad_input_dev) return -EINVAL; - error = wacom_setup_pentouch_input_capabilities(input_dev, wacom_wac); + if (features->device_type & WACOM_DEVICETYPE_PEN) + error = wacom_setup_pen_input_capabilities(input_dev, wacom_wac); + if (!error && features->device_type & WACOM_DEVICETYPE_TOUCH) + error = wacom_setup_touch_input_capabilities(input_dev, wacom_wac); if (!error) { error = input_register_device(input_dev); if (error) |