Skip to content

Commit c746b6b

Browse files
committed
ACPI: EC: Make acpi_ec_dsdt_probe() more straightforward
Since acpi_ec_dsdt_probe() returns early if boot_ec is set, it is always unset when that function calls acpi_config_boot_ec() (passing ec->handle as the handle argument to it). Thus it is not really useful to call acpi_config_boot_ec() at that point. It is sufficient to call acpi_ec_setup() directly and (if that is successful) set boot_ec, so make acpi_ec_dsdt_probe() do that and avoid some pointless checks in acpi_config_boot_ec(). No intentional functional impact except for a changed message. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 1568426 commit c746b6b

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

drivers/acpi/ec.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1768,9 +1768,16 @@ void __init acpi_ec_dsdt_probe(void)
17681768
* At this point, the GPE is not fully initialized, so do not to
17691769
* handle the events.
17701770
*/
1771-
ret = acpi_config_boot_ec(ec, ec->handle, false, false);
1772-
if (ret)
1771+
ret = acpi_ec_setup(ec, false);
1772+
if (ret) {
17731773
acpi_ec_free(ec);
1774+
return;
1775+
}
1776+
1777+
boot_ec = ec;
1778+
1779+
acpi_handle_info(ec->handle,
1780+
"Boot DSDT EC used to handle transactions\n");
17741781
}
17751782

17761783
/*

0 commit comments

Comments
 (0)