diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2017-06-06 08:21:40 +0900 |
---|---|---|
committer | Boris Brezillon <boris.brezillon@free-electrons.com> | 2017-06-10 12:09:29 +0200 |
commit | 2b8c92b4e7265e271cd070a1a5dd1ab2766e516b (patch) | |
tree | 4df5e9e42a7b15712bce58f7546872ad1ca800fb /drivers/mtd | |
parent | f82c3232d1906bc8754e0b33ce39d09d08cb60c3 (diff) | |
download | linux-2b8c92b4e7265e271cd070a1a5dd1ab2766e516b.tar.gz linux-2b8c92b4e7265e271cd070a1a5dd1ab2766e516b.tar.bz2 linux-2b8c92b4e7265e271cd070a1a5dd1ab2766e516b.zip |
mtd: nand: denali_dt: clean up resource ioremap
No need to use two struct resource pointers. Just reuse one.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/nand/denali_dt.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/mtd/nand/denali_dt.c b/drivers/mtd/nand/denali_dt.c index df9ef36cc2ce..b48430fe3cd4 100644 --- a/drivers/mtd/nand/denali_dt.c +++ b/drivers/mtd/nand/denali_dt.c @@ -49,7 +49,7 @@ MODULE_DEVICE_TABLE(of, denali_nand_dt_ids); static int denali_dt_probe(struct platform_device *pdev) { - struct resource *denali_reg, *nand_data; + struct resource *res; struct denali_dt *dt; const struct denali_dt_data *data; struct denali_nand_info *denali; @@ -74,15 +74,13 @@ static int denali_dt_probe(struct platform_device *pdev) return denali->irq; } - denali_reg = platform_get_resource_byname(pdev, IORESOURCE_MEM, - "denali_reg"); - denali->flash_reg = devm_ioremap_resource(&pdev->dev, denali_reg); + res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "denali_reg"); + denali->flash_reg = devm_ioremap_resource(&pdev->dev, res); if (IS_ERR(denali->flash_reg)) return PTR_ERR(denali->flash_reg); - nand_data = platform_get_resource_byname(pdev, IORESOURCE_MEM, - "nand_data"); - denali->flash_mem = devm_ioremap_resource(&pdev->dev, nand_data); + res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "nand_data"); + denali->flash_mem = devm_ioremap_resource(&pdev->dev, res); if (IS_ERR(denali->flash_mem)) return PTR_ERR(denali->flash_mem); |