Commit 4495afcf713adb5bdb16504052952bdd0d11f90a
Committed by
Felipe Balbi
1 parent
e36a0c870f
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
usb: dwc3: omap: remove platform data associated with dwc3-omap
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>
Showing 2 changed files with 10 additions and 18 deletions Side-by-side Diff
drivers/usb/dwc3/dwc3-omap.c
... | ... | @@ -309,7 +309,6 @@ |
309 | 309 | |
310 | 310 | static int dwc3_omap_probe(struct platform_device *pdev) |
311 | 311 | { |
312 | - struct dwc3_omap_data *pdata = pdev->dev.platform_data; | |
313 | 312 | struct device_node *node = pdev->dev.of_node; |
314 | 313 | |
315 | 314 | struct dwc3_omap *omap; |
... | ... | @@ -326,6 +325,11 @@ |
326 | 325 | void __iomem *base; |
327 | 326 | void *context; |
328 | 327 | |
328 | + if (!node) { | |
329 | + dev_err(dev, "device node not found\n"); | |
330 | + return -EINVAL; | |
331 | + } | |
332 | + | |
329 | 333 | omap = devm_kzalloc(dev, sizeof(*omap), GFP_KERNEL); |
330 | 334 | if (!omap) { |
331 | 335 | dev_err(dev, "not enough memory\n"); |
... | ... | @@ -387,12 +391,7 @@ |
387 | 391 | |
388 | 392 | reg = dwc3_omap_readl(omap->base, USBOTGSS_UTMI_OTG_STATUS); |
389 | 393 | |
390 | - if (node) | |
391 | - of_property_read_u32(node, "utmi-mode", &utmi_mode); | |
392 | - else if (pdata) | |
393 | - utmi_mode = pdata->utmi_mode; | |
394 | - else | |
395 | - dev_dbg(dev, "missing platform data\n"); | |
394 | + of_property_read_u32(node, "utmi-mode", &utmi_mode); | |
396 | 395 | |
397 | 396 | switch (utmi_mode) { |
398 | 397 | case DWC3_OMAP_UTMI_MODE_SW: |
... | ... | @@ -435,13 +434,10 @@ |
435 | 434 | |
436 | 435 | dwc3_omap_writel(omap->base, USBOTGSS_IRQENABLE_SET_1, reg); |
437 | 436 | |
438 | - if (node) { | |
439 | - ret = of_platform_populate(node, NULL, NULL, dev); | |
440 | - if (ret) { | |
441 | - dev_err(&pdev->dev, | |
442 | - "failed to add create dwc3 core\n"); | |
443 | - return ret; | |
444 | - } | |
437 | + ret = of_platform_populate(node, NULL, NULL, dev); | |
438 | + if (ret) { | |
439 | + dev_err(&pdev->dev, "failed to create dwc3 core\n"); | |
440 | + return ret; | |
445 | 441 | } |
446 | 442 | |
447 | 443 | return 0; |