diff mbox

pwm: meson: Fix missing spin_lock_init

Message ID 1473472549-20140-1-git-send-email-axel.lin@ingics.com
State Accepted
Headers show

Commit Message

Axel Lin Sept. 10, 2016, 1:55 a.m. UTC
The driver uses the spin_lock but not initialize it, fix it.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 drivers/pwm/pwm-meson.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Neil Armstrong Sept. 10, 2016, 1:49 p.m. UTC | #1
Le 10/09/2016 03:55, Axel Lin a écrit :
> The driver uses the spin_lock but not initialize it, fix it.
> 
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> ---
>  drivers/pwm/pwm-meson.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/pwm/pwm-meson.c b/drivers/pwm/pwm-meson.c
> index 381871b..9d5bd7d 100644
> --- a/drivers/pwm/pwm-meson.c
> +++ b/drivers/pwm/pwm-meson.c
> @@ -474,6 +474,7 @@ static int meson_pwm_probe(struct platform_device *pdev)
>  	if (IS_ERR(meson->base))
>  		return PTR_ERR(meson->base);
>  
> +	spin_lock_init(&meson->lock);
>  	meson->chip.dev = &pdev->dev;
>  	meson->chip.ops = &meson_pwm_ops;
>  	meson->chip.base = -1;
> 

Silly error !

Acked-by: Neil Armstrong <narmstrong@baylibre.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-pwm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Thierry Reding Oct. 21, 2016, 7:12 a.m. UTC | #2
On Sat, Sep 10, 2016 at 09:55:49AM +0800, Axel Lin wrote:
> The driver uses the spin_lock but not initialize it, fix it.
> 
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> ---
>  drivers/pwm/pwm-meson.c | 1 +
>  1 file changed, 1 insertion(+)

Applied to for-4.9/fixes.

Thanks,
Thierry
Axel Lin Nov. 28, 2016, 2:28 a.m. UTC | #3
2016-10-21 15:12 GMT+08:00 Thierry Reding <thierry.reding@gmail.com>:
> On Sat, Sep 10, 2016 at 09:55:49AM +0800, Axel Lin wrote:
>> The driver uses the spin_lock but not initialize it, fix it.
>>
>> Signed-off-by: Axel Lin <axel.lin@ingics.com>
>> ---
>>  drivers/pwm/pwm-meson.c | 1 +
>>  1 file changed, 1 insertion(+)
>
> Applied to for-4.9/fixes.
Hi Thierry,
I still don't find this fix in linux-next?

Regards,
Axel
--
To unsubscribe from this list: send the line "unsubscribe linux-pwm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/pwm/pwm-meson.c b/drivers/pwm/pwm-meson.c
index 381871b..9d5bd7d 100644
--- a/drivers/pwm/pwm-meson.c
+++ b/drivers/pwm/pwm-meson.c
@@ -474,6 +474,7 @@  static int meson_pwm_probe(struct platform_device *pdev)
 	if (IS_ERR(meson->base))
 		return PTR_ERR(meson->base);
 
+	spin_lock_init(&meson->lock);
 	meson->chip.dev = &pdev->dev;
 	meson->chip.ops = &meson_pwm_ops;
 	meson->chip.base = -1;