]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mtd: nand: pxa3xx: Remove hardcoded mtd name
authorEzequiel Garcia <ezequiel.garcia@free-electrons.com>
Mon, 12 Aug 2013 17:14:53 +0000 (14:14 -0300)
committerBrian Norris <computersforpeace@gmail.com>
Mon, 12 Aug 2013 22:13:42 +0000 (15:13 -0700)
There's no advantage in using a hardcoded name for the mtd device.
Instead use the provided by the platform_device.

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 2aeb6b336915b5b888f52767a904ffde099cbb29..e8b69db22e3f66c6eb2f2878f1644f3d0e99b3c5 100644 (file)
@@ -244,8 +244,6 @@ static struct pxa3xx_nand_flash builtin_flash_types[] = {
 /* Define a default flash type setting serve as flash detecting only */
 #define DEFAULT_FLASH_TYPE (&builtin_flash_types[0])
 
-const char *mtd_names[] = {"pxa3xx_nand-0", "pxa3xx_nand-1", NULL};
-
 #define NDTR0_tCH(c)   (min((c), 7) << 19)
 #define NDTR0_tCS(c)   (min((c), 7) << 16)
 #define NDTR0_tWH(c)   (min((c), 7) << 11)
@@ -1091,8 +1089,6 @@ KEEP_CONFIG:
                host->row_addr_cycles = 3;
        else
                host->row_addr_cycles = 2;
-
-       mtd->name = mtd_names[0];
        return nand_scan_tail(mtd);
 }
 
@@ -1314,6 +1310,8 @@ static int pxa3xx_nand_probe(struct platform_device *pdev)
        probe_success = 0;
        for (cs = 0; cs < pdata->num_cs; cs++) {
                struct mtd_info *mtd = info->host[cs]->mtd;
+
+               mtd->name = pdev->name;
                info->cs = cs;
                ret = pxa3xx_nand_scan(mtd);
                if (ret) {