diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2021-11-05 14:42:38 +0200 |
---|---|---|
committer | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2021-11-18 18:40:10 +0200 |
commit | 3809671d95a1c400ecf8235d1dc3e5b352aee242 (patch) | |
tree | 1dee215a2d46cb518c52edb75ef188ef80b6dc22 /drivers/pinctrl/pinctrl-st.c | |
parent | f972707662dbaf066d055a507c0654e4bb6e659e (diff) | |
download | linux-3809671d95a1c400ecf8235d1dc3e5b352aee242.tar.bz2 |
pinctrl: st: Make use of the devm_platform_ioremap_resource_byname()
Use the devm_platform_ioremap_resource_byname() helper instead of
calling platform_get_resource_byname() and devm_ioremap_resource()
separately.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/pinctrl-st.c')
-rw-r--r-- | drivers/pinctrl/pinctrl-st.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/pinctrl/pinctrl-st.c b/drivers/pinctrl/pinctrl-st.c index f592e9ad93fc..bccde0b8f012 100644 --- a/drivers/pinctrl/pinctrl-st.c +++ b/drivers/pinctrl/pinctrl-st.c @@ -1583,7 +1583,6 @@ static int st_pctl_probe_dt(struct platform_device *pdev, struct device_node *child; int grp_index = 0; int irq = 0; - struct resource *res; st_pctl_dt_child_count(info, np); if (!info->nbanks) { @@ -1614,16 +1613,12 @@ static int st_pctl_probe_dt(struct platform_device *pdev, irq = platform_get_irq(pdev, 0); if (irq > 0) { - res = platform_get_resource_byname(pdev, - IORESOURCE_MEM, "irqmux"); - info->irqmux_base = devm_ioremap_resource(dev, res); - + info->irqmux_base = devm_platform_ioremap_resource_byname(pdev, "irqmux"); if (IS_ERR(info->irqmux_base)) return PTR_ERR(info->irqmux_base); irq_set_chained_handler_and_data(irq, st_gpio_irqmux_handler, info); - } pctl_desc->npins = info->nbanks * ST_GPIO_PINS_PER_BANK; |