gpio: Add missing spin_lock_init in gpio-pch driver
authorAxel Lin <[email protected]>
Wed, 1 Feb 2012 02:51:53 +0000 (10:51 +0800)
committerGrant Likely <[email protected]>
Thu, 2 Feb 2012 04:59:15 +0000 (21:59 -0700)
This bug was introduced by commit d568a681
"gpio-pch: add spinlock in suspend/resume processing"
which adds a spinlock to struct pch_gpio but never init the spinlock.

Reported-by: Tomoya MORINAGA <[email protected]>
Signed-off-by: Axel Lin <[email protected]>
Acked-by: Linus Walleij <[email protected]>
Signed-off-by: Grant Likely <[email protected]>
drivers/gpio/gpio-pch.c

index 68fa55e86eb1fe736332da26c66b8d564c394893..e8729cc2ba2b9f1dc864a17803252ef40b2adbfa 100644 (file)
@@ -392,6 +392,7 @@ static int __devinit pch_gpio_probe(struct pci_dev *pdev,
        chip->reg = chip->base;
        pci_set_drvdata(pdev, chip);
        mutex_init(&chip->lock);
+       spin_lock_init(&chip->spinlock);
        pch_gpio_setup(chip);
        ret = gpiochip_add(&chip->gpio);
        if (ret) {