Skip to content

Commit 840f682

Browse files
bbkzzJassiBrar
authored andcommitted
mailbox: rockchip: Use devm_platform_get_and_ioremap_resource()
Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yangtao Li <frank.li@vivo.com> Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
1 parent f7fdb53 commit 840f682

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

drivers/mailbox/rockchip-mailbox.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -194,11 +194,7 @@ static int rockchip_mbox_probe(struct platform_device *pdev)
194194
mb->mbox.ops = &rockchip_mbox_chan_ops;
195195
mb->mbox.txdone_irq = true;
196196

197-
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
198-
if (!res)
199-
return -ENODEV;
200-
201-
mb->mbox_base = devm_ioremap_resource(&pdev->dev, res);
197+
mb->mbox_base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
202198
if (IS_ERR(mb->mbox_base))
203199
return PTR_ERR(mb->mbox_base);
204200

0 commit comments

Comments
 (0)