diff options
author | Julia Lawall <julia.lawall@lip6.fr> | 2019-07-22 18:39:34 -0500 |
---|---|---|
committer | Miquel Raynal <miquel.raynal@bootlin.com> | 2019-08-07 18:15:01 +0200 |
commit | 3194166052401e04ca6ca71446a1ca5dd9af2433 (patch) | |
tree | 8794d50aeceee4161d8640ed4a13744dbd826ec0 /drivers/mtd/nand | |
parent | 1670e678a8a72e8b09774e21986d1d77d4610f96 (diff) | |
download | linux-3194166052401e04ca6ca71446a1ca5dd9af2433.tar.gz linux-3194166052401e04ca6ca71446a1ca5dd9af2433.tar.bz2 linux-3194166052401e04ca6ca71446a1ca5dd9af2433.zip |
mtd: rawnand: ingenic: fix devm_platform_ioremap_resource.cocci warnings
drivers/mtd/nand/raw/ingenic/ingenic_nand_drv.c:330:1-9: WARNING: Use devm_platform_ioremap_resource for cs -> base
Use devm_platform_ioremap_resource helper which wraps
platform_get_resource() and devm_ioremap_resource() together.
Generated by: scripts/coccinelle/api/devm_platform_ioremap_resource.cocci
Fixes: c403ec33b613 ("mtd: rawnand: ingenic: Fix ingenic_ecc dependency")
CC: Paul Cercueil <paul@crapouillou.net>
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Diffstat (limited to 'drivers/mtd/nand')
-rw-r--r-- | drivers/mtd/nand/raw/ingenic/ingenic_nand_drv.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/mtd/nand/raw/ingenic/ingenic_nand_drv.c b/drivers/mtd/nand/raw/ingenic/ingenic_nand_drv.c index df214e7ddec8..49afebee50db 100644 --- a/drivers/mtd/nand/raw/ingenic/ingenic_nand_drv.c +++ b/drivers/mtd/nand/raw/ingenic/ingenic_nand_drv.c @@ -310,7 +310,6 @@ static int ingenic_nand_init_chip(struct platform_device *pdev, struct device *dev = &pdev->dev; struct ingenic_nand *nand; struct ingenic_nand_cs *cs; - struct resource *res; struct nand_chip *chip; struct mtd_info *mtd; const __be32 *reg; @@ -326,8 +325,7 @@ static int ingenic_nand_init_chip(struct platform_device *pdev, jz4780_nemc_set_type(nfc->dev, cs->bank, JZ4780_NEMC_BANK_NAND); - res = platform_get_resource(pdev, IORESOURCE_MEM, chipnr); - cs->base = devm_ioremap_resource(dev, res); + cs->base = devm_platform_ioremap_resource(pdev, chipnr); if (IS_ERR(cs->base)) return PTR_ERR(cs->base); |