Linux IIO development
 help / color / mirror / Atom feed
* [PATCH] iio: adc: ad7173: Fix ! vs ~ typo in ad7173_sel_clk()
@ 2024-04-04  7:31 Dan Carpenter
  2024-04-04  9:03 ` Nuno Sá
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2024-04-04  7:31 UTC (permalink / raw)
  To: Dumitru Ceclan
  Cc: Lars-Peter Clausen, Michael Hennerich, Jonathan Cameron,
	Michael Walle, Andy Shevchenko, Nuno Sa, linux-iio, linux-kernel,
	kernel-janitors

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

Fixes: 76a1e6a42802 ("iio: adc: ad7173: add AD7173 driver")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
 drivers/iio/adc/ad7173.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/adc/ad7173.c b/drivers/iio/adc/ad7173.c
index 4ff6ce46b02c..b1d6ea17ced3 100644
--- a/drivers/iio/adc/ad7173.c
+++ b/drivers/iio/adc/ad7173.c
@@ -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);
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-04-06 15:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-04  7:31 [PATCH] iio: adc: ad7173: Fix ! vs ~ typo in ad7173_sel_clk() Dan Carpenter
2024-04-04  9:03 ` Nuno Sá
2024-04-06 15:44   ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox