提交 ad96111e 编写于 作者: C Colin Foster 提交者: Linus Walleij

pinctrl: ocelot: combine get resource and ioremap into single call

Simple cleanup to make two function calls only one.
Signed-off-by: NColin Foster <colin.foster@in-advantage.com>
Link: https://lore.kernel.org/r/20211119195928.2498441-2-colin.foster@in-advantage.comSigned-off-by: NLinus Walleij <linus.walleij@linaro.org>
上级 1dd19cae
...@@ -1761,7 +1761,6 @@ static int ocelot_pinctrl_probe(struct platform_device *pdev) ...@@ -1761,7 +1761,6 @@ static int ocelot_pinctrl_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
struct ocelot_pinctrl *info; struct ocelot_pinctrl *info;
void __iomem *base; void __iomem *base;
struct resource *res;
int ret; int ret;
struct regmap_config regmap_config = { struct regmap_config regmap_config = {
.reg_bits = 32, .reg_bits = 32,
...@@ -1794,8 +1793,7 @@ static int ocelot_pinctrl_probe(struct platform_device *pdev) ...@@ -1794,8 +1793,7 @@ static int ocelot_pinctrl_probe(struct platform_device *pdev)
/* Pinconf registers */ /* Pinconf registers */
if (info->desc->confops) { if (info->desc->confops) {
res = platform_get_resource(pdev, IORESOURCE_MEM, 1); base = devm_platform_ioremap_resource(pdev, 0);
base = devm_ioremap_resource(dev, res);
if (IS_ERR(base)) if (IS_ERR(base))
dev_dbg(dev, "Failed to ioremap config registers (no extended pinconf)\n"); dev_dbg(dev, "Failed to ioremap config registers (no extended pinconf)\n");
else else
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册