diff mbox

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

Message ID 1386259421-10320-2-git-send-email-hanjun.guo@linaro.org
State Accepted
Commit 100eb0b04293fbb7af689ff7ddfe8fc8a46ab65c
Headers show

Commit Message

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

Patch

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;