pwm: meson: Add missing spin_lock_init()
authorAxel Lin <axel.lin@ingics.com>
Sat, 10 Sep 2016 01:55:49 +0000 (09:55 +0800)
committerThierry Reding <thierry.reding@gmail.com>
Fri, 21 Oct 2016 07:10:11 +0000 (09:10 +0200)
The driver uses the spin_lock but does not initialize it. Fix it.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
drivers/pwm/pwm-meson.c

index 381871b2bb46ba3439b4ca4bb7ace7277233b372..9d5bd7d5c610b1736eb5698b3b410de6f2c746ed 100644 (file)
@@ -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;