pwm: omap-dmtimer: Remove PWM chip in .remove before making it unfunctional
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Mon, 11 Nov 2019 09:03:54 +0000 (10:03 +0100)
committerThierry Reding <thierry.reding@gmail.com>
Mon, 20 Jan 2020 11:29:34 +0000 (12:29 +0100)
commit43efdc8f0e6d7088ec61bd55a73bf853f002d043
treec926c026c3a54fd09a425b51513768ae0ca6bdbd
parent1188829abc2abbef0da7a082fdb6a315a050a0a0
pwm: omap-dmtimer: Remove PWM chip in .remove before making it unfunctional

In the old code (e.g.) mutex_destroy() was called before
pwmchip_remove(). Between these two calls it is possible that a PWM
callback is used which tries to grab the mutex.

Fixes: 6604c6556db9 ("pwm: Add PWM driver for OMAP using dual-mode timers")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
drivers/pwm/pwm-omap-dmtimer.c