From 3851a14ff8b8cc395f3f942a5e74b6b1da017cef Mon Sep 17 00:00:00 2001 From: Marek Pieta Date: Wed, 19 May 2021 08:48:17 +0200 Subject: [PATCH] drivers: led_pwm: Update pm_control function Change updates pm_control function to make it compatible with new API. Signed-off-by: Marek Pieta --- drivers/led/led_pwm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/led/led_pwm.c b/drivers/led/led_pwm.c index 0846d7faecb..8191ad8ef9f 100644 --- a/drivers/led/led_pwm.c +++ b/drivers/led/led_pwm.c @@ -176,17 +176,17 @@ static int led_pwm_pm_set_state(const struct device *dev, uint32_t new_state) } static int led_pwm_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 err; switch (ctrl_command) { case PM_DEVICE_STATE_GET: - err = led_pwm_pm_get_state(dev, context); + err = led_pwm_pm_get_state(dev, state); break; case PM_DEVICE_STATE_SET: - err = led_pwm_pm_set_state(dev, *((uint32_t *)context)); + err = led_pwm_pm_set_state(dev, *state); break; default: @@ -195,7 +195,7 @@ static int led_pwm_pm_control(const struct device *dev, uint32_t ctrl_command, } if (cb) { - cb(dev, err, context, arg); + cb(dev, err, state, arg); } return err;