The group opened is referenced by the battery description, not the
battery itself.

Signed-off-by: Benjamin Tissoires <benjamin.tissoi...@redhat.com>
---
 3.17/wacom_sys.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/3.17/wacom_sys.c b/3.17/wacom_sys.c
index ed30cf0..380360a 100644
--- a/3.17/wacom_sys.c
+++ b/3.17/wacom_sys.c
@@ -1584,7 +1584,8 @@ static void wacom_destroy_battery(struct wacom *wacom)
 {
        if (WACOM_POWERSUPPLY_DEVICE(wacom->battery.battery)) {
 #ifdef WACOM_POWERSUPPLY_41
-               devres_release_group(&wacom->hdev->dev, wacom->battery.battery);
+               devres_release_group(&wacom->hdev->dev,
+                                    &wacom->battery.bat_desc);
 #else
                power_supply_unregister(&wacom->battery.battery);
 #endif
-- 
2.14.3


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to