pwm: tegra: Don't modify HW state in .remove callback
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Thu, 17 Jun 2021 09:51:41 +0000 (11:51 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 20 Jul 2021 14:05:49 +0000 (16:05 +0200)
commit9dcc9ad3434869d7413a0220821181b3de1cd396
treec283aff3ad863e548836dd2aed8c402b2317aa99
parent3d82361abd03c37f681b1ceac17d9f1c19255ff7
pwm: tegra: Don't modify HW state in .remove callback

[ Upstream commit 86f7fa71cd830d18d7ebcaf719dffd5ddfe1acdd ]

A consumer is expected to disable a PWM before calling pwm_put(). And if
they didn't there is hopefully a good reason (or the consumer needs
fixing). Also if disabling an enabled PWM was the right thing to do,
this should better be done in the framework instead of in each low level
driver.

So drop the hardware modification from the .remove() callback.

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