Skip to contentSkip to conversation

pinctrl: lantiq: remove bogus of_gpio_chip_add

PATCH In review Johan Hovold 2 participants 2 messages Jan 12, 2015 – Jan 14, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pinctrl: lantiq: remove bogus of_gpio_chip_add

Remove bogus call to of_gpiochip_add (and of_gpio_chip remove in error path) which is also called when adding the gpio chip.

This prevents adding the same pinctrl range twice.

Fixes 3f8c50c9b110 ("OF: pinctrl: MIPS: lantiq: implement lantiq/xway

pinctrl support")

---
 drivers/pinctrl/pinctrl-xway.c | 2 --
 1 file changed, 2 deletions(-)
drivers/pinctrl/pinctrl-xway.c +0 -2
index c5cef59f5965..779950c62e53 100644
@@ -798,10 +798,8 @@ static int pinmux_xway_probe(struct platform_device *pdev)
 
 	/* load the gpio chip */
 	xway_chip.dev = &pdev->dev;
-	of_gpiochip_add(&xway_chip);
 	ret = gpiochip_add(&xway_chip);
 	if (ret) {
-		of_gpiochip_remove(&xway_chip);
 		dev_err(&pdev->dev, "Failed to register gpio chip\n");
 		return ret;
 	}
Signature · 1 line
2.0.5
#1 lore raw
Quoted 9 lines · Johan Hovold

Remove bogus call to of_gpiochip_add (and of_gpio_chip remove in error path) which is also called when adding the gpio chip.

This prevents adding the same pinctrl range twice.

Fixes 3f8c50c9b110 ("OF: pinctrl: MIPS: lantiq: implement lantiq/xway

pinctrl support")

Very weird. Patch applied.

Yours,
Linus Walleij