diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2019-05-21 10:43:35 +0200 |
---|---|---|
committer | Miquel Raynal <miquel.raynal@bootlin.com> | 2019-05-21 11:50:49 +0200 |
commit | b2b5921fe4b363ff29fea9183aca089231a6bafc (patch) | |
tree | ca48b60c0a47419d0690aba5e05c6ce8ce1c1361 /include/linux/mtd | |
parent | a188339ca5a396acc588e5851ed7e19f66b0ebd9 (diff) |
mtd: rawnand: initialize ntargets with maxchips
memorg->ntargets is initialized with '1'. It should be initialized with
the maxchips argument from nand_scan() instead. Otherwise multi chip
support errors out on the secondary chip selects when trying to call
nand_reset() on them:
WARNING: CPU: 0 PID: 1 at drivers/mtd/nand/raw/internals.h:114
nand_reset_op+0x194/0x1c4
With this memorg->ntargets is initialized with the maximum number of
chip selects supported by the driver. After having detected the number
of actually connected chips memory->ntargets is updated with that
number.
Fixes: 32813e288414 ("mtd: rawnand: Get rid of chip->numchips")
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Diffstat (limited to 'include/linux/mtd')
0 files changed, 0 insertions, 0 deletions