acer-wmi/hp-wmi: use platform_device_unregister instead of platform_device_del in...
authorAxel Lin <axel.lin@gmail.com>
Thu, 3 Jun 2010 07:18:03 +0000 (15:18 +0800)
committerMatthew Garrett <mjg@redhat.com>
Tue, 3 Aug 2010 13:48:49 +0000 (09:48 -0400)
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>
drivers/platform/x86/acer-wmi.c
drivers/platform/x86/hp-wmi.c

index ae79624a692e96aeadcee5edacc6872f6bc856b7..56e6f1040e4f70288d38eb04a877c12da28168a3 100644 (file)
@@ -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");
index 9498bdd5361826732343593cb94c9d513a32452a..d55bf58ce8f9b87112da50b5a74f0171a682c1e0 100644 (file)
@@ -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);
        }
 }