hwmon: (tmp103) Add missing i2c_set_clientdata call in tmp103_probe
authorAxel Lin <axel.lin@ingics.com>
Fri, 27 Jun 2014 14:49:29 +0000 (22:49 +0800)
committerGuenter Roeck <linux@roeck-us.net>
Mon, 4 Aug 2014 14:01:34 +0000 (07:01 -0700)
Add missing i2c_set_clientdata() call in tmp103_probe, this makes the
dev_get_drvdata() call in tmp103_suspend/tmp103_resume return correct
address.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/tmp103.c

index e69dbcacac89a8ca2d63479a67db288e6924b08d..c9f99e0eb36869b99eb8871b31c76cc95e2aedd5 100644 (file)
@@ -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);