aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-mxc.c
diff options
context:
space:
mode:
authorThierry Reding <[email protected]>2020-04-01 20:05:26 +0000
committerLinus Walleij <[email protected]>2020-04-02 07:16:06 +0000
commitf0254b51cbbfe040142cb824a1ff623de698ae8a (patch)
treecad69cf2e336acfab7749862e34383431084ae8a /drivers/gpio/gpio-mxc.c
parentgpio: export of_pinctrl_get to modules (diff)
downloadkernel-f0254b51cbbfe040142cb824a1ff623de698ae8a.tar.gz
kernel-f0254b51cbbfe040142cb824a1ff623de698ae8a.zip
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 <[email protected]> Signed-off-by: Thierry Reding <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Linus Walleij <[email protected]>
Diffstat (limited to 'drivers/gpio/gpio-mxc.c')
-rw-r--r--drivers/gpio/gpio-mxc.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/gpio/gpio-mxc.c b/drivers/gpio/gpio-mxc.c
index c77d474185f3..64278a4756f0 100644
--- a/drivers/gpio/gpio-mxc.c
+++ b/drivers/gpio/gpio-mxc.c
@@ -485,11 +485,8 @@ static int mxc_gpio_probe(struct platform_device *pdev)
if (err)
goto out_bgio;
- if (of_property_read_bool(np, "gpio-ranges")) {
- port->gc.request = gpiochip_generic_request;
- port->gc.free = gpiochip_generic_free;
- }
-
+ port->gc.request = gpiochip_generic_request;
+ port->gc.free = gpiochip_generic_free;
port->gc.to_irq = mxc_gpio_to_irq;
port->gc.base = (pdev->id < 0) ? of_alias_get_id(np, "gpio") * 32 :
pdev->id * 32;