projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2f597bc
)
mtd: rawnand: txx9ndfm: Make use of the helper function devm_platform_ioremap_resource()
author
Cai Huoqing
<caihuoqing@baidu.com>
Wed, 1 Sep 2021 07:42:37 +0000
(15:42 +0800)
committer
Miquel Raynal
<miquel.raynal@bootlin.com>
Tue, 14 Sep 2021 17:35:01 +0000
(19:35 +0200)
Use the devm_platform_ioremap_resource() helper instead of
calling platform_get_resource() and devm_ioremap_resource()
separately
Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link:
https://lore.kernel.org/linux-mtd/20210901074237.9533-1-caihuoqing@baidu.com
drivers/mtd/nand/raw/txx9ndfmc.c
patch
|
blob
|
history
diff --git
a/drivers/mtd/nand/raw/txx9ndfmc.c
b/drivers/mtd/nand/raw/txx9ndfmc.c
index b8894ac27073c29b5f432aae385f15c63fe30b9e..b42d61b30c0b40f2e88240bb33f27d26b0ab4334 100644
(file)
--- a/
drivers/mtd/nand/raw/txx9ndfmc.c
+++ b/
drivers/mtd/nand/raw/txx9ndfmc.c
@@
-284,13
+284,11
@@
static int __init txx9ndfmc_probe(struct platform_device *dev)
int i;
struct txx9ndfmc_drvdata *drvdata;
unsigned long gbusclk = plat->gbus_clock;
- struct resource *res;
drvdata = devm_kzalloc(&dev->dev, sizeof(*drvdata), GFP_KERNEL);
if (!drvdata)
return -ENOMEM;
- res = platform_get_resource(dev, IORESOURCE_MEM, 0);
- drvdata->base = devm_ioremap_resource(&dev->dev, res);
+ drvdata->base = devm_platform_ioremap_resource(dev, 0);
if (IS_ERR(drvdata->base))
return PTR_ERR(drvdata->base);