]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
mtd: nand: denali: remove unneeded find_valid_banks()
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Tue, 13 Jun 2017 13:45:36 +0000 (22:45 +0900)
committerBoris Brezillon <boris.brezillon@free-electrons.com>
Tue, 20 Jun 2017 07:14:25 +0000 (09:14 +0200)
commit959e9f2ae9dac4821d7da354a37272650febebbe
tree4922e3ceb5f0db0faebc28da7042c47fd26d6457
parentb21ff825d6b7fa7122f9c4455f9a0f157b9fb225
mtd: nand: denali: remove unneeded find_valid_banks()

The function find_valid_banks() issues the Read ID (0x90) command,
then compares the first byte (Manufacturer ID) of each bank with
the one of bank0.

This is equivalent to what nand_scan_ident() does.  The number of
chips is detected there, so this is unneeded.

What is worse for find_valid_banks() is that, if multiple chips are
connected to INTEL_CE4100 platform, it crashes the kernel by BUG().
This is what we should avoid.  This function is just harmful and
unneeded.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
drivers/mtd/nand/denali.c
drivers/mtd/nand/denali.h