]> www.infradead.org Git - users/jedix/linux-maple.git/commit
pwm: Use guards for export->lock instead of explicity mutex_lock + mutex_unlock
authorUwe Kleine-König <u.kleine-koenig@baylibre.com>
Thu, 27 Jun 2024 20:31:20 +0000 (22:31 +0200)
committerUwe Kleine-König <ukleinek@kernel.org>
Wed, 10 Jul 2024 15:53:52 +0000 (17:53 +0200)
commit4c50c71c6995a2546eedc36f8bd99fadd7883a46
tree4cbc92d2a6af68d203a305582560ea2e4cc2123b
parent650af6c0833a7274a755f5ed4bae29e53bbae4fc
pwm: Use guards for export->lock instead of explicity mutex_lock + mutex_unlock

With the compiler caring for unlocking the mutex several functions can
be simplified. Benefit from that.

There is just one caller left for mutex_lock(&export->lock). The code
flow is too complicated there to convert it to the compiler assisted
variant.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Link: https://lore.kernel.org/r/210010f2e579a92476462726e18e0135f6854909.1719520143.git.u.kleine-koenig@baylibre.com
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>
drivers/pwm/core.c