From: Andy Shevchenko Date: Wed, 13 Apr 2022 19:01:17 +0000 (+0300) Subject: iio: afe: rescale: Make use of device properties X-Git-Tag: v6.6.17~7345^2~81^2~34 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d272cfc3f0c480eac076d8ff394626e84b8c8169;p=platform%2Fkernel%2Flinux-rpi.git iio: afe: rescale: Make use of device properties Convert the module to be property provider agnostic and allow it to be used on non-OF platforms. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220413190117.29814-1-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/afe/Kconfig b/drivers/iio/afe/Kconfig index 4fa3978..9a1d95c 100644 --- a/drivers/iio/afe/Kconfig +++ b/drivers/iio/afe/Kconfig @@ -8,7 +8,6 @@ menu "Analog Front Ends" config IIO_RESCALE tristate "IIO rescale" - depends on OF || COMPILE_TEST help Say yes here to build support for the IIO rescaling that handles voltage dividers, current sense shunts and diff --git a/drivers/iio/afe/iio-rescale.c b/drivers/iio/afe/iio-rescale.c index 7e51129..c6cf709 100644 --- a/drivers/iio/afe/iio-rescale.c +++ b/drivers/iio/afe/iio-rescale.c @@ -10,9 +10,8 @@ #include #include +#include #include -#include -#include #include #include @@ -536,7 +535,7 @@ static int rescale_probe(struct platform_device *pdev) rescale = iio_priv(indio_dev); - rescale->cfg = of_device_get_match_data(dev); + rescale->cfg = device_get_match_data(dev); rescale->numerator = 1; rescale->denominator = 1; rescale->offset = 0;