aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
authorEzequiel Garcia <ezequiel.garcia@free-electrons.com>2013-08-12 13:14:53 -0400
committerDavid Woodhouse <David.Woodhouse@intel.com>2013-08-30 16:34:56 -0400
commitf455578dd961087a5cf94730d9f6489bb1d355f0 (patch)
tree1d3cd974e4080ef3d6d7f06df3c303ffb4157e09 /drivers/mtd
parentb7655bcb40883de6fd218395a55d0cc9089e55a1 (diff)
mtd: nand: pxa3xx: Remove hardcoded mtd name
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> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/nand/pxa3xx_nand.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c
index 9f5d8db78a13..8757491d19d1 100644
--- a/drivers/mtd/nand/pxa3xx_nand.c
+++ b/drivers/mtd/nand/pxa3xx_nand.c
@@ -244,8 +244,6 @@ static struct pxa3xx_nand_flash builtin_flash_types[] = {
244/* Define a default flash type setting serve as flash detecting only */ 244/* Define a default flash type setting serve as flash detecting only */
245#define DEFAULT_FLASH_TYPE (&builtin_flash_types[0]) 245#define DEFAULT_FLASH_TYPE (&builtin_flash_types[0])
246 246
247const char *mtd_names[] = {"pxa3xx_nand-0", "pxa3xx_nand-1", NULL};
248
249#define NDTR0_tCH(c) (min((c), 7) << 19) 247#define NDTR0_tCH(c) (min((c), 7) << 19)
250#define NDTR0_tCS(c) (min((c), 7) << 16) 248#define NDTR0_tCS(c) (min((c), 7) << 16)
251#define NDTR0_tWH(c) (min((c), 7) << 11) 249#define NDTR0_tWH(c) (min((c), 7) << 11)
@@ -1091,8 +1089,6 @@ KEEP_CONFIG:
1091 host->row_addr_cycles = 3; 1089 host->row_addr_cycles = 3;
1092 else 1090 else
1093 host->row_addr_cycles = 2; 1091 host->row_addr_cycles = 2;
1094
1095 mtd->name = mtd_names[0];
1096 return nand_scan_tail(mtd); 1092 return nand_scan_tail(mtd);
1097} 1093}
1098 1094
@@ -1321,6 +1317,8 @@ static int pxa3xx_nand_probe(struct platform_device *pdev)
1321 probe_success = 0; 1317 probe_success = 0;
1322 for (cs = 0; cs < pdata->num_cs; cs++) { 1318 for (cs = 0; cs < pdata->num_cs; cs++) {
1323 struct mtd_info *mtd = info->host[cs]->mtd; 1319 struct mtd_info *mtd = info->host[cs]->mtd;
1320
1321 mtd->name = pdev->name;
1324 info->cs = cs; 1322 info->cs = cs;
1325 ret = pxa3xx_nand_scan(mtd); 1323 ret = pxa3xx_nand_scan(mtd);
1326 if (ret) { 1324 if (ret) {