]> git.baikalelectronics.ru Git - kernel.git/commit
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:10:48 +0000 (16:10 +0200)
commita9aacd4c3b3f3ac753ab1085f98bffebba0e0dd6
tree13c26b444ca70f8a715ac064ffedaf53eec84c68
parent3bb11179a9113406ab2fcfaf111685eadb620d56
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