summaryrefslogtreecommitdiffstats
path: root/drivers/mfd/stpmic1.c
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2019-11-06 08:11:51 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2019-11-06 11:22:36 +0100
commitbf58ad743e2bc0bf5d439bb05651a65ff52b4d10 (patch)
tree7c6c4e83a360d669cb3d598c302e61fb16cb9f3b /drivers/mfd/stpmic1.c
parent3e7e76a81aef908f2e1c11e72e3bb8de8bee8f46 (diff)
downloadbarebox-bf58ad743e2bc0bf5d439bb05651a65ff52b4d10.tar.gz
barebox-bf58ad743e2bc0bf5d439bb05651a65ff52b4d10.tar.xz
mfd: stpmic1: use dev_get_regmap instead of priv member
When we call regmap_init, the regmap is associated with the device supplied and can be queried with dev_get_regmap. This is more natural than expecting cell drivers to cast dev->parent->priv. Do it. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/mfd/stpmic1.c')
-rw-r--r--drivers/mfd/stpmic1.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/mfd/stpmic1.c b/drivers/mfd/stpmic1.c
index 88c7921990..eae6fe3a4e 100644
--- a/drivers/mfd/stpmic1.c
+++ b/drivers/mfd/stpmic1.c
@@ -69,7 +69,6 @@ static int __init stpmic1_probe(struct device_d *dev)
stpmic1->client = to_i2c_client(dev);
regmap = regmap_init(dev, &regmap_stpmic1_i2c_bus,
stpmic1, &stpmic1_regmap_i2c_config);
- dev->priv = regmap;
ret = regmap_register_cdev(regmap, NULL);
if (ret)