diff mbox series

[19/32] acpi: Correct reset handling in acpi_device_add_power_res()

Message ID 20200928042611.1696178-18-sjg@chromium.org
State New
Delegated to: Bin Meng
Headers show
Series x86: Allow Coral to boot into Chrome OS | expand

Commit Message

Simon Glass Sept. 28, 2020, 4:25 a.m. UTC
If there is no reset line, this still emits ACPI code for the reset GPIO.
Fix it by updating the check.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 lib/acpi/acpi_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Bin Meng Oct. 16, 2020, 1:35 p.m. UTC | #1
On Mon, Sep 28, 2020 at 12:26 PM Simon Glass <sjg@chromium.org> wrote:
>
> If there is no reset line, this still emits ACPI code for the reset GPIO.
> Fix it by updating the check.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
>  lib/acpi/acpi_device.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
diff mbox series

Patch

diff --git a/lib/acpi/acpi_device.c b/lib/acpi/acpi_device.c
index 95dfac583fc..c3439a59883 100644
--- a/lib/acpi/acpi_device.c
+++ b/lib/acpi/acpi_device.c
@@ -422,7 +422,7 @@  int acpi_device_add_power_res(struct acpi_ctx *ctx, u32 tx_state_val,
 
 	/* Method (_ON, 0, Serialized) */
 	acpigen_write_method_serialized(ctx, "_ON", 0);
-	if (reset_gpio) {
+	if (has_reset) {
 		ret = acpigen_set_enable_tx_gpio(ctx, tx_state_val, dw0_read,
 						 dw0_write, &reset, true);
 		if (ret)