diff options
author | Markus Pargmann <mpa@pengutronix.de> | 2015-08-21 08:26:43 (GMT) |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-08-21 16:33:43 (GMT) |
commit | 9c9f7f675970ba1b888272f016157de21f69e7e2 (patch) | |
tree | 6ce5c3d958d77b93efd944c4b251734068c0ecf8 /drivers | |
parent | 67921a1a6660d32cc2770d05d656a1187b6d94d5 (diff) | |
download | linux-9c9f7f675970ba1b888272f016157de21f69e7e2.tar.xz |
regmap: No multi_write support if bus->write does not exist
There is no multi_write support available if we cannot use raw_write.
This is the case if bus->write is not implemented.
This patch adds a condition that we need bus and bus->write so that
can_multi_write is true.
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/base/regmap/regmap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c index bc82fd3..27456c7 100644 --- a/drivers/base/regmap/regmap.c +++ b/drivers/base/regmap/regmap.c @@ -578,7 +578,7 @@ struct regmap *regmap_init(struct device *dev, map->reg_stride = 1; map->use_single_read = config->use_single_rw || !bus || !bus->read; map->use_single_write = config->use_single_rw || !bus || !bus->write; - map->can_multi_write = config->can_multi_write; + map->can_multi_write = config->can_multi_write && bus && bus->write; map->dev = dev; map->bus = bus; map->bus_context = bus_context; |