Commit 8c86ab25 authored by Axel Lin's avatar Axel Lin Committed by Mark Brown

regulator: pfuze100: Use i2c_[set|get]_clientdata

Since this is a i2c driver, use i2c_[set|get]_clientdata instead of
dev_[set|get]_drvdata.
Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 94421b05
......@@ -360,7 +360,7 @@ static int pfuze100_regulator_probe(struct i2c_client *client,
if (!pfuze_chip)
return -ENOMEM;
dev_set_drvdata(&client->dev, pfuze_chip);
i2c_set_clientdata(client, pfuze_chip);
memcpy(pfuze_chip->regulator_descs, pfuze100_regulators,
sizeof(pfuze_chip->regulator_descs));
......@@ -429,7 +429,7 @@ static int pfuze100_regulator_probe(struct i2c_client *client,
static int pfuze100_regulator_remove(struct i2c_client *client)
{
int i;
struct pfuze_chip *pfuze_chip = dev_get_drvdata(&client->dev);
struct pfuze_chip *pfuze_chip = i2c_get_clientdata(client);
for (i = 0; i < PFUZE100_MAX_REGULATOR; i++)
regulator_unregister(pfuze_chip->regulators[i]);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment