staging: iio: ad7150: use FIELD_GET and GENMASK

Use the bitfield macro FIELD_GET, and GENMASK to do the shift and mask in
one go. This makes the code more readable than explicit masking followed
by a shift.

Signed-off-by: Melissa Wen <melissa.srw@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
Melissa Wen 2019-06-14 13:32:21 -03:00 • committed by Jonathan Cameron
commit 34b94f9383