regmap: change regmap_init_mem() to take ofnode instead udevice
Currently, regmap_init_mem() takes a udevice. This requires the node has already been associated with a device. It prevents syscon/regmap from behaving like those in Linux. Change the first argumenet to take a device node. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Neil Armstrong <narmstrong@baylibre.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
committed by
Tom Rini
parent
5ccc2c2130
commit
d35812368a
@@ -40,7 +40,7 @@ static int syscon_pre_probe(struct udevice *dev)
|
||||
return regmap_init_mem_platdata(dev, plat->reg, ARRAY_SIZE(plat->reg),
|
||||
&priv->regmap);
|
||||
#else
|
||||
return regmap_init_mem(dev, &priv->regmap);
|
||||
return regmap_init_mem(dev_ofnode(dev), &priv->regmap);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user