[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191115134842.17013-2-patrick.rudolph@9elements.com>
Date: Fri, 15 Nov 2019 14:48:37 +0100
From: patrick.rudolph@...ements.com
To: linux-kernel@...r.kernel.org
Cc: coreboot@...eboot.org, patrick.rudolph@...ements.com,
Allison Randal <allison@...utok.net>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Thomas Gleixner <tglx@...utronix.de>,
Alexios Zavras <alexios.zavras@...el.com>,
Arthur Heymans <arthur@...ymans.xyz>
Subject: [PATCH 1/3] firmware: google: Release devices before unregistering the bus
From: Patrick Rudolph <patrick.rudolph@...ements.com>
Fix a bug where the kernel module can't be loaded after it has been
unloaded as the devices are still present and conflicting with the
to be created coreboot devices.
Signed-off-by: Patrick Rudolph <patrick.rudolph@...ements.com>
---
drivers/firmware/google/coreboot_table.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/firmware/google/coreboot_table.c b/drivers/firmware/google/coreboot_table.c
index 8d132e4f008a..88c6545bebf4 100644
--- a/drivers/firmware/google/coreboot_table.c
+++ b/drivers/firmware/google/coreboot_table.c
@@ -163,8 +163,14 @@ static int coreboot_table_probe(struct platform_device *pdev)
return ret;
}
+static int __cb_dev_unregister(struct device *dev, void *dummy)
+{
+ device_unregister(dev);
+}
+
static int coreboot_table_remove(struct platform_device *pdev)
{
+ bus_for_each_dev(&coreboot_bus_type, NULL, NULL, __cb_dev_unregister);
bus_unregister(&coreboot_bus_type);
return 0;
}
--
2.21.0
Powered by blists - more mailing lists