Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 347179
b: refs/heads/master
c: 0730016
h: refs/heads/master
i:
  347177: 10d68db
  347175: a5aba72
v: v3
  • Loading branch information
Huang Shijie authored and Artem Bityutskiy committed Nov 18, 2012
1 parent bf08b4f commit d47809a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ded4c55d108e0e4e4ba221b39a782e85d77a5ca0
refs/heads/master: 07300164657526d8d26c626c43723c310fbf3616
10 changes: 6 additions & 4 deletions trunk/drivers/mtd/nand/nand_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -3329,6 +3329,8 @@ int nand_scan_ident(struct mtd_info *mtd, int maxchips,
return PTR_ERR(type);
}

chip->select_chip(mtd, -1);

/* Check for a chip array */
for (i = 1; i < maxchips; i++) {
chip->select_chip(mtd, i);
Expand All @@ -3338,8 +3340,11 @@ int nand_scan_ident(struct mtd_info *mtd, int maxchips,
chip->cmdfunc(mtd, NAND_CMD_READID, 0x00, -1);
/* Read manufacturer and device IDs */
if (nand_maf_id != chip->read_byte(mtd) ||
nand_dev_id != chip->read_byte(mtd))
nand_dev_id != chip->read_byte(mtd)) {
chip->select_chip(mtd, -1);
break;
}
chip->select_chip(mtd, -1);
}
if (i > 1)
pr_info("%d NAND chips detected\n", i);
Expand Down Expand Up @@ -3598,9 +3603,6 @@ int nand_scan_tail(struct mtd_info *mtd)
/* Initialize state */
chip->state = FL_READY;

/* De-select the device */
chip->select_chip(mtd, -1);

/* Invalidate the pagebuffer reference */
chip->pagebuf = -1;

Expand Down

0 comments on commit d47809a

Please sign in to comment.