summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2020-04-01 22:05:27 +0200
committerLinus Walleij <linus.walleij@linaro.org>2020-04-02 09:17:16 +0200
commitd6471d6e09d436617c38293b55b6f0326e7a2d68 (patch)
tree9ad91f6dac758c892ba40255cc6894064911d560 /drivers/pinctrl
parentgpio: Unconditionally assign .request()/.free() (diff)
downloadlinux-d6471d6e09d436617c38293b55b6f0326e7a2d68.tar.xz
linux-d6471d6e09d436617c38293b55b6f0326e7a2d68.zip
pinctrl: Unconditionally assign .request()/.free()
The gpiochip_generic_request() and gpiochip_generic_free() functions can now deal properly with chips that don't have any pin-ranges defined, so they can be assigned unconditionally. Suggested-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Thierry Reding <treding@nvidia.com> Link: https://lore.kernel.org/r/20200401200527.2982450-2-thierry.reding@gmail.com Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r--drivers/pinctrl/pinctrl-ingenic.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/pinctrl/pinctrl-ingenic.c b/drivers/pinctrl/pinctrl-ingenic.c
index 96f04d121ebd..bc7f6df850ed 100644
--- a/drivers/pinctrl/pinctrl-ingenic.c
+++ b/drivers/pinctrl/pinctrl-ingenic.c
@@ -2278,11 +2278,8 @@ static int __init ingenic_gpio_probe(struct ingenic_pinctrl *jzpc,
jzgc->gc.direction_input = ingenic_gpio_direction_input;
jzgc->gc.direction_output = ingenic_gpio_direction_output;
jzgc->gc.get_direction = ingenic_gpio_get_direction;
-
- if (of_property_read_bool(node, "gpio-ranges")) {
- jzgc->gc.request = gpiochip_generic_request;
- jzgc->gc.free = gpiochip_generic_free;
- }
+ jzgc->gc.request = gpiochip_generic_request;
+ jzgc->gc.free = gpiochip_generic_free;
jzgc->irq = irq_of_parse_and_map(node, 0);
if (!jzgc->irq)