]> git.ipfire.org Git - thirdparty/linux.git/commit
iio: adc: meson-saradc: simplify access to meson_sar_adc_param
authorMartin Blumenstingl <martin.blumenstingl@googlemail.com>
Sat, 22 Sep 2018 22:21:02 +0000 (00:21 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 29 Sep 2018 11:26:08 +0000 (12:26 +0100)
commit057e5a1109faa01091a989c224833e2df6003b2e
tree590886af705035766c46d7ba9e924417620ad4b5
parent234c64a290cb6ec79a2b1ac289a1713dc9f7890e
iio: adc: meson-saradc: simplify access to meson_sar_adc_param

Commit 053ffe3c8cfe31 ("iio: adc: meson-saradc: squash and share the
common adc platform data") put all the data which is needed at runtime
from struct meson_sar_adc_data to a new struct meson_sar_adc_param so
we can re-use the platform specific configuration without having to
duplicate everything just to change the name.

The only place where struct meson_sar_adc_data is now needed is the
_probe function which has to pass the name to the iio_dev. All other
functions only need access to struct meson_sar_adc_param. This means we
can simplify struct meson_sar_adc_priv.

The goal of this patch is to make the code a bit easier to read since
this removes one level of nesting. No functional changes intended.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/meson_saradc.c