[PATCH 3/3] MTD: NAND: txx9ndfmc: move to use platform_devm_request_and_ioremap() helper
Barry Song
Barry.Song at csr.com
Tue Jan 31 05:00:02 EST 2012
From: Barry Song <Baohua.Song at csr.com>
Signed-off-by: Barry Song <Baohua.Song at csr.com>
Cc: Atsushi Nemoto <anemo at mba.ocn.ne.jp>
Cc: David Woodhouse <dwmw2 at infradead.org>
---
drivers/mtd/nand/txx9ndfmc.c | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)
diff --git a/drivers/mtd/nand/txx9ndfmc.c b/drivers/mtd/nand/txx9ndfmc.c
index c7c4f1d..b285282 100644
--- a/drivers/mtd/nand/txx9ndfmc.c
+++ b/drivers/mtd/nand/txx9ndfmc.c
@@ -290,15 +290,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;
- res = platform_get_resource(dev, IORESOURCE_MEM, 0);
- if (!res)
- return -ENODEV;
drvdata = devm_kzalloc(&dev->dev, sizeof(*drvdata), GFP_KERNEL);
if (!drvdata)
return -ENOMEM;
- drvdata->base = devm_request_and_ioremap(&dev->dev, res);
+ drvdata->base = platform_devm_request_and_ioremap(dev, 0);
if (!drvdata->base)
return -EBUSY;
--
1.7.1
Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
More information can be found at www.csr.com. Follow CSR on Twitter at http://twitter.com/CSR_PLC and read our blog at www.csr.com/blog
More information about the linux-mtd
mailing list