summaryrefslogtreecommitdiffstats
path: root/drivers/iio/dac
diff options
context:
space:
mode:
authorYueHaibing <yuehaibing@huawei.com>2019-04-26 18:40:06 +0200
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2019-04-27 15:15:39 +0200
commite99c25f4320d1a8329c12c66680a974725ff16a0 (patch)
tree71dc26116747c1f154d660988013b8899e372efa /drivers/iio/dac
parentiio: cros_ec: add 'id' sysfs entry (diff)
downloadlinux-e99c25f4320d1a8329c12c66680a974725ff16a0.tar.xz
linux-e99c25f4320d1a8329c12c66680a974725ff16a0.zip
iio: dac: ad5758: remove set but not used variable 'dc_dc_mode'
Fixes gcc '-Wunused-but-set-variable' warning: drivers/iio/dac/ad5758.c: In function ad5758_write_powerdown: drivers/iio/dac/ad5758.c:585:15: warning: variable dc_dc_mode set but not used [-Wunused-but-set-variable] It is not used any more since commit edde945257e2 ("iio: dac: ad5758: Modifications for new revision") Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/dac')
-rw-r--r--drivers/iio/dac/ad5758.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/iio/dac/ad5758.c b/drivers/iio/dac/ad5758.c
index 7d116487475f..475646c82b40 100644
--- a/drivers/iio/dac/ad5758.c
+++ b/drivers/iio/dac/ad5758.c
@@ -584,7 +584,7 @@ static ssize_t ad5758_write_powerdown(struct iio_dev *indio_dev,
{
struct ad5758_state *st = iio_priv(indio_dev);
bool pwr_down;
- unsigned int dc_dc_mode, dac_config_mode, val;
+ unsigned int dac_config_mode, val;
unsigned long int dac_config_msk;
int ret;
@@ -593,13 +593,10 @@ static ssize_t ad5758_write_powerdown(struct iio_dev *indio_dev,
return ret;
mutex_lock(&st->lock);
- if (pwr_down) {
- dc_dc_mode = AD5758_DCDC_MODE_POWER_OFF;
+ if (pwr_down)
val = 0;
- } else {
- dc_dc_mode = st->dc_dc_mode;
+ else
val = 1;
- }
dac_config_mode = AD5758_DAC_CONFIG_OUT_EN_MODE(val) |
AD5758_DAC_CONFIG_INT_EN_MODE(val);