diff options
author | Ping Cheng <pinglinux@gmail.com> | 2014-11-18 22:27:48 +0100 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2014-11-20 17:28:42 +0100 |
commit | b3c8e93f99a7f9453be54549ae362b603c42188c (patch) | |
tree | 246f3c6b371b2defa2e5f1b5306ef281687b676b /drivers/hid | |
parent | HID: wacom: Add support for Intuos Pen Medium (diff) | |
download | linux-b3c8e93f99a7f9453be54549ae362b603c42188c.tar.xz linux-b3c8e93f99a7f9453be54549ae362b603c42188c.zip |
HID: wacom - return ENODEV for failed wacom_setup_pad_input_capabilities
ENODEV indicates no device is added. Hence, the associated pad input device
is simply freed.
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')
-rw-r--r-- | drivers/hid/wacom_wac.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c index 104829524bcd..63821c0e8207 100644 --- a/drivers/hid/wacom_wac.c +++ b/drivers/hid/wacom_wac.c @@ -2405,7 +2405,7 @@ int wacom_setup_pad_input_capabilities(struct input_dev *input_dev, case INTUOSPS: /* touch interface does not have the pad device */ if (features->device_type != BTN_TOOL_PEN) - return 1; + return -ENODEV; for (i = 0; i < 7; i++) __set_bit(BTN_0 + i, input_dev->keybit); @@ -2450,7 +2450,7 @@ int wacom_setup_pad_input_capabilities(struct input_dev *input_dev, case BAMBOO_PT: /* pad device is on the touch interface */ if (features->device_type != BTN_TOOL_FINGER) - return 1; + return -ENODEV; __clear_bit(ABS_MISC, input_dev->absbit); @@ -2463,7 +2463,7 @@ int wacom_setup_pad_input_capabilities(struct input_dev *input_dev, default: /* no pad supported */ - return 1; + return -ENODEV; } return 0; } |