projects
/
GitHub
/
LineageOS
/
android_kernel_samsung_universal7580.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0dc77b6
)
extcon: unregister compat link on cleanup
author
Peter Huewe
<peterhuewe@gmx.de>
Mon, 24 Sep 2012 06:36:24 +0000
(15:36 +0900)
committer
MyungJoo Ham
<myungjoo.ham@samsung.com>
Tue, 23 Oct 2012 07:32:12 +0000
(16:32 +0900)
Since extcon registers this compat link at device registration
(extcon_dev_register), we should probably remove them at deregistration/cleanup.
Cc: stable@vger.kernel.org
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
drivers/extcon/extcon-class.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/extcon/extcon-class.c
b/drivers/extcon/extcon-class.c
index 63715cdfe9888d4e19669ea65e2026f425629f1a..54dc00b7b9f682242b2cd70bb266c4f2054fb4c6 100644
(file)
--- a/
drivers/extcon/extcon-class.c
+++ b/
drivers/extcon/extcon-class.c
@@
-570,6
+570,10
@@
static void extcon_cleanup(struct extcon_dev *edev, bool skip)
kfree(edev->cables);
}
+#if defined(CONFIG_ANDROID)
+ if (switch_class)
+ class_compat_remove_link(switch_class, edev->dev, NULL);
+#endif
device_unregister(edev->dev);
put_device(edev->dev);
}