pwm: lpss: Release runtime-pm reference from the driver's remove callback
authorHans de Goede <hdegoede@redhat.com>
Fri, 12 Oct 2018 10:12:28 +0000 (12:12 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Jan 2020 09:24:02 +0000 (10:24 +0100)
commit7f6e0f44e5349b5b001b598d4235c6583b38bdfe
treeb37c488d242f5ea39e0f8b2c968ac7b0f2bf4dc1
parent7b1192fc9dcc421b56bd3b8066614e7be55091ea
pwm: lpss: Release runtime-pm reference from the driver's remove callback

[ Upstream commit 42885551cedb45961879d2fc3dc3c4dc545cc23e ]

For each pwm output which gets enabled through pwm_lpss_apply(), we do a
pm_runtime_get_sync().

This commit adds pm_runtime_put() calls to pwm_lpss_remove() to balance
these when the driver gets removed with some of the outputs still enabled.

Fixes: f080be27d7d9 ("pwm: lpss: Add support for runtime PM")
Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/pwm/pwm-lpss.c