[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1381091235-18293-5-git-send-email-sre@debian.org>
Date: Sun, 6 Oct 2013 22:27:12 +0200
From: Sebastian Reichel <sre@...ian.org>
To: Sebastian Reichel <sre@...g0.de>,
Linus Walleij <linus.walleij@...aro.org>,
Shubhrajyoti Datta <omaplinuxkernel@...il.com>,
Carlos Chinea <cch.devel@...il.com>,
Paul Walmsley <paul@...an.com>
Cc: Kevin Hilman <khilman@...prootsystems.com>,
Tony Lindgren <tony@...mide.com>,
Russell King <linux@....linux.org.uk>,
Grant Likely <grant.likely@...aro.org>,
Rob Herring <rob.herring@...xeda.com>,
Pawel Moll <pawel.moll@....com>,
Mark Rutland <mark.rutland@....com>,
Stephen Warren <swarren@...dotorg.org>,
Ian Campbell <ijc+devicetree@...lion.org.uk>,
Rob Landley <rob@...dley.net>,
'Benoît Cousson' <bcousson@...libre.com>,
devicetree@...r.kernel.org, linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-omap@...r.kernel.org,
'Pali Rohár' <pali.rohar@...il.com>,
'Ивайло Димитров'
<freemangordon@....bg>,
Joni Lapilainen <joni.lapilainen@...il.com>,
Sebastian Reichel <sre@...ian.org>
Subject: [RFCv3 4/7] HSI: hsi-char: add Device Tree support
Add of_match_table to hsi_char driver, so that it can
be referenced from Device Tree.
Signed-off-by: Sebastian Reichel <sre@...ian.org>
---
drivers/hsi/clients/hsi_char.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/drivers/hsi/clients/hsi_char.c b/drivers/hsi/clients/hsi_char.c
index e61e5f9..e3302ed 100644
--- a/drivers/hsi/clients/hsi_char.c
+++ b/drivers/hsi/clients/hsi_char.c
@@ -42,6 +42,7 @@
#include <linux/stat.h>
#include <linux/hsi/hsi.h>
#include <linux/hsi/hsi_char.h>
+#include <linux/of_device.h>
#define HSC_DEVS 16 /* Num of channels */
#define HSC_MSGS 4
@@ -758,12 +759,24 @@ static int hsc_remove(struct device *dev)
return 0;
}
+#ifdef CONFIG_OF
+static const struct of_device_id hsi_char_of_match[] = {
+ { .compatible = "ssi-char", },
+ { .compatible = "hsi-char", },
+ {},
+};
+MODULE_DEVICE_TABLE(of, hsi_char_of_match);
+#else
+#define hsi_char_of_match NULL
+#endif
+
static struct hsi_client_driver hsc_driver = {
.driver = {
.name = "hsi_char",
.owner = THIS_MODULE,
.probe = hsc_probe,
.remove = hsc_remove,
+ .of_match_table = hsi_char_of_match,
},
};
--
1.8.4.rc3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists