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

mailbox: altera: 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
218f22b2 6985c40a

+1 -4
+1 -4
drivers/mailbox/mailbox-altera.c
··· 285 285 static int altera_mbox_probe(struct platform_device *pdev) 286 286 { 287 287 struct altera_mbox *mbox; 288 - struct resource *regs; 289 288 struct mbox_chan *chans; 290 289 int ret; 291 290 ··· 298 299 if (!chans) 299 300 return -ENOMEM; 300 301 301 - regs = platform_get_resource(pdev, IORESOURCE_MEM, 0); 302 - 303 - mbox->mbox_base = devm_ioremap_resource(&pdev->dev, regs); 302 + mbox->mbox_base = devm_platform_ioremap_resource(pdev, 0); 304 303 if (IS_ERR(mbox->mbox_base)) 305 304 return PTR_ERR(mbox->mbox_base); 306 305