diff options
author | Axel Lin <axel.lin@gmail.com> | 2012-02-01 10:51:53 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-04-22 15:31:12 -0700 |
commit | 4195441e3c6eaa3a118804dd9d8d04e5d3fe2149 (patch) | |
tree | c27cc046d67bacb342f3765af20fcf882073c4e6 | |
parent | 10ec1cf0d40f2728f6c96a0a7c6f0365c231738a (diff) | |
download | lwn-4195441e3c6eaa3a118804dd9d8d04e5d3fe2149.tar.gz lwn-4195441e3c6eaa3a118804dd9d8d04e5d3fe2149.zip |
gpio: Add missing spin_lock_init in gpio-pch driver
commit d166370ad86b33b1111af3a0cdd7de94e03789a6 upstream.
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 <tomoya.rohm@gmail.com>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/gpio/gpio-pch.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpio/gpio-pch.c b/drivers/gpio/gpio-pch.c index eb574f2c5a92..779ff7067b62 100644 --- a/drivers/gpio/gpio-pch.c +++ b/drivers/gpio/gpio-pch.c @@ -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) { |