From: Patrick Rudolph patrick.rudolph@9elements.com
This patch series fixes 3 independent bugs in the google firmware drivers.
Patch 1-2 do proper cleanup at kernel module unloading.
Patch 3 adds a check if the optional GSMI SMM handler is actually present in the firmware and responses to the driver.
Changes in v2: - Add missing return statement - Add s-o-b on GSMI patches - Add define for reserved GSMI command
Changes in v3: - Cosmetic changes only
Arthur Heymans (2): firmware: google: Unregister driver_info on failure and exit in gsmi firmware: google: Probe for a GSMI handler in firmware
Patrick Rudolph (1): firmware: google: Release devices before unregistering the bus
drivers/firmware/google/coreboot_table.c | 7 +++++++ drivers/firmware/google/gsmi.c | 25 ++++++++++++++++++++++++ 2 files changed, 32 insertions(+)
From: Patrick Rudolph patrick.rudolph@9elements.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@9elements.com --- -v2: Add missing return statement. -v3: Add missing patch changelog. --- drivers/firmware/google/coreboot_table.c | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/drivers/firmware/google/coreboot_table.c b/drivers/firmware/google/coreboot_table.c index 8d132e4f008a..0205987a4fd4 100644 --- a/drivers/firmware/google/coreboot_table.c +++ b/drivers/firmware/google/coreboot_table.c @@ -163,8 +163,15 @@ static int coreboot_table_probe(struct platform_device *pdev) return ret; }
+static int __cb_dev_unregister(struct device *dev, void *dummy) +{ + device_unregister(dev); + return 0; +} + 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; }