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  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:   Sat, 18 May 2019 19:47:20 -0300
From:   João Victor Marques de Oliveira 
        <joao.marques.oliveira@....br>
To:     Lars-Peter Clausen <lars@...afoo.de>,
        Michael Hennerich <Michael.Hennerich@...log.com>,
        Stefan Popa <stefan.popa@...log.com>,
        Jonathan Cameron <jic23@...nel.org>,
        Hartmut Knaack <knaack.h@....de>,
        Peter Meerwald-Stadler <pmeerw@...erw.net>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     linux-iio@...r.kernel.org, devel@...verdev.osuosl.org,
        linux-kernel@...r.kernel.org, kernel-usp@...glegroups.com,
        "Thiago L . A . Miller" <tmiller@...hsl.org.br>,
        "Osvaldo M . Yasuda" <omyasuda@...oo.com.br>
Subject: [PATCH] staging: iio: ad9834: add of_device_id table

Add a of_device_id struct array of_match_table variable and subsequent
call to MODULE_DEVICE_TABLE macro to device tree support.

Co-developed-by: Thiago L. A. Miller <tmiller@...hsl.org.br>
Signed-off-by: Thiago L. A. Miller <tmiller@...hsl.org.br>
Co-developed-by: Osvaldo M. Yasuda <omyasuda@...oo.com.br>
Signed-off-by: Osvaldo M. Yasuda <omyasuda@...oo.com.br>
Signed-off-by: João Victor Marques de Oliveira <joao.marques.oliveira@....br>
---
 drivers/staging/iio/frequency/ad9834.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/staging/iio/frequency/ad9834.c b/drivers/staging/iio/frequency/ad9834.c
index 6de3cd7363d7..038d6732c3fd 100644
--- a/drivers/staging/iio/frequency/ad9834.c
+++ b/drivers/staging/iio/frequency/ad9834.c
@@ -521,9 +521,20 @@ static const struct spi_device_id ad9834_id[] = {
 };
 MODULE_DEVICE_TABLE(spi, ad9834_id);
 
+static const struct of_device_id ad9834_of_match[] = {
+	{.compatible = "adi,ad9833"},
+	{.compatible = "adi,ad9834"},
+	{.compatible = "adi,ad9837"},
+	{.compatible = "adi,ad9838"},
+	{}
+};
+
+MODULE_DEVICE_TABLE(of, ad9834_of_match);
+
 static struct spi_driver ad9834_driver = {
 	.driver = {
 		.name	= "ad9834",
+		.of_match_table = ad9834_of_match
 	},
 	.probe		= ad9834_probe,
 	.remove		= ad9834_remove,
-- 
2.21.0

Powered by blists - more mailing lists