提交 be1cee11 编写于 作者: S Simon Glass 提交者: Bin Meng

acpi: Correct reset handling in acpi_device_add_power_res()

If there is no reset line, this still emits ACPI code for the reset GPIO.
Fix it by updating the check.
Signed-off-by: NSimon Glass <sjg@chromium.org>
Reviewed-by: NBin Meng <bmeng.cn@gmail.com>
上级 dd30c5bb
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册