From: Axel Lin Date: Wed, 1 Feb 2012 02:50:05 +0000 (+0800) Subject: gpio: Add missing spin_lock_init in gpio-ml-ioh driver X-Git-Tag: v3.2.18~25 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=347e3c6d3ed876bb5c36189265be02e952679e09;p=thirdparty%2Fkernel%2Fstable.git gpio: Add missing spin_lock_init in gpio-ml-ioh driver commit 7e3a70fb7bccada029c188c89bfbf3c0a63c1500 upstream. This bug was introduced by commit 54be5663 "gpio-ml-ioh: Support interrupt function" which adds a spinlock to struct ioh_gpio but never init the spinlock. Signed-off-by: Axel Lin Signed-off-by: Grant Likely Signed-off-by: Ben Hutchings --- diff --git a/drivers/gpio/gpio-ml-ioh.c b/drivers/gpio/gpio-ml-ioh.c index 461958fc2264e..271fd4959e4a5 100644 --- a/drivers/gpio/gpio-ml-ioh.c +++ b/drivers/gpio/gpio-ml-ioh.c @@ -448,6 +448,7 @@ static int __devinit ioh_gpio_probe(struct pci_dev *pdev, chip->reg = chip->base; chip->ch = i; mutex_init(&chip->lock); + spin_lock_init(&chip->spinlock); ioh_gpio_setup(chip, num_ports[i]); ret = gpiochip_add(&chip->gpio); if (ret) {