All of lore.kernel.org
 help / color / mirror / Atom feed
From: Akash Gajjar <gajjar04akash@gmail.com>
To: unlisted-recipients:; (no To-header on input)
Cc: gajjar04akash@gmail.com, Akash Gajjar <Akash_Gajjar@mentor.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] media: leds: as3645a: Add CONFIG_OF support
Date: Thu, 25 Jan 2018 13:04:36 +0530	[thread overview]
Message-ID: <1516865677-16006-1-git-send-email-gajjar04akash@gmail.com> (raw)

From: Akash Gajjar <Akash_Gajjar@mentor.com>

Witth this changes, the driver builds with CONFIG_OF support

Signed-off-by: Akash Gajjar <gajjar04akash@gmail.com>
---
 drivers/media/i2c/as3645a.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/media/i2c/as3645a.c b/drivers/media/i2c/as3645a.c
index af5db71..24233fa 100644
--- a/drivers/media/i2c/as3645a.c
+++ b/drivers/media/i2c/as3645a.c
@@ -858,6 +858,14 @@ static int as3645a_remove(struct i2c_client *client)
 };
 MODULE_DEVICE_TABLE(i2c, as3645a_id_table);
 
+#if IS_ENABLED(CONFIG_OF)
+static const struct of_device_id as3645a_of_match[] = {
+	{ .compatible = "ams,as3645a", },
+	{ /* sentinel */ },
+};
+MODULE_DEVICE_TABLE(of, as3645a_of_match);
+#endif
+
 static const struct dev_pm_ops as3645a_pm_ops = {
 	.suspend = as3645a_suspend,
 	.resume = as3645a_resume,
@@ -867,6 +875,7 @@ static int as3645a_remove(struct i2c_client *client)
 	.driver	= {
 		.name = AS3645A_NAME,
 		.pm   = &as3645a_pm_ops,
+		.of_match_table = of_match_ptr(as3645a_of_match),
 	},
 	.probe	= as3645a_probe,
 	.remove	= as3645a_remove,
-- 
1.9.1

WARNING: multiple messages have this Message-ID (diff)
From: Akash Gajjar <gajjar04akash@gmail.com>
To: unlisted-recipients:; (no To-header on input)@bombadil.infradead.org
Cc: gajjar04akash@gmail.com, Akash Gajjar <Akash_Gajjar@mentor.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] media: leds: as3645a: Add CONFIG_OF support
Date: Thu, 25 Jan 2018 13:04:36 +0530	[thread overview]
Message-ID: <1516865677-16006-1-git-send-email-gajjar04akash@gmail.com> (raw)

From: Akash Gajjar <Akash_Gajjar@mentor.com>

Witth this changes, the driver builds with CONFIG_OF support

Signed-off-by: Akash Gajjar <gajjar04akash@gmail.com>
---
 drivers/media/i2c/as3645a.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/media/i2c/as3645a.c b/drivers/media/i2c/as3645a.c
index af5db71..24233fa 100644
--- a/drivers/media/i2c/as3645a.c
+++ b/drivers/media/i2c/as3645a.c
@@ -858,6 +858,14 @@ static int as3645a_remove(struct i2c_client *client)
 };
 MODULE_DEVICE_TABLE(i2c, as3645a_id_table);
 
+#if IS_ENABLED(CONFIG_OF)
+static const struct of_device_id as3645a_of_match[] = {
+	{ .compatible = "ams,as3645a", },
+	{ /* sentinel */ },
+};
+MODULE_DEVICE_TABLE(of, as3645a_of_match);
+#endif
+
 static const struct dev_pm_ops as3645a_pm_ops = {
 	.suspend = as3645a_suspend,
 	.resume = as3645a_resume,
@@ -867,6 +875,7 @@ static int as3645a_remove(struct i2c_client *client)
 	.driver	= {
 		.name = AS3645A_NAME,
 		.pm   = &as3645a_pm_ops,
+		.of_match_table = of_match_ptr(as3645a_of_match),
 	},
 	.probe	= as3645a_probe,
 	.remove	= as3645a_remove,
-- 
1.9.1

             reply	other threads:[~2018-01-25  7:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-25  7:34 Akash Gajjar [this message]
2018-01-25  7:34 ` [PATCH] media: leds: as3645a: Add CONFIG_OF support Akash Gajjar
2018-01-25  8:41 ` Laurent Pinchart
2018-01-25 10:52 ` Sakari Ailus

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=1516865677-16006-1-git-send-email-gajjar04akash@gmail.com \
    --to=gajjar04akash@gmail.com \
    --cc=Akash_Gajjar@mentor.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@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.