imx6: update 3.10 patches
[openwrt.git] / target / linux / imx6 / patches-3.10 / 0023-regulator-pfuze100-Use-i2c_-set-get-_clientdata.patch
1 From: Axel Lin <axel.lin@ingics.com>
2 Subject: [PATCH] regulator: pfuze100: Use i2c_[set|get]_clientdata
3
4 Since this is a i2c driver, use i2c_[set|get]_clientdata instead of
5 dev_[set|get]_drvdata.
6
7 Signed-off-by: Axel Lin <axel.lin@ingics.com>
8 Signed-off-by: Mark Brown <broonie@linaro.org>
9 ---
10  drivers/regulator/pfuze100-regulator.c | 4 ++--
11  1 file changed, 2 insertions(+), 2 deletions(-)
12
13 --- a/drivers/regulator/pfuze100-regulator.c
14 +++ b/drivers/regulator/pfuze100-regulator.c
15 @@ -360,7 +360,7 @@ static int pfuze100_regulator_probe(stru
16         if (!pfuze_chip)
17                 return -ENOMEM;
18  
19 -       dev_set_drvdata(&client->dev, pfuze_chip);
20 +       i2c_set_clientdata(client, pfuze_chip);
21  
22         memcpy(pfuze_chip->regulator_descs, pfuze100_regulators,
23                 sizeof(pfuze_chip->regulator_descs));
24 @@ -429,7 +429,7 @@ static int pfuze100_regulator_probe(stru
25  static int pfuze100_regulator_remove(struct i2c_client *client)
26  {
27         int i;
28 -       struct pfuze_chip *pfuze_chip = dev_get_drvdata(&client->dev);
29 +       struct pfuze_chip *pfuze_chip = i2c_get_clientdata(client);
30  
31         for (i = 0; i < PFUZE100_MAX_REGULATOR; i++)
32                 regulator_unregister(pfuze_chip->regulators[i]);