Commit 107585b0 authored by Dan Carpenter's avatar Dan Carpenter Committed by Jonathan Cameron

iio: adc: ad7173: Fix ! vs ~ typo in ad7173_sel_clk()

This was obviously supposed to be a bitwise negate instead of logical.

Fixes: 76a1e6a4 ("iio: adc: ad7173: add AD7173 driver")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: default avatarNuno Sa <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/5401c681-c4aa-4fab-8c8c-8f0a379e2687@moroto.mountainSigned-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent c8e2d487
......@@ -835,7 +835,7 @@ static unsigned long ad7173_sel_clk(struct ad7173_state *st,
{
int ret;
st->adc_mode &= !AD7173_ADC_MODE_CLOCKSEL_MASK;
st->adc_mode &= ~AD7173_ADC_MODE_CLOCKSEL_MASK;
st->adc_mode |= FIELD_PREP(AD7173_ADC_MODE_CLOCKSEL_MASK, clk_sel);
ret = ad_sd_write_reg(&st->sd, AD7173_REG_ADC_MODE, 0x2, st->adc_mode);
......
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