mirror of
https://github.com/torvalds/linux.git
synced 2024-11-13 07:31:45 +00:00
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 <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20220413190117.29814-1-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
parent
61c8686cee
commit
d272cfc3f0
@ -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
|
||||
|
@ -10,9 +10,8 @@
|
||||
|
||||
#include <linux/err.h>
|
||||
#include <linux/gcd.h>
|
||||
#include <linux/mod_devicetable.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/property.h>
|
||||
|
||||
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user