diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2021-11-22 09:47:31 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2021-12-13 23:19:38 +0100 |
commit | a65fcb36f4e780fccac379f29e66dcacd7cc31b9 (patch) | |
tree | 7b546c7c8cf22fee42e27a69be8a3ad08b0dc25a /drivers/bus | |
parent | a9d7af700fcc4d044ac2dcfa982e6a4ea1ec79cb (diff) | |
download | barebox-a65fcb36f4e780fccac379f29e66dcacd7cc31b9.tar.gz barebox-a65fcb36f4e780fccac379f29e66dcacd7cc31b9.tar.xz |
bus: acpi: register bus even if without ACPI EFI table
The ACPI bus must be registered if there are ACPI drivers compiled in.
Thus the ACPI bus registration must be decoupled from the existence of
the ACPI table.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20211122084732.2597109-30-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/bus')
-rw-r--r-- | drivers/bus/acpi.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/bus/acpi.c b/drivers/bus/acpi.c index efba3f4c16..54c6085657 100644 --- a/drivers/bus/acpi.c +++ b/drivers/bus/acpi.c @@ -223,6 +223,7 @@ static void acpi_bus_remove(struct device_d *dev) } struct bus_type acpi_bus = { + .name = "acpi", .match = acpi_bus_match, .probe = acpi_bus_probe, .remove = acpi_bus_remove, @@ -240,17 +241,17 @@ static int efi_acpi_probe(void) acpi_bus.name = "acpi2"; table = ect; } else if (!table && !efi_guidcmp(ect->guid, EFI_ACPI_TABLE_GUID)) { - acpi_bus.name = "acpi"; + acpi_bus.name = "acpi1"; table = ect; } } + bus_register(&acpi_bus); + if (!table) return 0; - bus_register(&acpi_bus); acpi_bus.dev->priv = table; - return acpi_register_devices(&acpi_bus); } postcore_initcall(efi_acpi_probe); |