Skip to content

Commit d6471d6

Browse files
thierryredinglinusw
authored andcommitted
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 <[email protected]> Signed-off-by: Thierry Reding <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Linus Walleij <[email protected]>
1 parent f0254b5 commit d6471d6

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

drivers/pinctrl/pinctrl-ingenic.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2278,11 +2278,8 @@ static int __init ingenic_gpio_probe(struct ingenic_pinctrl *jzpc,
22782278
jzgc->gc.direction_input = ingenic_gpio_direction_input;
22792279
jzgc->gc.direction_output = ingenic_gpio_direction_output;
22802280
jzgc->gc.get_direction = ingenic_gpio_get_direction;
2281-
2282-
if (of_property_read_bool(node, "gpio-ranges")) {
2283-
jzgc->gc.request = gpiochip_generic_request;
2284-
jzgc->gc.free = gpiochip_generic_free;
2285-
}
2281+
jzgc->gc.request = gpiochip_generic_request;
2282+
jzgc->gc.free = gpiochip_generic_free;
22862283

22872284
jzgc->irq = irq_of_parse_and_map(node, 0);
22882285
if (!jzgc->irq)

0 commit comments

Comments
 (0)