Skip to contentSkip to conversation

gpio: xgene: Fix missing spin_lock_init()

PATCH In review Axel Lin 2 participants 6 messages Sep 21, 2014 – Sep 24, 2014 GPIO

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/3 gpio: xgene: Fix missing spin_lock_init()

---
 drivers/gpio/gpio-xgene.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpio/gpio-xgene.c +1 -0
index e25ba14..256c785 100644
@@ -189,6 +189,7 @@ static int xgene_gpio_probe(struct platform_device *pdev)
 
 	gpio->chip.ngpio = XGENE_MAX_GPIOS;
 
+	spin_lock_init(&gpio->lock);
 	gpio->chip.dev = &pdev->dev;
 	gpio->chip.direction_input = xgene_gpio_dir_in;
 	gpio->chip.direction_output = xgene_gpio_dir_out;
Signature · 1 line
1.9.1
author
#1 lore raw

PATCH 2/3 gpio: xgene: Remove unneeded forward declation for struct xgene_gpio

---
 drivers/gpio/gpio-xgene.c | 2 --
 1 file changed, 2 deletions(-)
drivers/gpio/gpio-xgene.c +0 -2
index 256c785..cef92f4 100644
@@ -38,8 +38,6 @@
 #define GPIO_BIT_OFFSET(x)	(x % XGENE_GPIOS_PER_BANK)
 #define GPIO_BANK_OFFSET(x)	((x / XGENE_GPIOS_PER_BANK) * GPIO_BANK_STRIDE)
 
-struct xgene_gpio;
-
 struct xgene_gpio {
 	struct gpio_chip	chip;
 	void __iomem		*base;
Signature · 1 line
1.9.1
author
#3 lore raw

PATCH 3/3 gpio: xgene: Remove unneeded #ifdef CONFIG_OF guard

In reply to Axel Lin

This driver depends on OF_GPIO, so it won't be built if !CONFIG_OF.

---
 drivers/gpio/gpio-xgene.c | 2 --
 1 file changed, 2 deletions(-)
drivers/gpio/gpio-xgene.c +0 -2
index cef92f4..82263e4 100644
@@ -223,13 +223,11 @@ static int xgene_gpio_remove(struct platform_device *pdev)
 	return ret;
 }
 
-#ifdef CONFIG_OF
 static const struct of_device_id xgene_gpio_of_match[] = {
 	{ .compatible = "apm,xgene-gpio", },
 	{},
 };
 MODULE_DEVICE_TABLE(of, xgene_gpio_of_match);
-#endif
 
 static struct platform_driver xgene_gpio_driver = {
 	.driver = {
Signature · 1 line
1.9.1
#4 lore raw

Re: [PATCH 3/3] gpio: xgene: Remove unneeded #ifdef CONFIG_OF guard

Quoted 3 lines · Axel Lin

This driver depends on OF_GPIO, so it won't be built if !CONFIG_OF.

Patch applied.

Yours,
Linus Walleij