diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2023-01-02 13:40:51 +0100 |
---|---|---|
committer | Miquel Raynal <miquel.raynal@bootlin.com> | 2023-01-07 15:19:40 +0100 |
commit | 718004a5972c83cbcc4b649ec34ff314de373650 (patch) | |
tree | c67ac5393b27b1e24f186c11db6e65d3cdd40de1 /tools/perf/scripts/python/task-analyzer.py | |
parent | 34569d869532b54d6e360d224a0254dcdd6a1785 (diff) |
mtd: rawnand: pasemi: Don't use static data to track per-device state
Up to now the pasemi nand driver only supported a single device
instance. However the check for that was racy because two parallel calls
of pasemi_nand_probe() could pass the check
if (pasemi_nand_mtd)
return -ENODEV;
before any of them assigns a non-NULL value to it.
So rework the driver to make use of per-device driver data.
As an intended side effect the driver can bind more than one device and
also gets rid of the check
if (!pasemi_nand_mtd)
return 0;
in the remove callback that could only ever trigger after the above race
happened.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20230102124051.1508424-1-u.kleine-koenig@pengutronix.de
Diffstat (limited to 'tools/perf/scripts/python/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions