diff options
author | Heikki Krogerus <heikki.krogerus@linux.intel.com> | 2016-06-21 10:58:09 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-06-26 11:43:39 -0700 |
commit | 95b57df45062d7005ff01ed956b69166b6b3481e (patch) | |
tree | 55b13b232bfeb0fbddcece426554aac9d48a4b0a /drivers/usb | |
parent | 76f9502fe7616a10a471f2599eee783dbd2674e5 (diff) |
usb: dwc3: host: use build-in property instead of platform data
This should allow xhci to remove handling of platform data.
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/dwc3/host.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/usb/dwc3/host.c b/drivers/usb/dwc3/host.c index c679f63783ae..67f90d7c989d 100644 --- a/drivers/usb/dwc3/host.c +++ b/drivers/usb/dwc3/host.c @@ -16,14 +16,13 @@ */ #include <linux/platform_device.h> -#include <linux/usb/xhci_pdriver.h> #include "core.h" int dwc3_host_init(struct dwc3 *dwc) { + struct property_entry props[2]; struct platform_device *xhci; - struct usb_xhci_pdata pdata; int ret; xhci = platform_device_alloc("xhci-hcd", PLATFORM_DEVID_AUTO); @@ -47,14 +46,15 @@ int dwc3_host_init(struct dwc3 *dwc) 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; - - ret = platform_device_add_data(xhci, &pdata, sizeof(pdata)); - if (ret) { - dev_err(dwc->dev, "couldn't add platform data to xHCI device\n"); - goto err1; + if (dwc->usb3_lpm_capable) { + props[0].name = "usb3-lpm-capable"; + ret = platform_device_add_properties(xhci, props); + if (ret) { + dev_err(dwc->dev, "failed to add properties to xHCI\n"); + goto err1; + } } phy_create_lookup(dwc->usb2_generic_phy, "usb2-phy", |