Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 210726
b: refs/heads/master
c: 58d463e
h: refs/heads/master
v: v3
  • Loading branch information
Axel Lin authored and Liam Girdwood committed Sep 1, 2010
1 parent bfe2849 commit 9a622c2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 606b2f490fb80e55d05cf0e6cec0b6c0ff0fc18f
refs/heads/master: 58d463eec844f6381d63d04dc89d319ae3057ca9
12 changes: 6 additions & 6 deletions trunk/drivers/regulator/ad5398.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ struct ad5398_chip_info {
unsigned int current_level;
unsigned int current_mask;
unsigned int current_offset;
struct regulator_dev rdev;
struct regulator_dev *rdev;
};

static int ad5398_calc_current(struct ad5398_chip_info *chip,
Expand Down Expand Up @@ -211,7 +211,6 @@ MODULE_DEVICE_TABLE(i2c, ad5398_id);
static int __devinit ad5398_probe(struct i2c_client *client,
const struct i2c_device_id *id)
{
struct regulator_dev *rdev;
struct regulator_init_data *init_data = client->dev.platform_data;
struct ad5398_chip_info *chip;
const struct ad5398_current_data_format *df =
Expand All @@ -233,9 +232,10 @@ static int __devinit ad5398_probe(struct i2c_client *client,
chip->current_offset = df->current_offset;
chip->current_mask = (chip->current_level - 1) << chip->current_offset;

rdev = regulator_register(&ad5398_reg, &client->dev, init_data, chip);
if (IS_ERR(rdev)) {
ret = PTR_ERR(rdev);
chip->rdev = regulator_register(&ad5398_reg, &client->dev,
init_data, chip);
if (IS_ERR(chip->rdev)) {
ret = PTR_ERR(chip->rdev);
dev_err(&client->dev, "failed to register %s %s\n",
id->name, ad5398_reg.name);
goto err;
Expand All @@ -254,7 +254,7 @@ static int __devexit ad5398_remove(struct i2c_client *client)
{
struct ad5398_chip_info *chip = i2c_get_clientdata(client);

regulator_unregister(&chip->rdev);
regulator_unregister(chip->rdev);
kfree(chip);
i2c_set_clientdata(client, NULL);

Expand Down

0 comments on commit 9a622c2

Please sign in to comment.