Commit 5eb5afb0 authored by Dmitry Torokhov's avatar Dmitry Torokhov Committed by Rafael J. Wysocki

usb: dwc3: use proper initializers for property entries

We should not be reaching into property entries and initialize them by
hand, but rather use proper initializer macros. This way we can alter
internal representation of property entries with no visible changes to
their users.
Reported-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
Tested-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
Acked-by: default avatarHans de Goede <hdegoede@redhat.com>
Acked-by: default avatarFelipe Balbi <balbi@kernel.org>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent eabd5e7d
...@@ -88,10 +88,10 @@ int dwc3_host_init(struct dwc3 *dwc) ...@@ -88,10 +88,10 @@ int dwc3_host_init(struct dwc3 *dwc)
memset(props, 0, sizeof(struct property_entry) * ARRAY_SIZE(props)); memset(props, 0, sizeof(struct property_entry) * ARRAY_SIZE(props));
if (dwc->usb3_lpm_capable) if (dwc->usb3_lpm_capable)
props[prop_idx++].name = "usb3-lpm-capable"; props[prop_idx++] = PROPERTY_ENTRY_BOOL("usb3-lpm-capable");
if (dwc->usb2_lpm_disable) if (dwc->usb2_lpm_disable)
props[prop_idx++].name = "usb2-lpm-disable"; props[prop_idx++] = PROPERTY_ENTRY_BOOL("usb2-lpm-disable");
/** /**
* WORKAROUND: dwc3 revisions <=3.00a have a limitation * WORKAROUND: dwc3 revisions <=3.00a have a limitation
...@@ -103,7 +103,7 @@ int dwc3_host_init(struct dwc3 *dwc) ...@@ -103,7 +103,7 @@ int dwc3_host_init(struct dwc3 *dwc)
* This following flag tells XHCI to do just that. * This following flag tells XHCI to do just that.
*/ */
if (dwc->revision <= DWC3_REVISION_300A) if (dwc->revision <= DWC3_REVISION_300A)
props[prop_idx++].name = "quirk-broken-port-ped"; props[prop_idx++] = PROPERTY_ENTRY_BOOL("quirk-broken-port-ped");
if (prop_idx) { if (prop_idx) {
ret = platform_device_add_properties(xhci, props); ret = platform_device_add_properties(xhci, props);
......
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