diff options
-rw-r--r-- | src/arch/x86/acpi_device.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/arch/x86/acpi_device.c b/src/arch/x86/acpi_device.c index d51278975b..1092c7317b 100644 --- a/src/arch/x86/acpi_device.c +++ b/src/arch/x86/acpi_device.c @@ -537,9 +537,9 @@ void acpi_device_write_spi(const struct acpi_spi *spi) void acpi_device_add_power_res(const struct acpi_power_res_params *params) { static const char *power_res_dev_states[] = { "_PR0", "_PR3" }; - unsigned int reset_gpio = params->reset_gpio->pins[0]; - unsigned int enable_gpio = params->enable_gpio->pins[0]; - unsigned int stop_gpio = params->stop_gpio->pins[0]; + unsigned int reset_gpio = params->reset_gpio ? params->reset_gpio->pins[0] : 0; + unsigned int enable_gpio = params->enable_gpio ? params->enable_gpio->pins[0] : 0; + unsigned int stop_gpio = params->stop_gpio ? params->stop_gpio->pins[0] : 0; if (!reset_gpio && !enable_gpio && !stop_gpio) return; |