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@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
diff --git a/drivers/platform/x86/hp-wmi.c b/drivers/platform/x86/hp-wmi.c
index 9498bdd..d55bf58 100644
--- a/drivers/platform/x86/hp-wmi.c
+++ b/drivers/platform/x86/hp-wmi.c
@@ -760,7 +760,7 @@
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);
}
}