diff options
| author | Samuel Holland <[email protected]> | 2023-01-22 16:06:33 -0600 |
|---|---|---|
| committer | Andre Przywara <[email protected]> | 2023-04-28 01:06:57 +0100 |
| commit | b05bf9415705faffc2a45c2a5f5385f119f9a8b1 (patch) | |
| tree | 846455844d1650fc0500fb08bb90dc591f133ae4 | |
| parent | 7a85585fbcaf10d50cf8e44a8e46384228c0224d (diff) | |
mtd: nand: sunxi: Remove an unnecessary check
Each chip is required to have a unique CS number ("reg" property) in the
range 0-7, so there is no need to separately count the number of chips.
Reviewed-by: Michael Trimarchi <[email protected]>
Signed-off-by: Samuel Holland <[email protected]>
Signed-off-by: Andre Przywara <[email protected]>
| -rw-r--r-- | drivers/mtd/nand/raw/sunxi_nand.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/drivers/mtd/nand/raw/sunxi_nand.c b/drivers/mtd/nand/raw/sunxi_nand.c index c378f08f680..0f10edfdb20 100644 --- a/drivers/mtd/nand/raw/sunxi_nand.c +++ b/drivers/mtd/nand/raw/sunxi_nand.c @@ -1767,16 +1767,6 @@ static int sunxi_nand_chips_init(int node, struct sunxi_nfc *nfc) int ret, i = 0; for (nand_node = fdt_first_subnode(blob, node); nand_node >= 0; - nand_node = fdt_next_subnode(blob, nand_node)) - i++; - - if (i > 8) { - dev_err(nfc->dev, "too many NAND chips: %d (max = 8)\n", i); - return -EINVAL; - } - - i = 0; - for (nand_node = fdt_first_subnode(blob, node); nand_node >= 0; nand_node = fdt_next_subnode(blob, nand_node)) { ret = sunxi_nand_chip_init(nand_node, nfc, i++); if (ret) |
