OSDN Git Service

staging: iio: ad7150: use FIELD_GET and GENMASK
authorMelissa Wen <melissa.srw@gmail.com>
Fri, 14 Jun 2019 16:32:21 +0000 (13:32 -0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 17 Jun 2019 20:06:48 +0000 (21:06 +0100)
commit34b94f9383138acc892f460bfcb9a35581e048fd
tree1dfe8b71455b51036fb06dc1201eabaad9ae21fe
parent362cd500a2daaa8ec4ab8bb65ca96acf87087f39
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>
drivers/staging/iio/cdc/ad7150.c