]> git.baikalelectronics.ru Git - kernel.git/commit
pwm: imx27: Only enable the clocks once in .get_state()
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Thu, 10 Jan 2019 19:33:53 +0000 (20:33 +0100)
committerThierry Reding <thierry.reding@gmail.com>
Mon, 4 Mar 2019 11:52:48 +0000 (12:52 +0100)
commit9e3804c897b37f3d941f6a55db208b87282b56ff
tree3bc283361d4fbca9dce5f3923638d6c3691b92be
parent898a91cd8224a5d891b7b1d5cf3512073c4e1c5e
pwm: imx27: Only enable the clocks once in .get_state()

Currently the function pwm_imx27_get_state() of enables the clocks once
unconditionally at the start, a second time if the PWM is enabled and
disables unconditionally at the end.

Simplify that to enable once at the start and disable conditionally at
the end.

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