Commit 6194485d authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Linus Walleij

pinctrl: at91: Use of_device_get_match_data()

Use of_device_get_match_data() to simplify the code.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: default avatarClaudiu Beznea <claudiu.beznea@microchip.com>
Tested-by: default avatarClaudiu Beznea <claudiu.beznea@microchip.com>
Link: https://lore.kernel.org/r/20230215134242.37618-4-andriy.shevchenko@linux.intel.comSigned-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 415a099e
...@@ -1304,8 +1304,7 @@ static int at91_pinctrl_probe_dt(struct platform_device *pdev, ...@@ -1304,8 +1304,7 @@ static int at91_pinctrl_probe_dt(struct platform_device *pdev,
return -ENODEV; return -ENODEV;
info->dev = &pdev->dev; info->dev = &pdev->dev;
info->ops = (const struct at91_pinctrl_mux_ops *) info->ops = of_device_get_match_data(dev);
of_match_device(at91_pinctrl_of_match, &pdev->dev)->data;
at91_pinctrl_child_count(info, np); at91_pinctrl_child_count(info, np);
/* /*
...@@ -1844,8 +1843,7 @@ static int at91_gpio_probe(struct platform_device *pdev) ...@@ -1844,8 +1843,7 @@ static int at91_gpio_probe(struct platform_device *pdev)
goto err; goto err;
} }
at91_chip->ops = (const struct at91_pinctrl_mux_ops *) at91_chip->ops = of_device_get_match_data(dev);
of_match_device(at91_gpio_of_match, &pdev->dev)->data;
at91_chip->pioc_virq = irq; at91_chip->pioc_virq = irq;
at91_chip->pioc_idx = alias_idx; at91_chip->pioc_idx = alias_idx;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment