projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1726813
)
mtd: spear_smi: Convert to devm_platform_ioremap_resource()
author
Yangtao Li
<frank.li@vivo.com>
Fri, 7 Jul 2023 04:06:21 +0000
(12:06 +0800)
committer
Miquel Raynal
<miquel.raynal@bootlin.com>
Wed, 12 Jul 2023 12:08:29 +0000
(14:08 +0200)
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
drivers/mtd/devices/spear_smi.c
patch
|
blob
|
history
diff --git
a/drivers/mtd/devices/spear_smi.c
b/drivers/mtd/devices/spear_smi.c
index
cc17133
..
93bca52
100644
(file)
--- 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;