diff options
author | Peter Huewe <peterhuewe@gmx.de> | 2012-09-24 15:36:24 +0900 |
---|---|---|
committer | MyungJoo Ham <myungjoo.ham@samsung.com> | 2012-10-23 20:54:41 +0900 |
commit | 198a6c1d1c6256c9bc9b216bbfe6c8656b13f688 (patch) | |
tree | beb3b0abffc143fe39531641ea74470b7985eb7c | |
parent | afe5f600a6b880ae9858c105e61a5ca7b7062b50 (diff) | |
download | extcon-for-stable.tar.gz |
extcon: unregister compat link on cleanupfor-stable
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>
[myungjoo.ham@samsung.com: merge conflict resolved for stable tree (pre-3.6)]
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
-rw-r--r-- | drivers/extcon/extcon_class.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/extcon/extcon_class.c b/drivers/extcon/extcon_class.c index 01bac3655370e..0a710b063ff5e 100644 --- a/drivers/extcon/extcon_class.c +++ b/drivers/extcon/extcon_class.c @@ -575,6 +575,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); } |