[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1275549483.16917.2.camel@mola>
Date: Thu, 03 Jun 2010 15:18:03 +0800
From: Axel Lin <axel.lin@...il.com>
To: linux-kernel <linux-kernel@...r.kernel.org>
Cc: Carlos Corbacho <carlos@...angeworlds.co.uk>,
Matthew Garrett <mjg@...hat.com>,
"John W. Linville" <linville@...driver.com>,
Alan Jenkins <alan-jenkins@...fmail.co.uk>,
Len Brown <len.brown@...el.com>,
Henrique de Moraes Holschuh <hmh@....eng.br>,
Andrew Morton <akpm@...ux-foundation.org>,
platform-driver-x86@...r.kernel.org
Subject: [PATCH] acer-wmi/hp-wmi: use platform_device_unregister instead of
platform_device_del in module_exit
platform_device_unregister will also call platform_device_put() to drop reference count.
Signed-off-by: Axel Lin <axel.lin@...il.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists