diff options
Diffstat (limited to 'drivers/iio/dac')
-rw-r--r-- | drivers/iio/dac/ad5421.c | 8 | ||||
-rw-r--r-- | drivers/iio/dac/ad5755.c | 8 | ||||
-rw-r--r-- | drivers/iio/dac/max517.c | 9 | ||||
-rw-r--r-- | drivers/iio/dac/mcp4725.c | 8 |
4 files changed, 4 insertions, 29 deletions
diff --git a/drivers/iio/dac/ad5421.c b/drivers/iio/dac/ad5421.c index c44afeb06f56..3eeaa82075f7 100644 --- a/drivers/iio/dac/ad5421.c +++ b/drivers/iio/dac/ad5421.c @@ -514,13 +514,7 @@ static int ad5421_probe(struct spi_device *spi) return ret; } - ret = iio_device_register(indio_dev); - if (ret) { - dev_err(&spi->dev, "Failed to register iio device: %d\n", ret); - return ret; - } - - return 0; + return iio_device_register(indio_dev); } static int ad5421_remove(struct spi_device *spi) diff --git a/drivers/iio/dac/ad5755.c b/drivers/iio/dac/ad5755.c index bd31dbc340c1..9a78d5abb2f6 100644 --- a/drivers/iio/dac/ad5755.c +++ b/drivers/iio/dac/ad5755.c @@ -589,13 +589,7 @@ static int ad5755_probe(struct spi_device *spi) if (ret) return ret; - ret = iio_device_register(indio_dev); - if (ret) { - dev_err(&spi->dev, "Failed to register iio device: %d\n", ret); - return ret; - } - - return 0; + return iio_device_register(indio_dev); } static int ad5755_remove(struct spi_device *spi) diff --git a/drivers/iio/dac/max517.c b/drivers/iio/dac/max517.c index d26be14fff64..6e1903537950 100644 --- a/drivers/iio/dac/max517.c +++ b/drivers/iio/dac/max517.c @@ -160,7 +160,6 @@ static int max517_probe(struct i2c_client *client, struct max517_data *data; struct iio_dev *indio_dev; struct max517_platform_data *platform_data = client->dev.platform_data; - int err; indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*data)); if (!indio_dev) @@ -192,13 +191,7 @@ static int max517_probe(struct i2c_client *client, data->vref_mv[1] = platform_data->vref_mv[1]; } - err = iio_device_register(indio_dev); - if (err) - return err; - - dev_info(&client->dev, "DAC registered\n"); - - return 0; + return iio_device_register(indio_dev); } static int max517_remove(struct i2c_client *client) diff --git a/drivers/iio/dac/mcp4725.c b/drivers/iio/dac/mcp4725.c index d982752dd9c4..9f57ae84ab89 100644 --- a/drivers/iio/dac/mcp4725.c +++ b/drivers/iio/dac/mcp4725.c @@ -320,13 +320,7 @@ static int mcp4725_probe(struct i2c_client *client, data->powerdown_mode = pd ? pd-1 : 2; /* 500kohm_to_gnd */ data->dac_value = (inbuf[1] << 4) | (inbuf[2] >> 4); - err = iio_device_register(indio_dev); - if (err) - return err; - - dev_info(&client->dev, "MCP4725 DAC registered\n"); - - return 0; + return iio_device_register(indio_dev); } static int mcp4725_remove(struct i2c_client *client) |