Skip to content

Commit

Permalink
mtd: nand: supress 'unknown NAND' warning if no nand is found
Browse files Browse the repository at this point in the history
This printk was added recently and results in ugly output on systems
with no NAND:

NAND:  nand_get_flash_type: unknown NAND device: Manufacturer ID: 0x00, Chip ID: 0x00 0 MiB

instead of:

NAND:  0 MiB

Signed-off-by: Steve Sakoman <[email protected]>
Acked-by: Scott Wood <[email protected]>
Signed-off-by: Sandeep Paulraj <[email protected]>
  • Loading branch information
sakoman authored and Sandeep Paulraj committed Sep 8, 2010
1 parent 3667cbe commit 4c46839
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions drivers/mtd/nand/nand_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -2653,9 +2653,12 @@ static struct nand_flash_dev *nand_get_flash_type(struct mtd_info *mtd,
}

if (!type) {
printk(KERN_INFO "%s: unknown NAND device: Manufacturer ID:"
" 0x%02x, Chip ID: 0x%02x\n", __func__,
*maf_id, dev_id);
/* supress warning if there is no nand */
if (*maf_id != 0x00 && *maf_id != 0xff &&
dev_id != 0x00 && dev_id != 0xff)
printk(KERN_INFO "%s: unknown NAND device: "
"Manufacturer ID: 0x%02x, Chip ID: 0x%02x\n",
__func__, *maf_id, dev_id);
return ERR_PTR(-ENODEV);
}

Expand Down

0 comments on commit 4c46839

Please sign in to comment.