Skip to content

Commit 0b83a7e

Browse files
committed
drivers: gpio: Fixup missed PM conversion
In the power mgmt conversion of void *context to uint32_t *state this driver got missed and shows build errors with power mgmt is enabled. Signed-off-by: Kumar Gala <[email protected]>
1 parent 76f59b2 commit 0b83a7e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

drivers/gpio/gpio_dw.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -461,22 +461,22 @@ static inline int gpio_dw_resume_from_suspend_port(const struct device *port)
461461
*/
462462
static int gpio_dw_device_ctrl(const struct device *port,
463463
uint32_t ctrl_command,
464-
void *context, pm_device_cb cb, void *arg)
464+
uint32_t *state, pm_device_cb cb, void *arg)
465465
{
466466
int ret = 0;
467467

468468
if (ctrl_command == PM_DEVICE_STATE_SET) {
469-
if (*((uint32_t *)context) == PM_DEVICE_STATE_SUSPEND) {
469+
if (*state == PM_DEVICE_STATE_SUSPEND) {
470470
ret = gpio_dw_suspend_port(port);
471-
} else if (*((uint32_t *)context) == PM_DEVICE_STATE_ACTIVE) {
471+
} else if (*state == PM_DEVICE_STATE_ACTIVE) {
472472
ret = gpio_dw_resume_from_suspend_port(port);
473473
}
474474
} else if (ctrl_command == PM_DEVICE_STATE_GET) {
475-
*((uint32_t *)context) = gpio_dw_get_power_state(port);
475+
*state = gpio_dw_get_power_state(port);
476476
}
477477

478478
if (cb) {
479-
cb(port, ret, context, arg);
479+
cb(port, ret, state, arg);
480480
}
481481
return ret;
482482
}

0 commit comments

Comments
 (0)