From: Axel Lin <axel.lin@gmail.com>
To: linux-kernel <linux-kernel@vger.kernel.org>
Cc: Carlos Corbacho <carlos@strangeworlds.co.uk>,
Matthew Garrett <mjg@redhat.com>,
"John W. Linville" <linville@tuxdriver.com>,
Alan Jenkins <alan-jenkins@tuffmail.co.uk>,
Len Brown <len.brown@intel.com>,
Henrique de Moraes Holschuh <hmh@hmh.eng.br>,
Andrew Morton <akpm@linux-foundation.org>,
platform-driver-x86@vger.kernel.org
Subject: [PATCH] acer-wmi/hp-wmi: use platform_device_unregister instead of platform_device_del in module_exit
Date: Thu, 03 Jun 2010 15:18:03 +0800 [thread overview]
Message-ID: <1275549483.16917.2.camel@mola> (raw)
platform_device_unregister will also call platform_device_put() to drop reference count.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
drivers/platform/x86/acer-wmi.c | 2 +-
drivers/platform/x86/hp-wmi.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c
index 1ea6c43..d3904e5 100644
--- a/drivers/platform/x86/acer-wmi.c
+++ b/drivers/platform/x86/acer-wmi.c
@@ -1358,7 +1358,7 @@ static void __exit acer_wmi_exit(void)
{
remove_sysfs(acer_platform_device);
remove_debugfs();
- platform_device_del(acer_platform_device);
+ platform_device_unregister(acer_platform_device);
platform_driver_unregister(&acer_platform_driver);
printk(ACER_INFO "Acer Laptop WMI Extras unloaded\n");
diff --git a/drivers/platform/x86/hp-wmi.c b/drivers/platform/x86/hp-wmi.c
index 51c07a0..409115d 100644
--- a/drivers/platform/x86/hp-wmi.c
+++ b/drivers/platform/x86/hp-wmi.c
@@ -611,7 +611,7 @@ static void __exit hp_wmi_exit(void)
input_unregister_device(hp_wmi_input_dev);
}
if (hp_wmi_platform_dev) {
- platform_device_del(hp_wmi_platform_dev);
+ platform_device_unregister(hp_wmi_platform_dev);
platform_driver_unregister(&hp_wmi_driver);
}
}
--
1.5.4.3
reply other threads:[~2010-06-03 7:17 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1275549483.16917.2.camel@mola \
--to=axel.lin@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=alan-jenkins@tuffmail.co.uk \
--cc=carlos@strangeworlds.co.uk \
--cc=hmh@hmh.eng.br \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=mjg@redhat.com \
--cc=platform-driver-x86@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®