Commit d166370a authored by Axel Lin's avatar Axel Lin Committed by Grant Likely

gpio: Add missing spin_lock_init in gpio-pch driver

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: default avatarTomoya MORINAGA <tomoya.rohm@gmail.com>
Signed-off-by: default avatarAxel Lin <axel.lin@gmail.com>
Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
parent 876cf5e7
...@@ -392,6 +392,7 @@ static int __devinit pch_gpio_probe(struct pci_dev *pdev, ...@@ -392,6 +392,7 @@ static int __devinit pch_gpio_probe(struct pci_dev *pdev,
chip->reg = chip->base; chip->reg = chip->base;
pci_set_drvdata(pdev, chip); pci_set_drvdata(pdev, chip);
mutex_init(&chip->lock); mutex_init(&chip->lock);
spin_lock_init(&chip->spinlock);
pch_gpio_setup(chip); pch_gpio_setup(chip);
ret = gpiochip_add(&chip->gpio); ret = gpiochip_add(&chip->gpio);
if (ret) { if (ret) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment