diff mbox series

bus: uniphier-system-bus: use devm_platform_ioremap_resource()

Message ID 20190905032122.26076-1-yamada.masahiro@socionext.com (mailing list archive)
State Mainlined, archived
Commit ef92bfdaa7123bc8bdaed3f0f6e008500dd555da
Headers show
Series bus: uniphier-system-bus: use devm_platform_ioremap_resource() | expand

Commit Message

Masahiro Yamada Sept. 5, 2019, 3:21 a.m. UTC
Replace the chain of platform_get_resource() and devm_ioremap_resource()
with devm_platform_ioremap_resource().

This allows to remove the local variable for (struct resource *), and
have one function call less.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 drivers/bus/uniphier-system-bus.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

patchwork-bot+linux-soc@kernel.org Sept. 5, 2019, 4:21 p.m. UTC | #1
Hello:

The following patches were marked "accepted", because they were applied to
soc/soc.git (refs/heads/for-next):

Patch: bus: uniphier-system-bus: use devm_platform_ioremap_resource()
  Submitter: Masahiro Yamada <yamada.masahiro@socionext.com>
  Patchwork: https://patchwork.kernel.org/project/linux-soc/list/?series=169899

Total patches: 1
patchwork-bot+linux-soc@kernel.org Sept. 5, 2019, 4:21 p.m. UTC | #2
Hello:

This patch was applied to soc/soc.git (refs/heads/for-next).

On Thu,  5 Sep 2019 12:21:22 +0900 you wrote:
> Replace the chain of platform_get_resource() and devm_ioremap_resource()
> with devm_platform_ioremap_resource().
> 
> This allows to remove the local variable for (struct resource *), and
> have one function call less.
> 
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> 
> [...]


Here is a summary with links:
  - bus: uniphier-system-bus: use devm_platform_ioremap_resource()
    https://git.kernel.org/soc/soc/c/ef92bfdaa7123bc8bdaed3f0f6e008500dd555da

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/bus/uniphier-system-bus.c b/drivers/bus/uniphier-system-bus.c
index e845c1a93f21..f70dedace20b 100644
--- a/drivers/bus/uniphier-system-bus.c
+++ b/drivers/bus/uniphier-system-bus.c
@@ -176,7 +176,6 @@  static int uniphier_system_bus_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
 	struct uniphier_system_bus_priv *priv;
-	struct resource *regs;
 	const __be32 *ranges;
 	u32 cells, addr, size;
 	u64 paddr;
@@ -186,8 +185,7 @@  static int uniphier_system_bus_probe(struct platform_device *pdev)
 	if (!priv)
 		return -ENOMEM;
 
-	regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	priv->membase = devm_ioremap_resource(dev, regs);
+	priv->membase = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(priv->membase))
 		return PTR_ERR(priv->membase);