Commit 1c7532c9 authored by Cai Huoqing's avatar Cai Huoqing Committed by Jassi Brar

mailbox: xgene-slimpro: Make use of the helper function devm_platform_ioremap_resource()

Use the devm_platform_ioremap_resource() helper instead of
calling platform_get_resource() and devm_ioremap_resource()
separately
Signed-off-by: default avatarCai Huoqing <caihuoqing@baidu.com>
Signed-off-by: default avatarJassi Brar <jaswinder.singh@linaro.org>
parent f5e2eeb9
...@@ -170,7 +170,6 @@ static const struct mbox_chan_ops slimpro_mbox_ops = { ...@@ -170,7 +170,6 @@ static const struct mbox_chan_ops slimpro_mbox_ops = {
static int slimpro_mbox_probe(struct platform_device *pdev) static int slimpro_mbox_probe(struct platform_device *pdev)
{ {
struct slimpro_mbox *ctx; struct slimpro_mbox *ctx;
struct resource *regs;
void __iomem *mb_base; void __iomem *mb_base;
int rc; int rc;
int i; int i;
...@@ -181,8 +180,7 @@ static int slimpro_mbox_probe(struct platform_device *pdev) ...@@ -181,8 +180,7 @@ static int slimpro_mbox_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, ctx); platform_set_drvdata(pdev, ctx);
regs = platform_get_resource(pdev, IORESOURCE_MEM, 0); mb_base = devm_platform_ioremap_resource(pdev, 0);
mb_base = devm_ioremap_resource(&pdev->dev, regs);
if (IS_ERR(mb_base)) if (IS_ERR(mb_base))
return PTR_ERR(mb_base); return PTR_ERR(mb_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