Skip to content
Commit 8957e534 authored by Aidan MacDonald's avatar Aidan MacDonald Committed by Jonathan Cameron
Browse files

iio: adc: axp20x_adc: Minor code cleanups



The code may be clearer if parameters are not re-purposed to hold
temporary results like register values, so introduce local variables
as necessary to avoid that. Regroup macros based on chip type, and
use the FIELD_PREP() macro instead of a hand-rolled version.

Suggested-by: default avatarJonathan Cameron <jic23@kernel.org>
Reviewed-by: default avatarChen-Yu Tsai <wens@csie.org>
Reviewed-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: default avatarAidan MacDonald <aidanmacdonald.0x0@gmail.com>
Link: https://lore.kernel.org/r/20230217153404.32481-1-aidanmacdonald.0x0@gmail.com


Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent e2b39db1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment