HID: wacom: don't manually release resources for the EKR
authorAaron Armstrong Skomra <skomra@gmail.com>
Mon, 6 Mar 2017 18:54:58 +0000 (10:54 -0800)
committerJiri Kosina <jkosina@suse.cz>
Tue, 21 Mar 2017 13:44:37 +0000 (14:44 +0100)
Commit 5b779fc introduces the manual release of resources in wacom_remove() as
an addition to the driver's use of devm.  The EKR resources can only be
released through wacom_remote_destroy_one() so we skip the manual release for
it.

Fixes: 5b779fc ("HID: wacom: release the resources before leaving despite devm")
Signed-off-by: Aaron Armstrong Skomra <skomra@gmail.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/wacom_sys.c

index be8f7e2a026f428f51200e395792dd715a612eeb..994bddc55b82272c52d6c3224828f75a42d24dbe 100644 (file)
@@ -2579,7 +2579,9 @@ static void wacom_remove(struct hid_device *hdev)
 
        /* make sure we don't trigger the LEDs */
        wacom_led_groups_release(wacom);
-       wacom_release_resources(wacom);
+
+       if (wacom->wacom_wac.features.type != REMOTE)
+               wacom_release_resources(wacom);
 
        hid_set_drvdata(hdev, NULL);
 }