diff options
author | Jiri Kosina <jkosina@suse.cz> | 2013-01-29 13:48:30 +0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2013-01-29 13:48:30 +0400 |
commit | 617677295b53a40d0e54aac4cbbc216ffbc755dd (patch) | |
tree | 51b9e87213243ed5efff252c8e8d8fec4eebc588 /drivers/iio/dac/ad5446.c | |
parent | 5c8d1b68e01a144813e38795fe6dbe7ebb506131 (diff) | |
parent | 6abb7c25775b7fb2225ad0508236d63ca710e65f (diff) | |
download | linux-617677295b53a40d0e54aac4cbbc216ffbc755dd.tar.xz |
Merge branch 'master' into for-next
Conflicts:
drivers/devfreq/exynos4_bus.c
Sync with Linus' tree to be able to apply patches that are
against newer code (mvneta).
Diffstat (limited to 'drivers/iio/dac/ad5446.c')
-rw-r--r-- | drivers/iio/dac/ad5446.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/drivers/iio/dac/ad5446.c b/drivers/iio/dac/ad5446.c index 3310cbbd41e7..f5583aedfb59 100644 --- a/drivers/iio/dac/ad5446.c +++ b/drivers/iio/dac/ad5446.c @@ -212,8 +212,8 @@ static const struct iio_info ad5446_info = { .driver_module = THIS_MODULE, }; -static int __devinit ad5446_probe(struct device *dev, const char *name, - const struct ad5446_chip_info *chip_info) +static int ad5446_probe(struct device *dev, const char *name, + const struct ad5446_chip_info *chip_info) { struct ad5446_state *st; struct iio_dev *indio_dev; @@ -226,7 +226,11 @@ static int __devinit ad5446_probe(struct device *dev, const char *name, if (ret) goto error_put_reg; - voltage_uv = regulator_get_voltage(reg); + ret = regulator_get_voltage(reg); + if (ret < 0) + goto error_disable_reg; + + voltage_uv = ret; } indio_dev = iio_device_alloc(sizeof(*st)); @@ -461,7 +465,7 @@ static const struct spi_device_id ad5446_spi_ids[] = { }; MODULE_DEVICE_TABLE(spi, ad5446_spi_ids); -static int __devinit ad5446_spi_probe(struct spi_device *spi) +static int ad5446_spi_probe(struct spi_device *spi) { const struct spi_device_id *id = spi_get_device_id(spi); @@ -469,7 +473,7 @@ static int __devinit ad5446_spi_probe(struct spi_device *spi) &ad5446_spi_chip_info[id->driver_data]); } -static int __devexit ad5446_spi_remove(struct spi_device *spi) +static int ad5446_spi_remove(struct spi_device *spi) { return ad5446_remove(&spi->dev); } @@ -480,7 +484,7 @@ static struct spi_driver ad5446_spi_driver = { .owner = THIS_MODULE, }, .probe = ad5446_spi_probe, - .remove = __devexit_p(ad5446_spi_remove), + .remove = ad5446_spi_remove, .id_table = ad5446_spi_ids, }; @@ -539,14 +543,14 @@ static const struct ad5446_chip_info ad5446_i2c_chip_info[] = { }, }; -static int __devinit ad5446_i2c_probe(struct i2c_client *i2c, - const struct i2c_device_id *id) +static int ad5446_i2c_probe(struct i2c_client *i2c, + const struct i2c_device_id *id) { return ad5446_probe(&i2c->dev, id->name, &ad5446_i2c_chip_info[id->driver_data]); } -static int __devexit ad5446_i2c_remove(struct i2c_client *i2c) +static int ad5446_i2c_remove(struct i2c_client *i2c) { return ad5446_remove(&i2c->dev); } @@ -568,7 +572,7 @@ static struct i2c_driver ad5446_i2c_driver = { .owner = THIS_MODULE, }, .probe = ad5446_i2c_probe, - .remove = __devexit_p(ad5446_i2c_remove), + .remove = ad5446_i2c_remove, .id_table = ad5446_i2c_ids, }; |