summaryrefslogtreecommitdiff
path: root/drivers/gpio/gpio-pl061.c
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2020-04-01 22:05:26 +0200
committerLinus Walleij <linus.walleij@linaro.org>2020-04-02 09:16:06 +0200
commitf0254b51cbbfe040142cb824a1ff623de698ae8a (patch)
treecad69cf2e336acfab7749862e34383431084ae8a /drivers/gpio/gpio-pl061.c
parent33dd888263199676946f1c789e821d39a9a79d98 (diff)
gpio: 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-1-thierry.reding@gmail.com Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-pl061.c')
-rw-r--r--drivers/gpio/gpio-pl061.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/gpio/gpio-pl061.c b/drivers/gpio/gpio-pl061.c
index 3439120f166a..e241fb884c12 100644
--- a/drivers/gpio/gpio-pl061.c
+++ b/drivers/gpio/gpio-pl061.c
@@ -298,11 +298,8 @@ static int pl061_probe(struct amba_device *adev, const struct amba_id *id)
return PTR_ERR(pl061->base);
raw_spin_lock_init(&pl061->lock);
- if (of_property_read_bool(dev->of_node, "gpio-ranges")) {
- pl061->gc.request = gpiochip_generic_request;
- pl061->gc.free = gpiochip_generic_free;
- }
-
+ pl061->gc.request = gpiochip_generic_request;
+ pl061->gc.free = gpiochip_generic_free;
pl061->gc.base = -1;
pl061->gc.get_direction = pl061_get_direction;
pl061->gc.direction_input = pl061_direction_input;