1 From 96d8ffc47c7ee9689b8b48ac9588e0b00fa9bd44 Mon Sep 17 00:00:00 2001
2 From: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
3 Date: Mon, 12 Aug 2013 14:14:53 -0300
4 Subject: [PATCH 120/203] mtd: nand: pxa3xx: Remove hardcoded mtd name
6 There's no advantage in using a hardcoded name for the mtd device.
7 Instead use the provided by the platform_device.
9 Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
10 Tested-by: Daniel Mack <zonque@gmail.com>
11 Signed-off-by: Brian Norris <computersforpeace@gmail.com>
12 Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
14 drivers/mtd/nand/pxa3xx_nand.c | 6 ++----
15 1 file changed, 2 insertions(+), 4 deletions(-)
17 --- a/drivers/mtd/nand/pxa3xx_nand.c
18 +++ b/drivers/mtd/nand/pxa3xx_nand.c
19 @@ -244,8 +244,6 @@ static struct pxa3xx_nand_flash builtin_
20 /* Define a default flash type setting serve as flash detecting only */
21 #define DEFAULT_FLASH_TYPE (&builtin_flash_types[0])
23 -const char *mtd_names[] = {"pxa3xx_nand-0", "pxa3xx_nand-1", NULL};
25 #define NDTR0_tCH(c) (min((c), 7) << 19)
26 #define NDTR0_tCS(c) (min((c), 7) << 16)
27 #define NDTR0_tWH(c) (min((c), 7) << 11)
28 @@ -1091,8 +1089,6 @@ KEEP_CONFIG:
29 host->row_addr_cycles = 3;
31 host->row_addr_cycles = 2;
33 - mtd->name = mtd_names[0];
34 return nand_scan_tail(mtd);
37 @@ -1321,6 +1317,8 @@ static int pxa3xx_nand_probe(struct plat
39 for (cs = 0; cs < pdata->num_cs; cs++) {
40 struct mtd_info *mtd = info->host[cs]->mtd;
42 + mtd->name = pdev->name;
44 ret = pxa3xx_nand_scan(mtd);