diff options
author | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2021-12-05 17:01:33 +0000 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2021-12-12 17:12:47 +0000 |
commit | 92311717b3a37f2c888b30b940510ed6c058bfb0 (patch) | |
tree | b9e09040dca10416208d81f85d12a89c54840629 /drivers/iio | |
parent | 09a74ea737352a80ed6e3fd427350d7d9c5a5502 (diff) | |
download | linux-92311717b3a37f2c888b30b940510ed6c058bfb0.tar.gz linux-92311717b3a37f2c888b30b940510ed6c058bfb0.tar.bz2 linux-92311717b3a37f2c888b30b940510ed6c058bfb0.zip |
iio:pot:mcp41010: Switch to generic firmware properties.
In this case it was only of_device_get_match_data() + header update.
This enables use of other firmware types with no other changes, such
as ACPI via the PRP0001 route.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Chris Coffey <cmc@babblebit.net>
Diffstat (limited to 'drivers/iio')
-rw-r--r-- | drivers/iio/potentiometer/mcp41010.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/iio/potentiometer/mcp41010.c b/drivers/iio/potentiometer/mcp41010.c index 79ccac6d4be0..30a4594d4e11 100644 --- a/drivers/iio/potentiometer/mcp41010.c +++ b/drivers/iio/potentiometer/mcp41010.c @@ -21,9 +21,9 @@ #include <linux/iio/iio.h> #include <linux/iio/types.h> #include <linux/module.h> +#include <linux/mod_devicetable.h> #include <linux/mutex.h> -#include <linux/of.h> -#include <linux/of_device.h> +#include <linux/property.h> #include <linux/spi/spi.h> #define MCP41010_MAX_WIPERS 2 @@ -146,7 +146,7 @@ static int mcp41010_probe(struct spi_device *spi) data = iio_priv(indio_dev); spi_set_drvdata(spi, indio_dev); data->spi = spi; - data->cfg = of_device_get_match_data(&spi->dev); + data->cfg = device_get_match_data(&spi->dev); if (!data->cfg) data->cfg = &mcp41010_cfg[spi_get_device_id(spi)->driver_data]; |