pwm: brcmstb: Don't set can_sleep flag
Subsystems (2)
PATCH RESEND 1/1 pwm: brcmstb: Don't set can_sleep flag
The .can_sleep flag is used for some PWM controllers that can't be used in atomic context. Not such case for this driver, so don't set the can_sleep flag.
---
This patch was sent on http://www.spinics.net/lists/linux-pwm/msg03506.html
drivers/pwm/pwm-brcmstb.c | 1 - 1 file changed, 1 deletion(-)
drivers/pwm/pwm-brcmstb.c +0 -1
@@ -270,7 +270,6 @@ static int brcmstb_pwm_probe(struct platform_device *pdev) p->chip.ops = &brcmstb_pwm_ops; p->chip.base =-1 ; p->chip.npwm =2 ; - p->chip.can_sleep = true; res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); p->base =devm_ioremap_resource (&pdev->dev, res);
Signature · 1 line
2.1.4
Quoted 4 lines · Axel Lin
The .can_sleep flag is used for some PWM controllers that can't be used in atomic context. Not such case for this driver, so don't set the
can_sleepflag.
Quoted 8 lines
Signed-off-by Axel Lin <[email protected]>Acked-by Florian Fainelli <[email protected]>Reviewed-by Brian Norris <[email protected]>---
This patch was sent on http://www.spinics.net/lists/linux-pwm/msg03506.htmldrivers/pwm/pwm-brcmstb.c | 1 - 1 file changed, 1 deletion(-)
There's some discussion currently about marking all drivers can_sleep and modify all users to cope with it correctly. The reason is that we introduced a mutex in pwm_enable() and pwm_set_polarity() which means that PWM devices effectively can't be used from interrupt or atomic contexts.
It also means that the driver is actually currently correct, so I'd like to leave it as-is until the users have been sorted out, at which point we can simply get rid of can_sleep.
Thierry