From: Peter Huewe <peterhuewe@gmx.de>
To: MyungJoo Ham <myungjoo.ham@samsung.com>
Cc: Chanwoo Choi <cw00.choi@samsung.com>,
linux-kernel@vger.kernel.org, Peter Huewe <peterhuewe@gmx.de>,
stable@vger.kernel.org
Subject: [PATCH 2/2] extcon: unregister compat link on cleanup
Date: Sat, 22 Sep 2012 03:41:10 +0200 [thread overview]
Message-ID: <1348278070-22202-2-git-send-email-peterhuewe@gmx.de> (raw)
In-Reply-To: <1348278070-22202-1-git-send-email-peterhuewe@gmx.de>
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
next prev parent reply other threads:[~2012-09-22 1:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-22 1:41 [PATCH 1/2] extcon: Unregister compat class at module unload to fix oops Peter Huewe
2012-09-22 1:41 ` Peter Huewe [this message]
2012-09-24 7:24 ` [PATCH 2/2] extcon: unregister compat link on cleanup Chanwoo Choi
2012-09-24 7:24 ` [PATCH 1/2] extcon: Unregister compat class at module unload to fix oops Chanwoo Choi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1348278070-22202-2-git-send-email-peterhuewe@gmx.de \
--to=peterhuewe@gmx.de \
--cc=cw00.choi@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=myungjoo.ham@samsung.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®