From b4be50c9ca3651e4124cde57f227203b47399eab Mon Sep 17 00:00:00 2001 From: Hung-Te Lin Date: Mon, 10 Sep 2018 10:55:49 +0800 Subject: acpi: Call acpi_gen_writeSTA by status from device tree The device tree now supports 'hidden' and the status can be found in `struct device.hidden`. A new acpi_device_status() will return the expected setting of STA from a `struct device`. BUG=b:72200466 BRANCH=eve TEST=Builds and boots properly on device eve Change-Id: I6dc62aff63cc3cb950739398a4dcac21836c9766 Signed-off-by: Hung-Te Lin Reviewed-on: https://review.coreboot.org/28567 Reviewed-by: Duncan Laurie Reviewed-by: Furquan Shaikh Tested-by: build bot (Jenkins) --- src/drivers/generic/max98357a/max98357a.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/drivers/generic/max98357a/max98357a.c') diff --git a/src/drivers/generic/max98357a/max98357a.c b/src/drivers/generic/max98357a/max98357a.c index 71ab1b9bd6..f9b2d6cb55 100644 --- a/src/drivers/generic/max98357a/max98357a.c +++ b/src/drivers/generic/max98357a/max98357a.c @@ -43,7 +43,7 @@ static void max98357a_fill_ssdt(struct device *dev) acpigen_write_name_string("_HID", MAX98357A_ACPI_HID); acpigen_write_name_integer("_UID", 0); acpigen_write_name_string("_DDN", dev->chip_ops->name); - acpigen_write_STA(ACPI_STATUS_DEVICE_ALL_ON); + acpigen_write_STA(acpi_device_status(dev)); /* Resources */ acpigen_write_name("_CRS"); -- cgit v1.2.3