]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
iio: adc: mcp3422: write bit operations using bitfield.h APIs
authorMarcelo Machado Lage <marcelomlage@usp.br>
Wed, 29 Apr 2026 22:44:01 +0000 (19:44 -0300)
committerJonathan Cameron <jic23@kernel.org>
Sun, 31 May 2026 09:59:35 +0000 (10:59 +0100)
commit484f68c753373d5f5c02a6014bdc8aa28fb820a3
tree36798c6f3ef003009f21c373b97ac029a2cf8f6a
parent0c794147f2450a7948f22820698607b4e1b7c49e
iio: adc: mcp3422: write bit operations using bitfield.h APIs

Replace manual bit manipulations with FIELD_GET(), FIELD_PREP() and
FIELD_MODIFY() calls. The resulting code is more readable and
maintainable, and 6 macros previously defined in the header are not
needed anymore.

Signed-off-by: Marcelo Machado Lage <marcelomlage@usp.br>
Co-developed-by: Vinicius Lira <vinilira@usp.br>
Signed-off-by: Vinicius Lira <vinilira@usp.br>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/adc/mcp3422.c