Skip to content

Commit

Permalink
backlight: mp3309c: Use pwm_apply_might_sleep()
Browse files Browse the repository at this point in the history
pwm_apply_state() is deprecated since commit c748a6d ("pwm: Rename
pwm_apply_state() to pwm_apply_might_sleep()"). This is the final user
in the tree.

Signed-off-by: Sean Young <sean@mess.org>
Tested-by: Flavio Suligoi <f.suligoi@asem.it>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Link: https://lore.kernel.org/r/20240128154905.407302-1-sean@mess.org
Signed-off-by: Lee Jones <lee@kernel.org>
  • Loading branch information
Sean Young authored and Lee Jones committed Mar 7, 2024
1 parent f1ac3c9 commit 601eedb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/video/backlight/mp3309c.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ static int mp3309c_bl_update_status(struct backlight_device *bl)
chip->pdata->levels[brightness],
chip->pdata->levels[chip->pdata->max_brightness]);
pwmstate.enabled = true;
ret = pwm_apply_state(chip->pwmd, &pwmstate);
ret = pwm_apply_might_sleep(chip->pwmd, &pwmstate);
if (ret)
return ret;

Expand Down Expand Up @@ -393,7 +393,7 @@ static int mp3309c_probe(struct i2c_client *client)
chip->pdata->default_brightness,
chip->pdata->max_brightness);
pwmstate.enabled = true;
ret = pwm_apply_state(chip->pwmd, &pwmstate);
ret = pwm_apply_might_sleep(chip->pwmd, &pwmstate);
if (ret)
return dev_err_probe(chip->dev, ret,
"error setting pwm device\n");
Expand Down

0 comments on commit 601eedb

Please sign in to comment.