[ 49/68] gpio: Add missing spin_lock_init in gpio-pch driver

From: Greg KH
Date: Thu Apr 19 2012 - 17:17:29 EST

3.2-stable review patch. If anyone has any objections, please let me know.


From: Axel Lin <axel.lin@xxxxxxxxx>

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@xxxxxxxxx>
Signed-off-by: Axel Lin <axel.lin@xxxxxxxxx>
Acked-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
Signed-off-by: Grant Likely <grant.likely@xxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

drivers/gpio/gpio-pch.c | 1 +
1 file changed, 1 insertion(+)

--- a/drivers/gpio/gpio-pch.c
+++ b/drivers/gpio/gpio-pch.c
@@ -392,6 +392,7 @@ static int __devinit pch_gpio_probe(stru
chip->reg = chip->base;
pci_set_drvdata(pdev, chip);
+ spin_lock_init(&chip->spinlock);
ret = gpiochip_add(&chip->gpio);
if (ret) {

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/