From: Jonathan Cameron <jic23@kernel.org>
To: Lars-Peter Clausen <lars@metafoo.de>, linux-iio@vger.kernel.org
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>,
Jonathan Cameron <Jonathan.Cameron@huawei.com>,
Chris Coffey <cmc@babblebit.net>
Subject: [PATCH v3 05/12] iio:pot:mcp41010: Switch to generic firmware properties.
Date: Sun, 5 Dec 2021 17:01:33 +0000 [thread overview]
Message-ID: <20211205170140.2783914-6-jic23@kernel.org> (raw)
In-Reply-To: <20211205170140.2783914-1-jic23@kernel.org>
From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
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>
---
drivers/iio/potentiometer/mcp41010.c | 6 +++---
1 file 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];
--
2.34.1
next prev parent reply other threads:[~2021-12-05 16:56 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-05 17:01 [PATCH v3 00/12] IIO: More of to generic fw conversions Jonathan Cameron
2021-12-05 17:01 ` [PATCH v3 01/12] iio:dac:ad5755: Switch to generic firmware properties and drop pdata Jonathan Cameron
2021-12-05 20:09 ` Andy Shevchenko
2021-12-06 13:22 ` Jonathan Cameron
2021-12-05 17:01 ` [PATCH v3 02/12] iio:dac:ad5758: Drop unused of specific headers Jonathan Cameron
2021-12-05 17:01 ` [PATCH v3 03/12] iio:dac:dpot-dac: Swap of.h for mod_devicetable.h Jonathan Cameron
2021-12-05 17:01 ` [PATCH v3 04/12] iio:dac:lpc18xx_dac: Swap from of* to mod_devicetable.h Jonathan Cameron
2021-12-05 17:01 ` Jonathan Cameron [this message]
2021-12-05 17:01 ` [PATCH v3 06/12] iio:light:cm3605: Switch to generic firmware properties Jonathan Cameron
2021-12-05 17:01 ` [PATCH v3 07/12] iio:adc:max9611: " Jonathan Cameron
2021-12-05 17:01 ` [PATCH v3 08/12] iio:adc:mcp3911: " Jonathan Cameron
2021-12-07 19:31 ` Marcus Folkesson
2021-12-05 17:01 ` [PATCH v3 09/12] iio:adc:ti-adc12138: Switch to generic firmware properties and drop of_match_ptr Jonathan Cameron
2021-12-05 17:01 ` [PATCH v3 10/12] iio:adc:envelope-detector: Switch from of headers to mod_devicetable.h Jonathan Cameron
2021-12-05 17:01 ` [PATCH v3 11/12] iio:adc:ti-ads124s08: Drop dependency on OF Jonathan Cameron
2021-12-05 17:01 ` [PATCH v3 12/12] iio:adc/dac:Kconfig: Update to drop OF dependencies Jonathan Cameron
2021-12-12 16:19 ` [PATCH v3 00/12] IIO: More of to generic fw conversions Jonathan Cameron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211205170140.2783914-6-jic23@kernel.org \
--to=jic23@kernel.org \
--cc=Jonathan.Cameron@huawei.com \
--cc=andy.shevchenko@gmail.com \
--cc=cmc@babblebit.net \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox