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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---

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

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux