Skip to contentSkip to conversation

hwspinlock: stm32: convert to devm_platform_ioremap_resource

PATCH Applied Yangtao Li 2 participants 2 messages Dec 28, 2019 – Dec 29, 2019

Subsystems (2)
lore
Share & tools
lore

Yangtao Li

author
#0 lore raw

PATCH 1/1 hwspinlock: stm32: convert to devm_platform_ioremap_resource

Use devm_platform_ioremap_resource() to simplify code.

---
 drivers/hwspinlock/stm32_hwspinlock.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/hwspinlock/stm32_hwspinlock.c +1 -3
index c8eacf4f9692..3ad0ce0da4d9 100644
@@ -58,12 +58,10 @@ static int stm32_hwspinlock_probe(struct platform_device *pdev)
 {
 	struct stm32_hwspinlock *hw;
 	void __iomem *io_base;
-	struct resource *res;
 	size_t array_size;
 	int i, ret;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	io_base = devm_ioremap_resource(&pdev->dev, res);
+	io_base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(io_base))
 		return PTR_ERR(io_base);
 
Signature · 1 line
2.17.1
#1 lore raw
This patch was applied to andersson/remoteproc.git (refs/heads/for-next).

Hello:

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

Quoted 6 lines · On Sat, 28 Dec 2019 19:15:41 +0000 you wrote:

Use devm_platform_ioremap_resource() to simplify code.

---
 drivers/hwspinlock/stm32_hwspinlock.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Here is a summary with links:
- hwspinlock: stm32: convert to devm_platform_ioremap_resource

    https://git.kernel.org/andersson/remoteproc/c/d4824486b676ef87071081bdb77a6de2a5a341c7

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.wiki.kernel.org/userdoc/pwbot