summaryrefslogtreecommitdiffstats
path: root/drivers/char/ipmi/ipmi_si_hotmod.c
diff options
context:
space:
mode:
authorCorey Minyard <cminyard@mvista.com>2019-02-22 00:41:47 +0100
committerCorey Minyard <cminyard@mvista.com>2019-02-22 14:12:41 +0100
commite17c657100d592115fcfad27472cd611fd74b861 (patch)
tree5b993f38038552d304b935234ae1a7eaef58cc94 /drivers/char/ipmi/ipmi_si_hotmod.c
parentipmi_si: Remove hotmod devices on removal and exit (diff)
downloadlinux-e17c657100d592115fcfad27472cd611fd74b861.tar.xz
linux-e17c657100d592115fcfad27472cd611fd74b861.zip
ipmi_si: Consolidate scanning the platform bus
The same basic code was in two places. Signed-off-by: Corey Minyard <cminyard@mvista.com>
Diffstat (limited to 'drivers/char/ipmi/ipmi_si_hotmod.c')
-rw-r--r--drivers/char/ipmi/ipmi_si_hotmod.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/drivers/char/ipmi/ipmi_si_hotmod.c b/drivers/char/ipmi/ipmi_si_hotmod.c
index 230b10e7d288..1433055a9705 100644
--- a/drivers/char/ipmi/ipmi_si_hotmod.c
+++ b/drivers/char/ipmi/ipmi_si_hotmod.c
@@ -239,21 +239,7 @@ out:
return rv;
}
-static int pdev_match_name(struct device *dev, void *data)
-{
- struct platform_device *pdev = to_platform_device(dev);
-
- return strcmp(pdev->name, "hotmod-ipmi-si") == 0;
-}
-
void ipmi_si_hotmod_exit(void)
{
- struct device *dev;
-
- while ((dev = bus_find_device(&platform_bus_type, NULL, NULL,
- pdev_match_name))) {
- struct platform_device *pdev = to_platform_device(dev);
-
- platform_device_unregister(pdev);
- }
+ ipmi_remove_platform_device_by_name("hotmod-ipmi-si");
}