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

mtd: rawnand: lpc32xx_mlc: 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: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20230707040622.78174-7-frank.li@vivo.com

authored by

Yangtao Li and committed by
Miquel Raynal
9cd9dda8 68e10224

+1 -2
+1 -2
drivers/mtd/nand/raw/lpc32xx_mlc.c
··· 695 695 696 696 host->pdev = pdev; 697 697 698 - rc = platform_get_resource(pdev, IORESOURCE_MEM, 0); 699 - host->io_base = devm_ioremap_resource(&pdev->dev, rc); 698 + host->io_base = devm_platform_get_and_ioremap_resource(pdev, 0, &rc); 700 699 if (IS_ERR(host->io_base)) 701 700 return PTR_ERR(host->io_base); 702 701