pinctrl: renesas: Move fixed assignments to 'pinctrl_desc' definition
Assign 'struct pinctrl_desc' .pins and .npins members in definition to make clear that number of pins is fixed and have less code in the probe. Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/20250611-pinctrl-const-desc-v2-14-b11c1d650384@linaro.org Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
d9ef8eec63
commit
10d038214b
|
|
@ -680,6 +680,8 @@ static struct pinctrl_desc rzn1_pinctrl_desc = {
|
|||
.pmxops = &rzn1_pmx_ops,
|
||||
.confops = &rzn1_pinconf_ops,
|
||||
.owner = THIS_MODULE,
|
||||
.pins = rzn1_pins,
|
||||
.npins = ARRAY_SIZE(rzn1_pins),
|
||||
};
|
||||
|
||||
static int rzn1_pinctrl_parse_groups(struct device_node *np,
|
||||
|
|
@ -878,8 +880,6 @@ static int rzn1_pinctrl_probe(struct platform_device *pdev)
|
|||
|
||||
ipctl->dev = &pdev->dev;
|
||||
rzn1_pinctrl_desc.name = dev_name(&pdev->dev);
|
||||
rzn1_pinctrl_desc.pins = rzn1_pins;
|
||||
rzn1_pinctrl_desc.npins = ARRAY_SIZE(rzn1_pins);
|
||||
|
||||
ret = rzn1_pinctrl_probe_dt(pdev, ipctl);
|
||||
if (ret) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue