mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-03 21:45:08 -04:00
mtd: rawnand: atmel: 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-10-frank.li@vivo.com
This commit is contained in:
committed by
Miquel Raynal
parent
892ad2638a
commit
09ea085f64
@@ -1791,8 +1791,7 @@ atmel_nand_controller_legacy_add_nands(struct atmel_nand_controller *nc)
|
||||
|
||||
nand->numcs = 1;
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
nand->cs[0].io.virt = devm_ioremap_resource(dev, res);
|
||||
nand->cs[0].io.virt = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
|
||||
if (IS_ERR(nand->cs[0].io.virt))
|
||||
return PTR_ERR(nand->cs[0].io.virt);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user