From: Ping Cheng <pingli...@gmail.com>

ENODEV indicates no device is added. Hence, the associated pad input device
is simply freed.

Signed-off-by: Ping Cheng <pi...@wacom.com>
Reviewed-by:  Benjamin Tissoires <benjamin.tissoi...@redhat.com>
Signed-off-by: Jiri Kosina <jkos...@suse.cz>
---
 3.17/wacom_wac.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/3.17/wacom_wac.c b/3.17/wacom_wac.c
index 1048295..63821c0 100644
--- a/3.17/wacom_wac.c
+++ b/3.17/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;
 }
-- 
2.1.3


------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to