Skip to contentSkip to conversation

gpio: Add missing spin_lock_init in gpio-ml-ioh driver

PATCH RESEND Applied Axel Lin 2 participants 3 messages Feb 1, 2012 – Feb 2, 2012

Subsystems (2)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH RESEND 1/2 gpio: Add missing spin_lock_init in gpio-ml-ioh driver

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.

---
 drivers/gpio/gpio-ml-ioh.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/gpio/gpio-ml-ioh.c +1 -0
index 461958f..271fd49 100644
@@ -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) {
Signature · 1 line
1.7.5.4
author
#1 lore raw

PATCH RESEND 2/2 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.

---
 drivers/gpio/gpio-pch.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/gpio/gpio-pch.c +1 -0
index f060329..e84eabf 100644
@@ -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) {
Signature · 1 line
1.7.5.4
Applied
#2 lore raw
In reply to Axel Lin
Quoted 5 lines · Axel Lin

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.

Applied both, thanks.

g.

Quoted 21 lines
---
 drivers/gpio/gpio-ml-ioh.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/gpio/gpio-ml-ioh.c +1 -0
index 461958f..271fd49 100644
@@ -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) {
Signature · 1 line
1.7.5.4