Commit 366995df authored by Colin Ian King's avatar Colin Ian King Committed by Jonathan Cameron

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: default avatarColin Ian King <colin.king@canonical.com>
Reviewed-by: default avatarSean Nyekjaer <sean.nyekjaer@prevas.dk>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 6b0b3e37
...@@ -97,9 +97,6 @@ static int dac5571_cmd_quad(struct dac5571_data *data, int channel, u16 val) ...@@ -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) 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[1] = 0;
data->buf[0] = pwrdwn << DAC5571_SINGLE_PWRDWN_BITS; 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 ...@@ -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) 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[2] = 0;
data->buf[1] = pwrdwn << DAC5571_QUAD_PWRDWN_BITS; data->buf[1] = pwrdwn << DAC5571_QUAD_PWRDWN_BITS;
data->buf[0] = (channel << DAC5571_CHANNEL_SELECT) | data->buf[0] = (channel << DAC5571_CHANNEL_SELECT) |
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment