]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mtd: nand: pxa3xx: Add a local loop variable
authorEzequiel Garcia <ezequiel.garcia@free-electrons.com>
Mon, 12 Aug 2013 17:14:52 +0000 (14:14 -0300)
committerBrian Norris <computersforpeace@gmail.com>
Mon, 12 Aug 2013 22:13:41 +0000 (15:13 -0700)
This is just a cosmetic change, to make the code more readable.

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Tested-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/mtd/nand/pxa3xx_nand.c

index ae8801673e7f6861a4ff375bbd732f6a9e328bb1..2aeb6b336915b5b888f52767a904ffde099cbb29 100644 (file)
@@ -1313,8 +1313,9 @@ static int pxa3xx_nand_probe(struct platform_device *pdev)
        info->variant = pxa3xx_nand_get_variant(pdev);
        probe_success = 0;
        for (cs = 0; cs < pdata->num_cs; cs++) {
+               struct mtd_info *mtd = info->host[cs]->mtd;
                info->cs = cs;
-               ret = pxa3xx_nand_scan(info->host[cs]->mtd);
+               ret = pxa3xx_nand_scan(mtd);
                if (ret) {
                        dev_warn(&pdev->dev, "failed to scan nand at cs %d\n",
                                cs);
@@ -1322,7 +1323,7 @@ static int pxa3xx_nand_probe(struct platform_device *pdev)
                }
 
                ppdata.of_node = pdev->dev.of_node;
-               ret = mtd_device_parse_register(info->host[cs]->mtd, NULL,
+               ret = mtd_device_parse_register(mtd, NULL,
                                                &ppdata, pdata->parts[cs],
                                                pdata->nr_parts[cs]);
                if (!ret)