Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 317385
b: refs/heads/master
c: d03fcfe
h: refs/heads/master
i:
  317383: 778cf02
v: v3
  • Loading branch information
Axel Lin authored and Greg Kroah-Hartman committed Jun 15, 2012
1 parent acf9c3d commit d4e4ee0
Show file tree
Hide file tree
Showing 2 changed files with 5 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: 4d9505af7743828464d066795c6e1311c7884db4
refs/heads/master: d03fcfe626b89832b36dbfa5fb32a805478b097a
10 changes: 4 additions & 6 deletions trunk/drivers/iio/dac/ad5380.c
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ static int __devinit ad5380_probe(struct device *dev, struct regmap *regmap,
if (indio_dev == NULL) {
dev_err(dev, "Failed to allocate iio device\n");
ret = -ENOMEM;
goto error_regmap_exit;
goto error_out;
}

st = iio_priv(indio_dev);
Expand Down Expand Up @@ -436,8 +436,7 @@ static int __devinit ad5380_probe(struct device *dev, struct regmap *regmap,
kfree(indio_dev->channels);
error_free:
iio_device_free(indio_dev);
error_regmap_exit:
regmap_exit(regmap);
error_out:

return ret;
}
Expand All @@ -456,7 +455,6 @@ static int __devexit ad5380_remove(struct device *dev)
regulator_put(st->vref_reg);
}

regmap_exit(st->regmap);
iio_device_free(indio_dev);

return 0;
Expand Down Expand Up @@ -485,7 +483,7 @@ static int __devinit ad5380_spi_probe(struct spi_device *spi)
const struct spi_device_id *id = spi_get_device_id(spi);
struct regmap *regmap;

regmap = regmap_init_spi(spi, &ad5380_regmap_config);
regmap = devm_regmap_init_spi(spi, &ad5380_regmap_config);

if (IS_ERR(regmap))
return PTR_ERR(regmap);
Expand Down Expand Up @@ -559,7 +557,7 @@ static int __devinit ad5380_i2c_probe(struct i2c_client *i2c,
{
struct regmap *regmap;

regmap = regmap_init_i2c(i2c, &ad5380_regmap_config);
regmap = devm_regmap_init_i2c(i2c, &ad5380_regmap_config);

if (IS_ERR(regmap))
return PTR_ERR(regmap);
Expand Down

0 comments on commit d4e4ee0

Please sign in to comment.