OSDN Git Service

pwm: Make it explicit that pwm_apply_state() might sleep
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Thu, 9 Sep 2021 09:48:49 +0000 (11:48 +0200)
committerThierry Reding <thierry.reding@gmail.com>
Fri, 5 Nov 2021 10:51:41 +0000 (11:51 +0100)
commit4ad91a227817ae48f931595d1101fc7100073ce9
tree66c8a2c4961fcd269c3e933e8a2cb11a5ca7f5fa
parent27d9a4d69433af1827a764fe235866d5d5501fdb
pwm: Make it explicit that pwm_apply_state() might sleep

At least some implementations sleep. So mark pwm_apply_state() with a
might_sleep() to make callers aware. In the worst case this uncovers a
valid atomic user, then we revert this patch and at least gained some more
knowledge and then can work on a concept similar to
gpio_get_value/gpio_get_value_cansleep.

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