Commit 95b57df4 authored by Heikki Krogerus's avatar Heikki Krogerus Committed by Greg Kroah-Hartman

usb: dwc3: host: use build-in property instead of platform data

This should allow xhci to remove handling of platform data.
Signed-off-by: default avatarHeikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: default avatarMathias Nyman <mathias.nyman@linux.intel.com>
Acked-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 76f9502f
...@@ -16,14 +16,13 @@ ...@@ -16,14 +16,13 @@
*/ */
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/usb/xhci_pdriver.h>
#include "core.h" #include "core.h"
int dwc3_host_init(struct dwc3 *dwc) int dwc3_host_init(struct dwc3 *dwc)
{ {
struct property_entry props[2];
struct platform_device *xhci; struct platform_device *xhci;
struct usb_xhci_pdata pdata;
int ret; int ret;
xhci = platform_device_alloc("xhci-hcd", PLATFORM_DEVID_AUTO); xhci = platform_device_alloc("xhci-hcd", PLATFORM_DEVID_AUTO);
...@@ -47,15 +46,16 @@ int dwc3_host_init(struct dwc3 *dwc) ...@@ -47,15 +46,16 @@ int dwc3_host_init(struct dwc3 *dwc)
goto err1; goto err1;
} }
memset(&pdata, 0, sizeof(pdata)); memset(props, 0, sizeof(struct property_entry) * ARRAY_SIZE(props));
pdata.usb3_lpm_capable = dwc->usb3_lpm_capable; if (dwc->usb3_lpm_capable) {
props[0].name = "usb3-lpm-capable";
ret = platform_device_add_data(xhci, &pdata, sizeof(pdata)); ret = platform_device_add_properties(xhci, props);
if (ret) { if (ret) {
dev_err(dwc->dev, "couldn't add platform data to xHCI device\n"); dev_err(dwc->dev, "failed to add properties to xHCI\n");
goto err1; goto err1;
} }
}
phy_create_lookup(dwc->usb2_generic_phy, "usb2-phy", phy_create_lookup(dwc->usb2_generic_phy, "usb2-phy",
dev_name(&xhci->dev)); dev_name(&xhci->dev));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment