Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 97ba0af0 authored by Axel Lin's avatar Axel Lin Committed by Matthew Garrett
Browse files

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: default avatarAxel Lin <axel.lin@gmail.com>
Signed-off-by: default avatarMatthew Garrett <mjg@redhat.com>
parent a5167c5b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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");
+1 −1
Original line number Diff line number Diff line
@@ -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);
	}
}