diff options
author | Mario Limonciello <mario.limonciello@dell.com> | 2017-09-26 13:50:05 -0500 |
---|---|---|
committer | Darren Hart (VMware) <dvhart@infradead.org> | 2017-09-27 14:57:45 -0700 |
commit | 7b11e8989618581bc0226ad313264cdc05d48d86 (patch) | |
tree | 1228bc963fd07a0f738629462bc52a0973ba64e0 | |
parent | 303d1fcc0bf07129bc05a61632fad9f7064b671f (diff) | |
download | linux-7b11e8989618581bc0226ad313264cdc05d48d86.tar.gz linux-7b11e8989618581bc0226ad313264cdc05d48d86.tar.bz2 linux-7b11e8989618581bc0226ad313264cdc05d48d86.zip |
platform/x86: wmi: Destroy on cleanup rather than unregister
device_create documentation says to cleanup using device_destroy
Signed-off-by: Mario Limonciello <mario.limonciello@dell.com>
Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
-rw-r--r-- | drivers/platform/x86/wmi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c index acbc2b02db3d..7a05843aff19 100644 --- a/drivers/platform/x86/wmi.c +++ b/drivers/platform/x86/wmi.c @@ -1145,7 +1145,7 @@ static int acpi_wmi_remove(struct platform_device *device) acpi_remove_address_space_handler(acpi_device->handle, ACPI_ADR_SPACE_EC, &acpi_wmi_ec_space_handler); wmi_free_devices(acpi_device); - device_unregister((struct device *)dev_get_drvdata(&device->dev)); + device_destroy(&wmi_bus_class, MKDEV(0, 0)); return 0; } @@ -1199,7 +1199,7 @@ static int acpi_wmi_probe(struct platform_device *device) return 0; err_remove_busdev: - device_unregister(wmi_bus_dev); + device_destroy(&wmi_bus_class, MKDEV(0, 0)); err_remove_notify_handler: acpi_remove_notify_handler(acpi_device->handle, ACPI_DEVICE_NOTIFY, |