lkml.org 
[lkml]   [2012]   [Sep]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/2] extcon: unregister compat link on cleanup
Date
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>
---
drivers/extcon/extcon_class.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/extcon/extcon_class.c b/drivers/extcon/extcon_class.c
index 6e914d0..7610b4e 100644
--- a/drivers/extcon/extcon_class.c
+++ b/drivers/extcon/extcon_class.c
@@ -575,6 +575,11 @@ static void extcon_cleanup(struct extcon_dev *edev, bool skip)
kfree(edev->cables);
}

+#if defined(CONFIG_ANDROID)
+ if (switch_class)
+ ret = class_compat_remove_link(switch_class, edev->dev,
+ NULL);
+#endif /* CONFIG_ANDROID */
device_unregister(edev->dev);
put_device(edev->dev);
}
--
1.7.8.6


\
 
 \ /
  Last update: 2012-09-22 04:21    [W:0.035 / U:0.576 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site