summaryrefslogtreecommitdiff
path: root/drivers/pinctrl/pinctrl-ocelot.c
diff options
context:
space:
mode:
authorColin Foster <colin.foster@in-advantage.com>2021-11-19 22:59:25 +0300
committerLinus Walleij <linus.walleij@linaro.org>2021-11-22 03:07:02 +0300
commitad96111e658a959e55894863a758e6c2cf31bb5e (patch)
tree081a6c083f0dd52ac376caa9f8d75014963bca7d /drivers/pinctrl/pinctrl-ocelot.c
parent1dd19cae155208065277f01dc61fe8897b6d2a29 (diff)
downloadlinux-ad96111e658a959e55894863a758e6c2cf31bb5e.tar.xz
pinctrl: ocelot: combine get resource and ioremap into single call
Simple cleanup to make two function calls only one. Signed-off-by: Colin Foster <colin.foster@in-advantage.com> Link: https://lore.kernel.org/r/20211119195928.2498441-2-colin.foster@in-advantage.com Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/pinctrl-ocelot.c')
-rw-r--r--drivers/pinctrl/pinctrl-ocelot.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/pinctrl/pinctrl-ocelot.c b/drivers/pinctrl/pinctrl-ocelot.c
index 875e3f319d7b..25cb62e21e50 100644
--- a/drivers/pinctrl/pinctrl-ocelot.c
+++ b/drivers/pinctrl/pinctrl-ocelot.c
@@ -1761,7 +1761,6 @@ static int ocelot_pinctrl_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
struct ocelot_pinctrl *info;
void __iomem *base;
- struct resource *res;
int ret;
struct regmap_config regmap_config = {
.reg_bits = 32,
@@ -1794,8 +1793,7 @@ static int ocelot_pinctrl_probe(struct platform_device *pdev)
/* Pinconf registers */
if (info->desc->confops) {
- res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
- base = devm_ioremap_resource(dev, res);
+ base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(base))
dev_dbg(dev, "Failed to ioremap config registers (no extended pinconf)\n");
else