aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-mvebu.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2012-11-07 21:27:29 -0500
committerLinus Walleij <linus.walleij@linaro.org>2012-11-08 16:37:54 -0500
commit3764bdde1dc2fe53a87db1777440c2532cfccd58 (patch)
treeaf47667c7addef0c82496dddb1e25e2de5681d83 /drivers/gpio/gpio-mvebu.c
parent65b6ca466748a8e0a906e40a470e1582bc565d79 (diff)
gpio: mvebu: Set free callback for gpio_chip
We call pinctrl_request_gpio() in request callback, thus we need to call pinctrl_free_gpio() in free callback. Both mvebu_gpio_request() and mvebu_gpio_free() are not referenced outside of this file, make them static. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-mvebu.c')
-rw-r--r--drivers/gpio/gpio-mvebu.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c
index e0bde063221f..8b3065703566 100644
--- a/drivers/gpio/gpio-mvebu.c
+++ b/drivers/gpio/gpio-mvebu.c
@@ -163,12 +163,12 @@ static void __iomem *mvebu_gpioreg_level_mask(struct mvebu_gpio_chip *mvchip)
163 * Functions implementing the gpio_chip methods 163 * Functions implementing the gpio_chip methods
164 */ 164 */
165 165
166int mvebu_gpio_request(struct gpio_chip *chip, unsigned pin) 166static int mvebu_gpio_request(struct gpio_chip *chip, unsigned pin)
167{ 167{
168 return pinctrl_request_gpio(chip->base + pin); 168 return pinctrl_request_gpio(chip->base + pin);
169} 169}
170 170
171void mvebu_gpio_free(struct gpio_chip *chip, unsigned pin) 171static void mvebu_gpio_free(struct gpio_chip *chip, unsigned pin)
172{ 172{
173 pinctrl_free_gpio(chip->base + pin); 173 pinctrl_free_gpio(chip->base + pin);
174} 174}
@@ -518,6 +518,7 @@ static int __devinit mvebu_gpio_probe(struct platform_device *pdev)
518 mvchip->chip.label = dev_name(&pdev->dev); 518 mvchip->chip.label = dev_name(&pdev->dev);
519 mvchip->chip.dev = &pdev->dev; 519 mvchip->chip.dev = &pdev->dev;
520 mvchip->chip.request = mvebu_gpio_request; 520 mvchip->chip.request = mvebu_gpio_request;
521 mvchip->chip.free = mvebu_gpio_free;
521 mvchip->chip.direction_input = mvebu_gpio_direction_input; 522 mvchip->chip.direction_input = mvebu_gpio_direction_input;
522 mvchip->chip.get = mvebu_gpio_get; 523 mvchip->chip.get = mvebu_gpio_get;
523 mvchip->chip.direction_output = mvebu_gpio_direction_output; 524 mvchip->chip.direction_output = mvebu_gpio_direction_output;