Skip to contentSkip to conversation

acer-wmi/hp-wmi: use platform_device_unregister instead of platform_device_del in module_exit

PATCH New Axel Lin 1 participant 1 message Jun 3, 2010

Subsystems (2)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 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.

---
 drivers/platform/x86/acer-wmi.c |    2 +-
 drivers/platform/x86/hp-wmi.c   |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/platform/x86/acer-wmi.c +1 -1
index 1ea6c43..d3904e5 100644
@@ -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");
drivers/platform/x86/hp-wmi.c +1 -1
index 51c07a0..409115d 100644
@@ -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);
 	}
 }
Signature · 1 line
1.5.4.3