提交 07ea400e 编写于 作者: M Markus Pargmann 提交者: Mark Brown

regmap: Fix regmap_can_raw_write check

This function is missing a check if map->bus->write is implemented. If
it is not implemented arbitrary raw writes are not possible.
Signed-off-by: NMarkus Pargmann <mpa@pengutronix.de>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 bc0195aa
......@@ -1382,7 +1382,8 @@ int _regmap_raw_write(struct regmap *map, unsigned int reg,
*/
bool regmap_can_raw_write(struct regmap *map)
{
return map->bus && map->format.format_val && map->format.format_reg;
return map->bus && map->bus->write && map->format.format_val &&
map->format.format_reg;
}
EXPORT_SYMBOL_GPL(regmap_can_raw_write);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册