diff options
author | Robert Jarzmik <robert.jarzmik@free.fr> | 2014-09-27 15:34:29 -0400 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2014-10-22 04:35:40 -0400 |
commit | a59459f29fb7942a2d5d9f209c8b6b8da6c0540f (patch) | |
tree | f98f0b99a2e8a2e7875fc4f742f3035311d9af4f /drivers/mtd | |
parent | 94cb4ee0f75383327fbeeb91909b342dae3771a5 (diff) |
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@free.fr>
Cc: devicetree@vger.kernel.org
Cc: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/devices/docg3.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/mtd/devices/docg3.c b/drivers/mtd/devices/docg3.c index 68ff83cc6660..abd94668a05d 100644 --- a/drivers/mtd/devices/docg3.c +++ b/drivers/mtd/devices/docg3.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
23 | #include <linux/module.h> | 23 | #include <linux/module.h> |
24 | #include <linux/errno.h> | 24 | #include <linux/errno.h> |
25 | #include <linux/of.h> | ||
25 | #include <linux/platform_device.h> | 26 | #include <linux/platform_device.h> |
26 | #include <linux/string.h> | 27 | #include <linux/string.h> |
27 | #include <linux/slab.h> | 28 | #include <linux/slab.h> |
@@ -2118,10 +2119,17 @@ static int __exit docg3_release(struct platform_device *pdev) | |||
2118 | return 0; | 2119 | return 0; |
2119 | } | 2120 | } |
2120 | 2121 | ||
2122 | static struct of_device_id docg3_dt_ids[] = { | ||
2123 | { .compatible = "m-systems,diskonchip-g3" }, | ||
2124 | {} | ||
2125 | }; | ||
2126 | MODULE_DEVICE_TABLE(of, docg3_dt_ids); | ||
2127 | |||
2121 | static struct platform_driver g3_driver = { | 2128 | static struct platform_driver g3_driver = { |
2122 | .driver = { | 2129 | .driver = { |
2123 | .name = "docg3", | 2130 | .name = "docg3", |
2124 | .owner = THIS_MODULE, | 2131 | .owner = THIS_MODULE, |
2132 | .of_match_table = of_match_ptr(docg3_dt_ids), | ||
2125 | }, | 2133 | }, |
2126 | .suspend = docg3_suspend, | 2134 | .suspend = docg3_suspend, |
2127 | .resume = docg3_resume, | 2135 | .resume = docg3_resume, |