From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: linux-iio <linux-iio@vger.kernel.org>,
Jonathan Cameron <Jonathan.Cameron@huawei.com>,
Jan Kiszka <jan.kiszka@siemens.com>
Subject: Re: [PATCH v2 3/5] iio:adc:ti-adc108s102: Drop CONFIG_OF and of_match_ptr protections
Date: Tue, 21 Jul 2020 21:31:36 +0300 [thread overview]
Message-ID: <CAHp75VcTQP=rX5Rg8LgUozi-xS4mSqisYawA1PHHL4BCZEhH5A@mail.gmail.com> (raw)
In-Reply-To: <20200721171444.825099-4-jic23@kernel.org>
On Tue, Jul 21, 2020 at 8:16 PM Jonathan Cameron <jic23@kernel.org> wrote:
>
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
>
> I'm trying to clean this (now) anti-pattern out of IIO to avoid
> cut and paste into new drivers.
>
> Also add an include of mod_devicetable.h as the driver directly uses
> struct of_device_id which is defined in there.
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Cc: Jan Kiszka <jan.kiszka@siemens.com>
> ---
>
> v1->v2
> * Drop reference to PRP0001 etc in this one as it has valid ACPI
> IDs.
>
> drivers/iio/adc/ti-adc108s102.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/iio/adc/ti-adc108s102.c b/drivers/iio/adc/ti-adc108s102.c
> index 9b9b27415c93..183b2245e89b 100644
> --- a/drivers/iio/adc/ti-adc108s102.c
> +++ b/drivers/iio/adc/ti-adc108s102.c
> @@ -20,6 +20,7 @@
> #include <linux/iio/trigger_consumer.h>
> #include <linux/interrupt.h>
> #include <linux/module.h>
> +#include <linux/mod_devicetable.h>
> #include <linux/property.h>
> #include <linux/regulator/consumer.h>
> #include <linux/spi/spi.h>
> @@ -299,13 +300,11 @@ static int adc108s102_remove(struct spi_device *spi)
> return 0;
> }
>
> -#ifdef CONFIG_OF
> static const struct of_device_id adc108s102_of_match[] = {
> { .compatible = "ti,adc108s102" },
> { }
> };
> MODULE_DEVICE_TABLE(of, adc108s102_of_match);
> -#endif
>
> #ifdef CONFIG_ACPI
> static const struct acpi_device_id adc108s102_acpi_ids[] = {
> @@ -324,7 +323,7 @@ MODULE_DEVICE_TABLE(spi, adc108s102_id);
> static struct spi_driver adc108s102_driver = {
> .driver = {
> .name = "adc108s102",
> - .of_match_table = of_match_ptr(adc108s102_of_match),
> + .of_match_table = adc108s102_of_match,
> .acpi_match_table = ACPI_PTR(adc108s102_acpi_ids),
> },
> .probe = adc108s102_probe,
> --
> 2.27.0
>
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2020-07-21 18:31 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-21 17:14 [PATCH v2 0/5] iio:adc more of_match_ptr and similar removal Jonathan Cameron
2020-07-21 17:14 ` [PATCH v2 1/5] iio:adc:axp20x: Convert from OF to generic fw / device properties Jonathan Cameron
2020-07-21 18:29 ` Andy Shevchenko
2020-07-21 17:14 ` [PATCH v2 2/5] iio:adc:ti-adc081c: Drop ACPI ids that seem very unlikely to be official Jonathan Cameron
2020-07-21 18:30 ` Andy Shevchenko
2020-08-09 14:09 ` Jonathan Cameron
2021-09-02 9:23 ` Jonathan Cameron
2021-09-02 10:03 ` Andy Shevchenko
2020-07-21 17:14 ` [PATCH v2 3/5] iio:adc:ti-adc108s102: Drop CONFIG_OF and of_match_ptr protections Jonathan Cameron
2020-07-21 18:31 ` Andy Shevchenko [this message]
2020-08-09 14:08 ` Jonathan Cameron
2020-07-21 17:14 ` [PATCH v2 4/5] iio:adc:ti-adc128s052: drop of_match_ptr protection Jonathan Cameron
2020-07-21 18:32 ` Andy Shevchenko
2020-08-09 14:07 ` Jonathan Cameron
2020-07-21 17:14 ` [PATCH v2 5/5] iio:adc:bcm_iproc: Drop of_match_ptr protection and switch to mod_devicetable.h Jonathan Cameron
2020-07-21 18:34 ` Andy Shevchenko
2020-08-09 14:05 ` 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='CAHp75VcTQP=rX5Rg8LgUozi-xS4mSqisYawA1PHHL4BCZEhH5A@mail.gmail.com' \
--to=andy.shevchenko@gmail.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=jan.kiszka@siemens.com \
--cc=jic23@kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).