mtd: docg3: add device-tree support

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Mon Dec 15 19:59:02 PST 2014


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=a59459f29fb7942a2d5d9f209c8b6b8da6c0540f
Commit:     a59459f29fb7942a2d5d9f209c8b6b8da6c0540f
Parent:     94cb4ee0f75383327fbeeb91909b342dae3771a5
Author:     Robert Jarzmik <robert.jarzmik at free.fr>
AuthorDate: Sat Sep 27 21:34:29 2014 +0200
Committer:  Brian Norris <computersforpeace at gmail.com>
CommitDate: Wed Oct 22 01:35:40 2014 -0700

    mtd: docg3: add device-tree support
    
    Add device-tree support. This is straightforward as docg3 only uses the
    standard IOMEM resources.
    
    Signed-off-by: Robert Jarzmik <robert.jarzmik at free.fr>
    Cc: devicetree at vger.kernel.org
    Cc: Mark Rutland <mark.rutland at arm.com>
    Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 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 68ff83c..abd9466 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>
@@ -2118,10 +2119,17 @@ static int __exit docg3_release(struct platform_device *pdev)
 	return 0;
 }
 
+static struct of_device_id docg3_dt_ids[] = {
+	{ .compatible = "m-systems,diskonchip-g3" },
+	{}
+};
+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,



More information about the linux-mtd-cvs mailing list