usb: gadget: s3c-hsotg: Add device tree-based instantiation
authorTomasz Figa <t.figa@samsung.com>
Tue, 11 Sep 2012 11:36:51 +0000 (13:36 +0200)
committerChanho Park <chanho61.park@samsung.com>
Tue, 18 Nov 2014 02:42:20 +0000 (11:42 +0900)
drivers/usb/gadget/s3c-hsotg.c

index af22f24..8fd9681 100644 (file)
@@ -29,6 +29,7 @@
 #include <linux/slab.h>
 #include <linux/clk.h>
 #include <linux/regulator/consumer.h>
+#include <linux/of_platform.h>
 
 #include <linux/usb/ch9.h>
 #include <linux/usb/gadget.h>
@@ -3648,10 +3649,17 @@ static int s3c_hsotg_remove(struct platform_device *pdev)
 #define s3c_hsotg_resume NULL
 #endif
 
+static const struct of_device_id s3c_hsotg_of_ids[] = {
+       { .compatible = "samsung,s3c-hsotg", },
+       { /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(of, s3c_hsotg_of_ids);
+
 static struct platform_driver s3c_hsotg_driver = {
        .driver         = {
                .name   = "s3c-hsotg",
                .owner  = THIS_MODULE,
+               .of_match_table = s3c_hsotg_of_ids,
        },
        .probe          = s3c_hsotg_probe,
        .remove         = s3c_hsotg_remove,