From: Axel Lin <axel.lin@ingics.com>
To: Mark Brown <broonie@kernel.org>
Cc: Robin Gong <b38343@freescale.com>,
Liam Girdwood <lgirdwood@gmail.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] regulator: pfuze100: Use i2c_[set|get]_clientdata
Date: Mon, 29 Jul 2013 12:09:12 +0800 [thread overview]
Message-ID: <1375070952.5721.2.camel@phoenix> (raw)
In-Reply-To: <1375070881.5721.0.camel@phoenix>
Since this is a i2c driver, use i2c_[set|get]_clientdata instead of
dev_[set|get]_drvdata.
Signed-off-by: Axel Lin <axel.lin@ingics.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
next prev parent reply other threads:[~2013-07-29 4:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-29 4:08 [PATCH 1/2] regulator: pfuze100: REGULATOR_PFUZE100 needs to select REGMAP_I2C Axel Lin
2013-07-29 4:09 ` Axel Lin [this message]
2013-07-29 5:50 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1375070952.5721.2.camel@phoenix \
--to=axel.lin@ingics.com \
--cc=b38343@freescale.com \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox