projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
303d1fc
)
platform/x86: wmi: Destroy on cleanup rather than unregister
author
Mario Limonciello
<mario.limonciello@dell.com>
Tue, 26 Sep 2017 18:50:05 +0000
(13:50 -0500)
committer
Darren Hart (VMware)
<dvhart@infradead.org>
Wed, 27 Sep 2017 21:57:45 +0000
(14:57 -0700)
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>
drivers/platform/x86/wmi.c
patch
|
blob
|
history
diff --git
a/drivers/platform/x86/wmi.c
b/drivers/platform/x86/wmi.c
index acbc2b02db3d124a51d4dcfd45d9e4f3a14ded1d..7a05843aff193e33dd7af401a4057c3cfd997513 100644
(file)
--- 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,