diff options
author | Ping Cheng <pinglinux@gmail.com> | 2014-11-20 19:31:12 -0500 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2014-11-26 04:41:44 -0500 |
commit | 954df6ad00ea2ba732e2e7ae6a68b3111eee4e09 (patch) | |
tree | 50f36fe1879b58d87ddb1e4ac6e47baa9a571863 /drivers/hid/wacom_sys.c | |
parent | 26fe41245f43c86f65cae272a2851dd792e443f7 (diff) |
HID: wacom: PAD is independent with pen/touch
PAD can be on pen interface (Intuos Pro and Cintiq series) or touch
interface (Bamboo PT and Intuos PT series) or its own interface
(Bamboo pen-only and Intuos Pen M/S). We need to mark it independently.
Signed-off-by: Ping Cheng <pingc@wacom.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.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, 5 insertions, 3 deletions
diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c index 68b6cd66f9c3..eb5531657e41 100644 --- a/drivers/hid/wacom_sys.c +++ b/drivers/hid/wacom_sys.c | |||
@@ -1135,7 +1135,7 @@ static void wacom_clean_inputs(struct wacom *wacom) | |||
1135 | input_free_device(wacom->wacom_wac.input); | 1135 | input_free_device(wacom->wacom_wac.input); |
1136 | } | 1136 | } |
1137 | if (wacom->wacom_wac.pad_input) { | 1137 | if (wacom->wacom_wac.pad_input) { |
1138 | if (wacom->wacom_wac.input_registered) | 1138 | if (wacom->wacom_wac.pad_registered) |
1139 | input_unregister_device(wacom->wacom_wac.pad_input); | 1139 | input_unregister_device(wacom->wacom_wac.pad_input); |
1140 | else | 1140 | else |
1141 | input_free_device(wacom->wacom_wac.pad_input); | 1141 | input_free_device(wacom->wacom_wac.pad_input); |
@@ -1162,6 +1162,7 @@ static int wacom_register_inputs(struct wacom *wacom) | |||
1162 | error = input_register_device(input_dev); | 1162 | error = input_register_device(input_dev); |
1163 | if (error) | 1163 | if (error) |
1164 | return error; | 1164 | return error; |
1165 | wacom_wac->input_registered = true; | ||
1165 | } | 1166 | } |
1166 | 1167 | ||
1167 | error = wacom_setup_pad_input_capabilities(pad_input_dev, wacom_wac); | 1168 | error = wacom_setup_pad_input_capabilities(pad_input_dev, wacom_wac); |
@@ -1174,22 +1175,23 @@ static int wacom_register_inputs(struct wacom *wacom) | |||
1174 | error = input_register_device(pad_input_dev); | 1175 | error = input_register_device(pad_input_dev); |
1175 | if (error) | 1176 | if (error) |
1176 | goto fail_register_pad_input; | 1177 | goto fail_register_pad_input; |
1178 | wacom_wac->pad_registered = true; | ||
1177 | 1179 | ||
1178 | error = wacom_initialize_leds(wacom); | 1180 | error = wacom_initialize_leds(wacom); |
1179 | if (error) | 1181 | if (error) |
1180 | goto fail_leds; | 1182 | goto fail_leds; |
1181 | } | 1183 | } |
1182 | 1184 | ||
1183 | wacom_wac->input_registered = true; | ||
1184 | |||
1185 | return 0; | 1185 | return 0; |
1186 | 1186 | ||
1187 | fail_leds: | 1187 | fail_leds: |
1188 | input_unregister_device(pad_input_dev); | 1188 | input_unregister_device(pad_input_dev); |
1189 | pad_input_dev = NULL; | 1189 | pad_input_dev = NULL; |
1190 | wacom_wac->pad_registered = false; | ||
1190 | fail_register_pad_input: | 1191 | fail_register_pad_input: |
1191 | input_unregister_device(input_dev); | 1192 | input_unregister_device(input_dev); |
1192 | wacom_wac->input = NULL; | 1193 | wacom_wac->input = NULL; |
1194 | wacom_wac->input_registered = false; | ||
1193 | return error; | 1195 | return error; |
1194 | } | 1196 | } |
1195 | 1197 | ||