mtd/drivers/mtd/nand nand_base.c,1.106,1.107
dbrown at infradead.org
dbrown at infradead.org
Tue Jun 22 09:13:21 EDT 2004
Update of /home/cvs/mtd/drivers/mtd/nand
In directory phoenix.infradead.org:/tmp/cvs-serv4569
Modified Files:
nand_base.c
Log Message:
Only set mtd->name if the device driver has not supplied a value.
Index: nand_base.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/nand/nand_base.c,v
retrieving revision 1.106
retrieving revision 1.107
diff -u -r1.106 -r1.107
--- nand_base.c 22 Jun 2004 09:30:03 -0000 1.106
+++ nand_base.c 22 Jun 2004 13:13:18 -0000 1.107
@@ -2206,7 +2206,7 @@
*/
int nand_scan (struct mtd_info *mtd, int maxchips)
{
- int i, nand_maf_id, nand_dev_id, busw;
+ int i, j, nand_maf_id, nand_dev_id, busw;
struct nand_chip *this = mtd->priv;
/* Get buswidth to select the correct functions*/
@@ -2262,8 +2262,8 @@
if (nand_dev_id != nand_flash_ids[i].id)
continue;
-
- mtd->name = nand_flash_ids[i].name;
+
+ if (!mtd->name) mtd->name = nand_flash_ids[i].name;
this->chipsize = nand_flash_ids[i].chipsize << 20;
/* New devices have all the information in additional id bytes */
@@ -2339,17 +2339,17 @@
this->cmdfunc = nand_command_lp;
/* Try to identify manufacturer */
- for (i = 0; nand_manuf_ids[i].id != 0x0; i++) {
- if (nand_manuf_ids[i].id == nand_maf_id)
+ for (j = 0; nand_manuf_ids[j].id != 0x0; j++) {
+ if (nand_manuf_ids[j].id == nand_maf_id)
break;
}
printk (KERN_INFO "NAND device: Manufacturer ID:"
" 0x%02x, Chip ID: 0x%02x (%s %s)\n", nand_maf_id, nand_dev_id,
- nand_manuf_ids[i].name , mtd->name);
+ nand_manuf_ids[j].name , nand_flash_ids[i].name);
break;
}
- if (!mtd->name) {
+ if (!nand_flash_ids[i].name) {
printk (KERN_WARNING "No NAND device found!!!\n");
this->select_chip(mtd, -1);
return 1;
More information about the linux-mtd-cvs
mailing list