Skip to content

Commit

Permalink
mtd: docg3: add device-tree support
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Robert Jarzmik authored and Brian Norris committed Oct 22, 2014
1 parent 94cb4ee commit a59459f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/mtd/devices/docg3.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit a59459f

Please sign in to comment.