diff options
author | Boris Brezillon <bbrezillon@kernel.org> | 2018-10-29 11:58:29 +0100 |
---|---|---|
committer | Miquel Raynal <miquel.raynal@bootlin.com> | 2019-04-08 10:21:16 +0200 |
commit | 32813e288414fecce18f37f8f0d0414a64b45c56 (patch) | |
tree | b8b5296f17bfcf1a266e0261fafc12fab5f337a1 /drivers/mtd/nand/raw/internals.h | |
parent | mtd: rawnand: Get rid of chip->chipsize (diff) | |
download | linux-32813e288414fecce18f37f8f0d0414a64b45c56.tar.xz linux-32813e288414fecce18f37f8f0d0414a64b45c56.zip |
mtd: rawnand: Get rid of chip->numchips
The same information is provided by nanddev_ntargets().
Signed-off-by: Boris Brezillon <bbrezillon@kernel.org>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Diffstat (limited to 'drivers/mtd/nand/raw/internals.h')
-rw-r--r-- | drivers/mtd/nand/raw/internals.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/nand/raw/internals.h b/drivers/mtd/nand/raw/internals.h index fbf6ca015cd7..a204f9d7e123 100644 --- a/drivers/mtd/nand/raw/internals.h +++ b/drivers/mtd/nand/raw/internals.h @@ -110,7 +110,7 @@ static inline int nand_exec_op(struct nand_chip *chip, if (!nand_has_exec_op(chip)) return -ENOTSUPP; - if (WARN_ON(op->cs >= chip->numchips)) + if (WARN_ON(op->cs >= nanddev_ntargets(&chip->base))) return -EINVAL; return chip->controller->ops->exec_op(chip, op, false); |