Commit d4824486 authored by Yangtao Li's avatar Yangtao Li Committed by Bjorn Andersson

hwspinlock: stm32: convert to devm_platform_ioremap_resource

Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: default avatarYangtao Li <tiny.windzz@gmail.com>
Link: https://lore.kernel.org/r/20191228191541.26999-1-tiny.windzz@gmail.comSigned-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
parent 8875b1d2
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment