diff options
author | Jonas Gorski <jogo@openwrt.org> | 2015-10-11 11:34:16 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2015-10-16 16:13:43 -0400 |
commit | 203f0daafdf228a7e4e90a714a2a085884d91ea4 (patch) | |
tree | ae310bd9117993b495d0360a22c745fb150ced74 /drivers/gpio/gpio-tb10x.c | |
parent | c771c2f484857f3b1fc81d180485e96b7cb67c17 (diff) |
gpio: replace trivial implementations of request/free with generic one
Replace all trivial request/free callbacks that do nothing but call into
pinctrl code with the generic versions.
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
Reviewed-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: James Hogan <james.hogan@imgtec.com>
Acked-by: Stefan Agner <stefan@agner.ch>
Acked-by: Joachim Eastwood <manabian@gmail.com>
Acked-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-tb10x.c')
-rw-r--r-- | drivers/gpio/gpio-tb10x.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/gpio/gpio-tb10x.c b/drivers/gpio/gpio-tb10x.c index 12c99d969b98..4356e6c20fc5 100644 --- a/drivers/gpio/gpio-tb10x.c +++ b/drivers/gpio/gpio-tb10x.c | |||
@@ -138,16 +138,6 @@ static int tb10x_gpio_direction_out(struct gpio_chip *chip, | |||
138 | return 0; | 138 | return 0; |
139 | } | 139 | } |
140 | 140 | ||
141 | static int tb10x_gpio_request(struct gpio_chip *chip, unsigned offset) | ||
142 | { | ||
143 | return pinctrl_request_gpio(chip->base + offset); | ||
144 | } | ||
145 | |||
146 | static void tb10x_gpio_free(struct gpio_chip *chip, unsigned offset) | ||
147 | { | ||
148 | pinctrl_free_gpio(chip->base + offset); | ||
149 | } | ||
150 | |||
151 | static int tb10x_gpio_to_irq(struct gpio_chip *chip, unsigned offset) | 141 | static int tb10x_gpio_to_irq(struct gpio_chip *chip, unsigned offset) |
152 | { | 142 | { |
153 | struct tb10x_gpio *tb10x_gpio = to_tb10x_gpio(chip); | 143 | struct tb10x_gpio *tb10x_gpio = to_tb10x_gpio(chip); |
@@ -213,8 +203,8 @@ static int tb10x_gpio_probe(struct platform_device *pdev) | |||
213 | tb10x_gpio->gc.get = tb10x_gpio_get; | 203 | tb10x_gpio->gc.get = tb10x_gpio_get; |
214 | tb10x_gpio->gc.direction_output = tb10x_gpio_direction_out; | 204 | tb10x_gpio->gc.direction_output = tb10x_gpio_direction_out; |
215 | tb10x_gpio->gc.set = tb10x_gpio_set; | 205 | tb10x_gpio->gc.set = tb10x_gpio_set; |
216 | tb10x_gpio->gc.request = tb10x_gpio_request; | 206 | tb10x_gpio->gc.request = gpiochip_generic_request; |
217 | tb10x_gpio->gc.free = tb10x_gpio_free; | 207 | tb10x_gpio->gc.free = gpiochip_generic_free; |
218 | tb10x_gpio->gc.base = -1; | 208 | tb10x_gpio->gc.base = -1; |
219 | tb10x_gpio->gc.ngpio = ngpio; | 209 | tb10x_gpio->gc.ngpio = ngpio; |
220 | tb10x_gpio->gc.can_sleep = false; | 210 | tb10x_gpio->gc.can_sleep = false; |