devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 1/2] mtd: docg3: add device-tree support
@ 2014-09-25 22:33 Robert Jarzmik
       [not found] ` <1411684396-12094-1-git-send-email-robert.jarzmik-GANU6spQydw@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Robert Jarzmik @ 2014-09-25 22:33 UTC (permalink / raw)
  To: linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
  Cc: Robert Jarzmik, devicetree-u79uwXL29TY76Z2rM5mHXA

Add device-tree support. This is straightforward as docg3 only uses the
standard IOMEM resources.

Signed-off-by: Robert Jarzmik <robert.jarzmik-GANU6spQydw@public.gmane.org>
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
---
 drivers/mtd/devices/docg3.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/mtd/devices/docg3.c b/drivers/mtd/devices/docg3.c
index 91a169c..fc05f81 100644
--- a/drivers/mtd/devices/docg3.c
+++ b/drivers/mtd/devices/docg3.c
@@ -22,6 +22,7 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/errno.h>
+#include <linux/of.h>
 #include <linux/platform_device.h>
 #include <linux/string.h>
 #include <linux/slab.h>
@@ -2126,10 +2127,17 @@ static int __exit docg3_release(struct platform_device *pdev)
 	return 0;
 }
 
+static struct of_device_id docg3_dt_ids[] = {
+	{ .compatible = "sandisk,docg3" },
+	{}
+};
+MODULE_DEVICE_TABLE(of, docg3_dt_ids);
+
 static struct platform_driver g3_driver = {
 	.driver		= {
 		.name	= "docg3",
 		.owner	= THIS_MODULE,
+		.of_match_table = of_match_ptr(docg3_dt_ids),
 	},
 	.suspend	= docg3_suspend,
 	.resume		= docg3_resume,
-- 
2.0.0.rc2

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-09-26 18:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-25 22:33 [PATCH v1 1/2] mtd: docg3: add device-tree support Robert Jarzmik
     [not found] ` <1411684396-12094-1-git-send-email-robert.jarzmik-GANU6spQydw@public.gmane.org>
2014-09-25 22:33   ` [PATCH v1 2/2] mtd: docg3: add device-tree documentation Robert Jarzmik
     [not found]     ` <1411684396-12094-2-git-send-email-robert.jarzmik-GANU6spQydw@public.gmane.org>
2014-09-26 11:05       ` Mark Rutland
2014-09-26 17:19         ` Robert Jarzmik
2014-09-26 17:50           ` Mark Rutland
2014-09-26 18:12             ` Robert Jarzmik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).