mirror of
https://github.com/torvalds/linux.git
synced 2024-11-26 14:12:06 +00:00
mtd: rawnand: stm32_fmc2: 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-6-frank.li@vivo.com
This commit is contained in:
parent
189175e0c3
commit
68e10224a5
@ -1922,8 +1922,8 @@ static int stm32_fmc2_nfc_probe(struct platform_device *pdev)
|
||||
if (!(nfc->cs_assigned & BIT(chip_cs)))
|
||||
continue;
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, mem_region);
|
||||
nfc->data_base[chip_cs] = devm_ioremap_resource(dev, res);
|
||||
nfc->data_base[chip_cs] = devm_platform_get_and_ioremap_resource(pdev,
|
||||
mem_region, &res);
|
||||
if (IS_ERR(nfc->data_base[chip_cs]))
|
||||
return PTR_ERR(nfc->data_base[chip_cs]);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user