[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1375070952.5721.2.camel@phoenix>
Date: Mon, 29 Jul 2013 12:09:12 +0800
From: Axel Lin <axel.lin@...ics.com>
To: Mark Brown <broonie@...nel.org>
Cc: Robin Gong <b38343@...escale.com>,
Liam Girdwood <lgirdwood@...il.com>,
linux-kernel@...r.kernel.org
Subject: [PATCH 2/2] 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: Axel Lin <axel.lin@...ics.com>
---
drivers/regulator/pfuze100-regulator.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/regulator/pfuze100-regulator.c b/drivers/regulator/pfuze100-regulator.c
index e2f9dcf..cd136ff 100644
--- a/drivers/regulator/pfuze100-regulator.c
+++ b/drivers/regulator/pfuze100-regulator.c
@@ -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]);
--
1.8.1.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists