Skip to content

Commit

Permalink
acer-wmi/hp-wmi: use platform_device_unregister instead of platform_d…
Browse files Browse the repository at this point in the history
…evice_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>
  • Loading branch information
Axel Lin authored and Matthew Garrett committed Aug 3, 2010
1 parent a5167c5 commit 97ba0af
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/platform/x86/acer-wmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
2 changes: 1 addition & 1 deletion drivers/platform/x86/hp-wmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit 97ba0af

Please sign in to comment.