Skip to contentSkip to conversation

hwmon: (tmp103) Add missing i2c_set_clientdata call in tmp103_probe

PATCH In review Axel Lin 3 participants 3 messages Jun 27, 2014 – Jun 30, 2014 Hardware monitoring

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 hwmon: (tmp103) Add missing i2c_set_clientdata call in tmp103_probe

Add missing i2c_set_clientdata() call in tmp103_probe, this makes the dev_get_drvdata() call in tmp103_suspend/tmp103_resume return correct address.

---
 drivers/hwmon/tmp103.c | 1 +
 1 file changed, 1 insertion(+)
drivers/hwmon/tmp103.c +1 -0
index e69dbca..c9f99e0 100644
@@ -151,6 +151,7 @@ static int tmp103_probe(struct i2c_client *client,
 		return ret;
 	}
 
+	i2c_set_clientdata(client, regmap);
 	hwmon_dev = hwmon_device_register_with_groups(dev, client->name,
 						      regmap, tmp103_groups);
 	return PTR_ERR_OR_ZERO(hwmon_dev);
Signature · 9 lines
1.8.3.2




_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
#2 lore raw
In reply to Axel Lin

Hello Axel,

Am 27.06.2014 16:49, schrieb Axel Lin:

Quoted 8 lines

Add missing i2c_set_clientdata() call in tmp103_probe, this makes the dev_get_drvdata() call in tmp103_suspend/tmp103_resume return correct address.

---
  drivers/hwmon/tmp103.c | 1 +
  1 file changed, 1 insertion(+)

Thanks for detecting this!

bye,
Heiko

Signature · 7 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors