OSDN Git Service

misc: arm-charlcd: add DT probe support
authorRob Herring <robh@kernel.org>
Fri, 28 Mar 2014 21:20:29 +0000 (16:20 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 3 May 2014 23:26:25 +0000 (19:26 -0400)
Add the DT match table to enable DT based probe matching.

Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/arm-charlcd.c

index b7ebf80..c72e96b 100644 (file)
@@ -11,6 +11,7 @@
 #include <linux/module.h>
 #include <linux/interrupt.h>
 #include <linux/platform_device.h>
+#include <linux/of.h>
 #include <linux/completion.h>
 #include <linux/delay.h>
 #include <linux/io.h>
@@ -366,11 +367,17 @@ static const struct dev_pm_ops charlcd_pm_ops = {
        .resume = charlcd_resume,
 };
 
+static const struct of_device_id charlcd_match[] = {
+       { .compatible = "arm,versatile-lcd", },
+       {}
+};
+
 static struct platform_driver charlcd_driver = {
        .driver = {
                .name = DRIVERNAME,
                .owner = THIS_MODULE,
                .pm = &charlcd_pm_ops,
+               .of_match_table = of_match_ptr(charlcd_match),
        },
        .remove = __exit_p(charlcd_remove),
 };