diff options
author | Colin Ian King <colin.king@canonical.com> | 2018-07-02 11:24:35 +0100 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2018-07-07 17:43:37 +0100 |
commit | 366995df8b9ed7743386813412dcfa991c170d28 (patch) | |
tree | 169ad8257b9ea194a7ea5220de23b8134144ac7c | |
parent | 6b0b3e378e16f75338665fa519c2a06e4a071889 (diff) | |
download | linux-366995df8b9ed7743386813412dcfa991c170d28.tar.gz linux-366995df8b9ed7743386813412dcfa991c170d28.tar.bz2 linux-366995df8b9ed7743386813412dcfa991c170d28.zip |
iio: dac: ti-dac5571 remove redundant variable 'shift'
Variable shift is being assigned but is never used hence it is
redundant and can be removed.
Cleans up two clang warnings:
warning: variable ‘shift’ set but not used [-Wunused-but-set-variable]
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Sean Nyekjaer <sean.nyekjaer@prevas.dk>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-rw-r--r-- | drivers/iio/dac/ti-dac5571.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/iio/dac/ti-dac5571.c b/drivers/iio/dac/ti-dac5571.c index dd21eebed6a8..e39d1e901353 100644 --- a/drivers/iio/dac/ti-dac5571.c +++ b/drivers/iio/dac/ti-dac5571.c @@ -97,9 +97,6 @@ static int dac5571_cmd_quad(struct dac5571_data *data, int channel, u16 val) static int dac5571_pwrdwn_single(struct dac5571_data *data, int channel, u8 pwrdwn) { - unsigned int shift; - - shift = 12 - data->spec->resolution; data->buf[1] = 0; data->buf[0] = pwrdwn << DAC5571_SINGLE_PWRDWN_BITS; @@ -111,9 +108,6 @@ static int dac5571_pwrdwn_single(struct dac5571_data *data, int channel, u8 pwrd static int dac5571_pwrdwn_quad(struct dac5571_data *data, int channel, u8 pwrdwn) { - unsigned int shift; - - shift = 16 - data->spec->resolution; data->buf[2] = 0; data->buf[1] = pwrdwn << DAC5571_QUAD_PWRDWN_BITS; data->buf[0] = (channel << DAC5571_CHANNEL_SELECT) | |