mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-01-11 17:10:13 +00:00
pinctrl: max77620: Move fixed assignments to 'pinctrl_desc' definition
Assign 'struct pinctrl_desc' .pins, .npins and other members in definition to make clear that number of pins is fixed and have less code in the probe. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/20250611-pinctrl-const-desc-v2-12-b11c1d650384@linaro.org Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
1bd634e535
commit
ed32213ffc
@ -543,6 +543,10 @@ static struct pinctrl_desc max77620_pinctrl_desc = {
|
||||
.pctlops = &max77620_pinctrl_ops,
|
||||
.pmxops = &max77620_pinmux_ops,
|
||||
.confops = &max77620_pinconf_ops,
|
||||
.pins = max77620_pins_desc,
|
||||
.npins = ARRAY_SIZE(max77620_pins_desc),
|
||||
.num_custom_params = ARRAY_SIZE(max77620_cfg_params),
|
||||
.custom_params = max77620_cfg_params,
|
||||
};
|
||||
|
||||
static int max77620_pinctrl_probe(struct platform_device *pdev)
|
||||
@ -569,11 +573,6 @@ static int max77620_pinctrl_probe(struct platform_device *pdev)
|
||||
platform_set_drvdata(pdev, mpci);
|
||||
|
||||
max77620_pinctrl_desc.name = dev_name(&pdev->dev);
|
||||
max77620_pinctrl_desc.pins = max77620_pins_desc;
|
||||
max77620_pinctrl_desc.npins = ARRAY_SIZE(max77620_pins_desc);
|
||||
max77620_pinctrl_desc.num_custom_params =
|
||||
ARRAY_SIZE(max77620_cfg_params);
|
||||
max77620_pinctrl_desc.custom_params = max77620_cfg_params;
|
||||
|
||||
for (i = 0; i < MAX77620_PIN_NUM; ++i) {
|
||||
mpci->fps_config[i].active_fps_src = -1;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user