diff options
author | Yangtao Li <frank.li@vivo.com> | 2023-07-07 07:06:21 +0300 |
---|---|---|
committer | Miquel Raynal <miquel.raynal@bootlin.com> | 2023-07-12 15:08:29 +0300 |
commit | badd019b4a2a44815e976a0108dd8e52a1a24a83 (patch) | |
tree | baa11e0f9685c6a2dab3936ab781fa3ef072acd9 /drivers/mtd/devices | |
parent | 1726813c2efff24a78836dd6333cd213b28cd5fa (diff) | |
download | linux-badd019b4a2a44815e976a0108dd8e52a1a24a83.tar.xz |
mtd: spear_smi: Convert to devm_platform_ioremap_resource()
Use devm_platform_ioremap_resource() to simplify code.
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-17-frank.li@vivo.com
Diffstat (limited to 'drivers/mtd/devices')
-rw-r--r-- | drivers/mtd/devices/spear_smi.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/mtd/devices/spear_smi.c b/drivers/mtd/devices/spear_smi.c index cc17133be297..93bca5225116 100644 --- a/drivers/mtd/devices/spear_smi.c +++ b/drivers/mtd/devices/spear_smi.c @@ -937,7 +937,6 @@ static int spear_smi_probe(struct platform_device *pdev) struct device_node *np = pdev->dev.of_node; struct spear_smi_plat_data *pdata = NULL; struct spear_smi *dev; - struct resource *smi_base; int irq, ret = 0; int i; @@ -975,9 +974,7 @@ static int spear_smi_probe(struct platform_device *pdev) goto err; } - smi_base = platform_get_resource(pdev, IORESOURCE_MEM, 0); - - dev->io_base = devm_ioremap_resource(&pdev->dev, smi_base); + dev->io_base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(dev->io_base)) { ret = PTR_ERR(dev->io_base); goto err; |