Skip to contentSkip to conversation

pwm: meson: Fix missing spin_lock_init

PATCH Applied Axel Lin 3 participants 4 messages Sep 10, 2016 – Nov 28, 2016

Subsystems (2)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 pwm: meson: Fix missing spin_lock_init

The driver uses the spin_lock but not initialize it, fix it.

---
 drivers/pwm/pwm-meson.c | 1 +
 1 file changed, 1 insertion(+)
drivers/pwm/pwm-meson.c +1 -0
index 381871b..9d5bd7d 100644
@@ -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;
Signature · 1 line
2.7.4
Acked-by on v1 1/1
#1 lore raw
Quoted 13 lines · Axel Lin

The driver uses the spin_lock but not initialize it, fix it.

---
 drivers/pwm/pwm-meson.c | 1 +
 1 file changed, 1 insertion(+)
drivers/pwm/pwm-meson.c +0 -0
index 381871b..9d5bd7d 100644

drivers/pwm/pwm-meson.c static int meson_pwm_probe(struct platform_device *pdev) · line 480

Quoted 7 lines
drivers/pwm/pwm-meson.c +1 -0
@@ -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 !

author
#3 lore raw

2016-10-21 15:12 GMT+08:00 Thierry Reding <[email protected]>:

Quoted 9 lines · Axel Lin
Quoted 6 lines

The driver uses the spin_lock but not initialize it, fix it.

---
 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