Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mailbox: omap: 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>

authored by

Cai Huoqing and committed by
Jassi Brar
6bb9e5ee a04f3035

+1 -3
+1 -3
drivers/mailbox/omap-mailbox.c
··· 699 699 700 700 static int omap_mbox_probe(struct platform_device *pdev) 701 701 { 702 - struct resource *mem; 703 702 int ret; 704 703 struct mbox_chan *chnls; 705 704 struct omap_mbox **list, *mbox, *mboxblk; ··· 775 776 if (!mdev) 776 777 return -ENOMEM; 777 778 778 - mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); 779 - mdev->mbox_base = devm_ioremap_resource(&pdev->dev, mem); 779 + mdev->mbox_base = devm_platform_ioremap_resource(pdev, 0); 780 780 if (IS_ERR(mdev->mbox_base)) 781 781 return PTR_ERR(mdev->mbox_base); 782 782