drivers: fdc2x1x: Fix compilation error

When CONFIG_PM_DEVICE is enabled, the FDC2x1x driver includes code that
doesn't access the name of the shutdown pin's GPIO port correctly.
Correct this so the code derefences the right struct members.

Signed-off-by: Tristan Honscheid <honscheid@google.com>
This commit is contained in:
Tristan Honscheid 2023-07-12 16:50:30 -06:00 committed by Fabio Baltieri
commit f119d5341a

View file

@ -516,7 +516,7 @@ static int fdc2x1x_device_pm_action(const struct device *dev,
break;
case PM_DEVICE_ACTION_TURN_OFF:
if (cfg->sd_gpio->port.name) {
if (cfg->sd_gpio.port->name) {
ret = fdc2x1x_set_shutdown(dev, true);
} else {
LOG_ERR("SD pin not defined");