drivers: fix pm callback signature

For some reason a few drivers were not converted to the new device PM
callback signature. The reason may be because the device PM part is
compiled only when CONFIG_PM_DEVICE=y, a condition not enabled in CI by
default.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
Gerard Marull-Paretas 2021-06-04 11:25:11 +02:00 committed by Kumar Gala
commit 45a6de6804
8 changed files with 27 additions and 26 deletions

View file

@ -520,7 +520,7 @@ static int st7735r_enter_sleep(struct st7735r_data *data)
}
static int st7735r_pm_control(const struct device *dev, uint32_t ctrl_command,
void *context, pm_device_cb cb, void *arg)
uint32_t *state, pm_device_cb cb, void *arg)
{
int ret = 0;
struct st7735r_data *data = (struct st7735r_data *)dev->data;
@ -544,7 +544,7 @@ static int st7735r_pm_control(const struct device *dev, uint32_t ctrl_command,
break;
case PM_DEVICE_STATE_GET:
*((uint32_t *)context) = data->pm_state;
*state = data->pm_state;
break;
@ -553,7 +553,7 @@ static int st7735r_pm_control(const struct device *dev, uint32_t ctrl_command,
}
if (cb != NULL) {
cb(dev, ret, context, arg);
cb(dev, ret, state, arg);
}
return ret;