From: Colin Foster <colin.foster@in-advantage.com> To: linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Cc: "Lars Povlsen" <lars.povlsen@microchip.com>, "Steen Hegelund" <Steen.Hegelund@microchip.com>, UNGLinuxDriver@microchip.com, "Linus Walleij" <linus.walleij@linaro.org>, "Alexandre Belloni" <alexandre.belloni@bootlin.com>, "Clément Léger" <clement.leger@bootlin.com>, "Vladimir Oltean" <vladimir.oltean@nxp.com> Subject: [PATCH v1 net-next 1/4] pinctrl: ocelot: combine get resource and ioremap into single call Date: Fri, 19 Nov 2021 11:59:25 -0800 [thread overview] Message-ID: <20211119195928.2498441-2-colin.foster@in-advantage.com> (raw) In-Reply-To: <20211119195928.2498441-1-colin.foster@in-advantage.com> Simple cleanup to make two function calls only one. Signed-off-by: Colin Foster <colin.foster@in-advantage.com> --- drivers/pinctrl/pinctrl-ocelot.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/pinctrl/pinctrl-ocelot.c b/drivers/pinctrl/pinctrl-ocelot.c index 0a36ec8775a3..306293314069 100644 --- a/drivers/pinctrl/pinctrl-ocelot.c +++ b/drivers/pinctrl/pinctrl-ocelot.c @@ -1345,7 +1345,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, @@ -1378,8 +1377,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 -- 2.25.1
WARNING: multiple messages have this Message-ID (diff)
From: Colin Foster <colin.foster@in-advantage.com> To: linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Cc: "Lars Povlsen" <lars.povlsen@microchip.com>, "Steen Hegelund" <Steen.Hegelund@microchip.com>, UNGLinuxDriver@microchip.com, "Linus Walleij" <linus.walleij@linaro.org>, "Alexandre Belloni" <alexandre.belloni@bootlin.com>, "Clément Léger" <clement.leger@bootlin.com>, "Vladimir Oltean" <vladimir.oltean@nxp.com> Subject: [PATCH v1 net-next 1/4] pinctrl: ocelot: combine get resource and ioremap into single call Date: Fri, 19 Nov 2021 11:59:25 -0800 [thread overview] Message-ID: <20211119195928.2498441-2-colin.foster@in-advantage.com> (raw) In-Reply-To: <20211119195928.2498441-1-colin.foster@in-advantage.com> Simple cleanup to make two function calls only one. Signed-off-by: Colin Foster <colin.foster@in-advantage.com> --- drivers/pinctrl/pinctrl-ocelot.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/pinctrl/pinctrl-ocelot.c b/drivers/pinctrl/pinctrl-ocelot.c index 0a36ec8775a3..306293314069 100644 --- a/drivers/pinctrl/pinctrl-ocelot.c +++ b/drivers/pinctrl/pinctrl-ocelot.c @@ -1345,7 +1345,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, @@ -1378,8 +1377,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 -- 2.25.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2021-11-19 19:59 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-11-19 19:59 [PATCH v1 net-next 0/4] pinctrl: update drivers to utilize regmap Colin Foster 2021-11-19 19:59 ` Colin Foster 2021-11-19 19:59 ` Colin Foster [this message] 2021-11-19 19:59 ` [PATCH v1 net-next 1/4] pinctrl: ocelot: combine get resource and ioremap into single call Colin Foster 2021-11-19 19:59 ` [PATCH v1 net-next 2/4] pinctrl: ocelot: update pinctrl to automatic base address Colin Foster 2021-11-19 19:59 ` Colin Foster 2021-11-19 19:59 ` [PATCH v1 net-next 3/4] pinctrl: ocelot: convert pinctrl to regmap Colin Foster 2021-11-19 19:59 ` Colin Foster 2021-11-19 19:59 ` [PATCH v1 net-next 4/4] pinctrl: microchip-sgpio: update to support regmap Colin Foster 2021-11-19 19:59 ` Colin Foster 2021-11-22 0:08 ` [PATCH v1 net-next 0/4] pinctrl: update drivers to utilize regmap Linus Walleij 2021-11-22 0:08 ` Linus Walleij
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20211119195928.2498441-2-colin.foster@in-advantage.com \ --to=colin.foster@in-advantage.com \ --cc=Steen.Hegelund@microchip.com \ --cc=UNGLinuxDriver@microchip.com \ --cc=alexandre.belloni@bootlin.com \ --cc=clement.leger@bootlin.com \ --cc=lars.povlsen@microchip.com \ --cc=linus.walleij@linaro.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-gpio@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=vladimir.oltean@nxp.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.