hwspinlock: stm32: convert to devm_platform_ioremap_resource
Subsystems (2)
PATCH 1/1 hwspinlock: stm32: convert to devm_platform_ioremap_resource
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by Yangtao Li <[email protected]>
--- drivers/hwspinlock/stm32_hwspinlock.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/hwspinlock/stm32_hwspinlock.c +1 -3
@@ -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
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.Signed-off-by Yangtao Li <[email protected]>--- 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