[PATCH v2 7/7] i.MX: ocotp: Register regmap against orignal device

Andrey Smirnov andrew.smirnov at gmail.com
Mon Jul 18 08:14:49 PDT 2016


Register regmap against orignal device passed to probe, this way further
in the code/call-chain cdev's device_node will be correctly populated
and it will be discoverable via cdev_by_device_node()

Signed-off-by: Andrey Smirnov <andrew.smirnov at gmail.com>
---
 arch/arm/mach-imx/ocotp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-imx/ocotp.c b/arch/arm/mach-imx/ocotp.c
index 1dc9108..17b944b 100644
--- a/arch/arm/mach-imx/ocotp.c
+++ b/arch/arm/mach-imx/ocotp.c
@@ -404,7 +404,7 @@ static int imx_ocotp_probe(struct device_d *dev)
 	priv->map_config.reg_stride = 4;
 	priv->map_config.max_register = data->num_regs - 1;
 
-	priv->map = regmap_init(&priv->dev, &imx_ocotp_regmap_bus, priv, &priv->map_config);
+	priv->map = regmap_init(dev, &imx_ocotp_regmap_bus, priv, &priv->map_config);
 	if (IS_ERR(priv->map))
 		return PTR_ERR(priv->map);
 
-- 
2.5.5




More information about the barebox mailing list