From: Shawn Guo Date: Fri, 23 May 2014 08:41:28 +0000 (+0800) Subject: pwm: imx: set can_sleep flag for imx_pwm X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=31c4fa3442570d001f58303dea36d81693bc199c;p=linux-beck.git pwm: imx: set can_sleep flag for imx_pwm The .config() hook imx_pwm_config() calls clk APIs like clk_prepare() and clk_get_rate(), which might sleep, so we need to set can_sleep flag on pwm_chip. Signed-off-by: Shawn Guo Acked-by: Uwe Kleine-König Signed-off-by: Thierry Reding --- diff --git a/drivers/pwm/pwm-imx.c b/drivers/pwm/pwm-imx.c index d797c7b84c3f..5449d9150d40 100644 --- a/drivers/pwm/pwm-imx.c +++ b/drivers/pwm/pwm-imx.c @@ -262,6 +262,7 @@ static int imx_pwm_probe(struct platform_device *pdev) imx->chip.dev = &pdev->dev; imx->chip.base = -1; imx->chip.npwm = 1; + imx->chip.can_sleep = true; r = platform_get_resource(pdev, IORESOURCE_MEM, 0); imx->mmio_base = devm_ioremap_resource(&pdev->dev, r);