OSDN Git Service

pwm: img: Use only a single idiom to get a runtime PM reference
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Fri, 12 Nov 2021 19:00:15 +0000 (20:00 +0100)
committerThierry Reding <thierry.reding@gmail.com>
Wed, 17 Nov 2021 16:24:28 +0000 (17:24 +0100)
commitb6ce2af8766c39a5b09afa466ed4d0ef2d8b5a65
treebb6d13a0f268fcc6f4ad1968b271e03848882634
parent14d8956548ad48574138d8fd377d434083c3c3cd
pwm: img: Use only a single idiom to get a runtime PM reference

Currently there are two very similar approaches in use by this driver:
img_pwm_config() uses pm_runtime_get_sync() and calls
pm_runtime_put_autosuspend() in the error path; img_pwm_enable() calls
pm_runtime_resume_and_get() which already puts the reference in its own
error path.

Align pm_runtime usage and use the same idiom in both locations.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
drivers/pwm/pwm-img.c