acpi_dock_init() will only be called in acpi_scan_init(), and the code logic shows that if (acpi_disabled) is redundant:
acpi_init(); if (acpi_disabled) return; acpi_scan_init(); acpi_dock_init(); if (acpi_disabled) /* redundant */ return;
Signed-off-by: Hanjun Guo hanjun.guo@linaro.org ---
This patch set is inspired by Rob's question for my ACPI ARM64 core patches :)
drivers/acpi/dock.c | 3 --- 1 file changed, 3 deletions(-)
diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c index 8da6be9..61d0c3f 100644 --- a/drivers/acpi/dock.c +++ b/drivers/acpi/dock.c @@ -893,9 +893,6 @@ find_dock_and_bay(acpi_handle handle, u32 lvl, void *context, void **rv)
void __init acpi_dock_init(void) { - if (acpi_disabled) - return; - /* look for dock stations and bays */ acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT, ACPI_UINT32_MAX, find_dock_and_bay, NULL, NULL, NULL);
acpi_sleep_init() will only be called in acpi_bus_init(), and the code logic shows that if (acpi_disabled) is redundant:
acpi_init(); if (acpi_disabled) return; acpi_bus_init(); acpi_sleep_init(); if (acpi_disabled) return 0;
Signed-off-by: Hanjun Guo hanjun.guo@linaro.org --- drivers/acpi/sleep.c | 3 --- 1 file changed, 3 deletions(-)
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c index 208ac8c..54ab266 100644 --- a/drivers/acpi/sleep.c +++ b/drivers/acpi/sleep.c @@ -802,9 +802,6 @@ int __init acpi_sleep_init(void) char *pos = supported; int i;
- if (acpi_disabled) - return 0; - acpi_sleep_dmi_check();
sleep_states[ACPI_STATE_S0] = 1;