iio: magnetometer: bmc150: use FIELD_PREP and FIELD_GET helpers

Replace open-coded bitfield operations with FIELD_PREP() and
FIELD_GET() helpers where appropriate.

Also simplify bmc150_magn_set_odr() by returning directly from
the matching table entry.

Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
This commit is contained in:
Hungyu Lin 2026-06-10 13:58:31 +00:00 • committed by Jonathan Cameron
commit 2766d92b05