usb: dwc3: omap: remove platform data associated with dwc3-omap
authorKishon Vijay Abraham I <kishon@ti.com>
Tue, 26 Feb 2013 14:33:28 +0000 (20:03 +0530)
committerFelipe Balbi <balbi@ti.com>
Mon, 18 Mar 2013 09:16:38 +0000 (11:16 +0200)
omap5 is not going to have support for non-dt boot making the platform
data associated with dwc3 useless. Removed it here.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/dwc3/dwc3-omap.c
include/linux/platform_data/dwc3-omap.h

index e1206b41993255e3672ec35a5b1ff4f2924a7690..43a248219aaec9945716e409d0a338d49adf9466 100644 (file)
@@ -309,7 +309,6 @@ static int dwc3_omap_remove_core(struct device *dev, void *c)
 
 static int dwc3_omap_probe(struct platform_device *pdev)
 {
-       struct dwc3_omap_data   *pdata = pdev->dev.platform_data;
        struct device_node      *node = pdev->dev.of_node;
 
        struct dwc3_omap        *omap;
@@ -326,6 +325,11 @@ static int dwc3_omap_probe(struct platform_device *pdev)
        void __iomem            *base;
        void                    *context;
 
+       if (!node) {
+               dev_err(dev, "device node not found\n");
+               return -EINVAL;
+       }
+
        omap = devm_kzalloc(dev, sizeof(*omap), GFP_KERNEL);
        if (!omap) {
                dev_err(dev, "not enough memory\n");
@@ -387,12 +391,7 @@ static int dwc3_omap_probe(struct platform_device *pdev)
 
        reg = dwc3_omap_readl(omap->base, USBOTGSS_UTMI_OTG_STATUS);
 
-       if (node)
-               of_property_read_u32(node, "utmi-mode", &utmi_mode);
-       else if (pdata)
-               utmi_mode = pdata->utmi_mode;
-       else
-               dev_dbg(dev, "missing platform data\n");
+       of_property_read_u32(node, "utmi-mode", &utmi_mode);
 
        switch (utmi_mode) {
        case DWC3_OMAP_UTMI_MODE_SW:
@@ -435,13 +434,10 @@ static int dwc3_omap_probe(struct platform_device *pdev)
 
        dwc3_omap_writel(omap->base, USBOTGSS_IRQENABLE_SET_1, reg);
 
-       if (node) {
-               ret = of_platform_populate(node, NULL, NULL, dev);
-               if (ret) {
-                       dev_err(&pdev->dev,
-                               "failed to add create dwc3 core\n");
-                       return ret;
-               }
+       ret = of_platform_populate(node, NULL, NULL, dev);
+       if (ret) {
+               dev_err(&pdev->dev, "failed to create dwc3 core\n");
+               return ret;
        }
 
        return 0;
index ada401244e0b636cff9fe9996312727d4e504022..1d36ca874cc86fb7b9ec82724277eee625a8478d 100644 (file)
@@ -41,7 +41,3 @@ enum dwc3_omap_utmi_mode {
        DWC3_OMAP_UTMI_MODE_HW,
        DWC3_OMAP_UTMI_MODE_SW,
 };
-
-struct dwc3_omap_data {
-       enum dwc3_omap_utmi_mode        utmi_mode;
-};