From: Axel Lin Date: Thu, 3 Jun 2010 07:18:03 +0000 (+0800) Subject: acer-wmi/hp-wmi: use platform_device_unregister instead of platform_device_del in... X-Git-Tag: v2.6.36-rc1~579^2~66 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=97ba0af097dc3428b85dc6a1282968d7ba9510f5;p=~shefty%2Frdma-dev.git 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 Signed-off-by: Matthew Garrett --- diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c index ae79624a692..56e6f1040e4 100644 --- a/drivers/platform/x86/acer-wmi.c +++ b/drivers/platform/x86/acer-wmi.c @@ -1375,7 +1375,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 9498bdd5361..d55bf58ce8f 100644 --- a/drivers/platform/x86/hp-wmi.c +++ b/drivers/platform/x86/hp-wmi.c @@ -760,7 +760,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); } }