diff mbox

[1/2] ACPI / dock: Remove the redundant if (acpi_disabled) check

Message ID 1386259421-10320-1-git-send-email-hanjun.guo@linaro.org
State Accepted
Commit 4ef54410ca6e7e5f32d67c5fb8094ae07460814a
Headers show

Commit Message

Hanjun Guo Dec. 5, 2013, 4:03 p.m. UTC
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 mbox

Patch

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);