lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 25 Jan 2018 13:04:36 +0530
From:   Akash Gajjar <gajjar04akash@...il.com>
To:     unlisted-recipients:; (no To-header on input)
Cc:     gajjar04akash@...il.com, Akash Gajjar <Akash_Gajjar@...tor.com>,
        Laurent Pinchart <laurent.pinchart@...asonboard.com>,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        linux-media@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] media: leds: as3645a: Add CONFIG_OF support

From: Akash Gajjar <Akash_Gajjar@...tor.com>

Witth this changes, the driver builds with CONFIG_OF support

Signed-off-by: Akash Gajjar <gajjar04akash@...il.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ