even though the API is called
platform_device_add_properties(), it actually
replaces any previously set properties and only
maintains the last properties set.

This means that we need to duplicate
"linux,sysdev_is_parent" in all other occasions
instead of having it in a single place.

Signed-off-by: Felipe Balbi <[email protected]>
---
 drivers/usb/dwc3/dwc3-pci.c | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/drivers/usb/dwc3/dwc3-pci.c b/drivers/usb/dwc3/dwc3-pci.c
index 2b73339f286b..1eca4c543667 100644
--- a/drivers/usb/dwc3/dwc3-pci.c
+++ b/drivers/usb/dwc3/dwc3-pci.c
@@ -73,20 +73,11 @@ static int dwc3_pci_quirks(struct dwc3_pci *dwc)
 {
        struct platform_device          *dwc3 = dwc->dwc3;
        struct pci_dev                  *pdev = dwc->pci;
-       int                             ret;
-
-       struct property_entry sysdev_property[] = {
-               PROPERTY_ENTRY_BOOL("linux,sysdev_is_parent"),
-               { },
-       };
-
-       ret = platform_device_add_properties(dwc3, sysdev_property);
-       if (ret)
-               return ret;
 
        if (pdev->vendor == PCI_VENDOR_ID_AMD &&
            pdev->device == PCI_DEVICE_ID_AMD_NL_USB) {
                struct property_entry properties[] = {
+                       PROPERTY_ENTRY_BOOL("linux,sysdev_is_parent"),
                        PROPERTY_ENTRY_BOOL("snps,has-lpm-erratum"),
                        PROPERTY_ENTRY_U8("snps,lpm-nyet-threshold", 0xf),
                        PROPERTY_ENTRY_BOOL("snps,u2exit_lfps_quirk"),
@@ -115,6 +106,7 @@ static int dwc3_pci_quirks(struct dwc3_pci *dwc)
                int ret;
 
                struct property_entry properties[] = {
+                       PROPERTY_ENTRY_BOOL("linux,sysdev_is_parent"),
                        PROPERTY_ENTRY_STRING("dr-mode", "peripheral"),
                        { }
                };
@@ -164,6 +156,7 @@ static int dwc3_pci_quirks(struct dwc3_pci *dwc)
             pdev->device == PCI_DEVICE_ID_SYNOPSYS_HAPSUSB3_AXI ||
             pdev->device == PCI_DEVICE_ID_SYNOPSYS_HAPSUSB31)) {
                struct property_entry properties[] = {
+                       PROPERTY_ENTRY_BOOL("linux,sysdev_is_parent"),
                        PROPERTY_ENTRY_BOOL("snps,usb3_lpm_capable"),
                        PROPERTY_ENTRY_BOOL("snps,has-lpm-erratum"),
                        PROPERTY_ENTRY_BOOL("snps,dis_enblslpm_quirk"),
-- 
2.10.1

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to