All of lore.kernel.org
 help / color / mirror / Atom feed
From: jic23@kernel.org
To: linux-iio@vger.kernel.org
Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Subject: [PATCH 4/7] iio: light: gp2ap020a00f: Swap of.h for mod_devicetable.h + drop of_match_ptr
Date: Sun, 19 Apr 2020 16:02:03 +0100	[thread overview]
Message-ID: <20200419150206.43033-5-jic23@kernel.org> (raw)
In-Reply-To: <20200419150206.43033-1-jic23@kernel.org>

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

Also drops ifdef protections for CONFIG_OF.

Enables probing via ACPI PRP0001 and removes an example that might be
cut and paste into new drivers.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
---
 drivers/iio/light/gp2ap020a00f.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/iio/light/gp2ap020a00f.c b/drivers/iio/light/gp2ap020a00f.c
index 7fbbce0d4bc7..070d4cd0cf54 100644
--- a/drivers/iio/light/gp2ap020a00f.c
+++ b/drivers/iio/light/gp2ap020a00f.c
@@ -38,8 +38,8 @@
 #include <linux/irq.h>
 #include <linux/irq_work.h>
 #include <linux/module.h>
+#include <linux/mod_devicetable.h>
 #include <linux/mutex.h>
-#include <linux/of.h>
 #include <linux/regmap.h>
 #include <linux/regulator/consumer.h>
 #include <linux/slab.h>
@@ -1617,18 +1617,16 @@ static const struct i2c_device_id gp2ap020a00f_id[] = {
 
 MODULE_DEVICE_TABLE(i2c, gp2ap020a00f_id);
 
-#ifdef CONFIG_OF
 static const struct of_device_id gp2ap020a00f_of_match[] = {
 	{ .compatible = "sharp,gp2ap020a00f" },
 	{ }
 };
 MODULE_DEVICE_TABLE(of, gp2ap020a00f_of_match);
-#endif
 
 static struct i2c_driver gp2ap020a00f_driver = {
 	.driver = {
 		.name	= GP2A_I2C_NAME,
-		.of_match_table = of_match_ptr(gp2ap020a00f_of_match),
+		.of_match_table = gp2ap020a00f_of_match,
 	},
 	.probe		= gp2ap020a00f_probe,
 	.remove		= gp2ap020a00f_remove,
-- 
2.26.1


  parent reply	other threads:[~2020-04-19 15:04 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-19 15:01 [PATCH 0/7] iio: light: clean out of_match_ptr and tidy headers jic23
2020-04-19 15:02 ` [PATCH 1/7] iio: light: bh1780: use mod_devicetable.h and drop of_match_ptr macro jic23
2020-04-20  6:05   ` Ardelean, Alexandru
2020-04-19 15:02 ` [PATCH 2/7] iio: light: cm32181: Add mod_devicetable.h and remove of_match_ptr jic23
2020-04-20  6:05   ` Ardelean, Alexandru
2020-04-19 15:02 ` [PATCH 3/7] iio: light: cm3232: Add mod_devicetable.h include and drop of_match_ptr jic23
2020-04-20  6:05   ` Ardelean, Alexandru
2020-04-19 15:02 ` jic23 [this message]
2020-04-20  6:06   ` [PATCH 4/7] iio: light: gp2ap020a00f: Swap of.h for mod_devicetable.h + " Ardelean, Alexandru
2020-04-19 15:02 ` [PATCH 5/7] iio: light: opt3001: Add mod_devicetable.h and drop use of of_match_ptr jic23
2020-04-20  6:06   ` Ardelean, Alexandru
2020-04-19 15:02 ` [PATCH 6/7] iio: light: st_uvis25: Add mod_devicetable.h and drop of_match_ptr jic23
2020-04-20  6:08   ` Ardelean, Alexandru
2020-04-19 15:02 ` [PATCH 7/7] iio: light: vl6180: swap of.h for " jic23
2020-04-20  6:19   ` Ardelean, Alexandru
2020-04-20 15:45     ` Jonathan Cameron
2020-04-21  6:58       ` Ardelean, Alexandru
2020-04-20  6:04 ` [PATCH 0/7] iio: light: clean out of_match_ptr and tidy headers Ardelean, Alexandru
2020-04-20  6:22   ` Ardelean, Alexandru
2020-04-20 15:48     ` Jonathan Cameron
2020-04-21  0:50       ` Andy Shevchenko
2020-04-25 14:49         ` 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=20200419150206.43033-5-jic23@kernel.org \
    --to=jic23@kernel.org \
    --cc=Jonathan.Cameron@huawei.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.