diff options
author | Cai Huoqing <caihuoqing@baidu.com> | 2021-09-07 09:42:15 +0200 |
---|---|---|
committer | Jassi Brar <jaswinder.singh@linaro.org> | 2021-10-16 21:39:49 +0200 |
commit | 1c7532c9a2df708f673c9d32fe04249e0cde4ed5 (patch) | |
tree | 45c8bf77e5fec6be872cf6734f79ca7cf55fce1f /drivers/mailbox/mailbox-xgene-slimpro.c | |
parent | mailbox: sun6i: Make use of the helper function devm_platform_ioremap_resource() (diff) | |
download | linux-1c7532c9a2df708f673c9d32fe04249e0cde4ed5.tar.xz linux-1c7532c9a2df708f673c9d32fe04249e0cde4ed5.zip |
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: Cai Huoqing <caihuoqing@baidu.com>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
Diffstat (limited to 'drivers/mailbox/mailbox-xgene-slimpro.c')
-rw-r--r-- | drivers/mailbox/mailbox-xgene-slimpro.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/mailbox/mailbox-xgene-slimpro.c b/drivers/mailbox/mailbox-xgene-slimpro.c index 5b3a2dcd5955..946ea773ec33 100644 --- a/drivers/mailbox/mailbox-xgene-slimpro.c +++ b/drivers/mailbox/mailbox-xgene-slimpro.c @@ -170,7 +170,6 @@ static const struct mbox_chan_ops slimpro_mbox_ops = { static int slimpro_mbox_probe(struct platform_device *pdev) { struct slimpro_mbox *ctx; - struct resource *regs; void __iomem *mb_base; int rc; int i; @@ -181,8 +180,7 @@ static int slimpro_mbox_probe(struct platform_device *pdev) platform_set_drvdata(pdev, ctx); - regs = platform_get_resource(pdev, IORESOURCE_MEM, 0); - mb_base = devm_ioremap_resource(&pdev->dev, regs); + mb_base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(mb_base)) return PTR_ERR(mb_base); |