usb: host: xhci-plat: Iterate over parent nodes for finding quirks
authorAnurag Kumar Vulisha <anurag.kumar.vulisha@xilinx.com>
Fri, 31 Aug 2018 14:24:42 +0000 (17:24 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Sep 2018 11:27:06 +0000 (13:27 +0200)
commit222471f7640d9771a993218d825d84825adc805d
tree94efdb6314dd7a85ac5ae6feae92f63ad19bcd81
parent4937213ba7fafa13f30496b3965ffe93970d8b53
usb: host: xhci-plat: Iterate over parent nodes for finding quirks

In xhci_plat_probe() both sysdev and pdev->dev are being used
for finding quirks. There are some drivers(like dwc3 host.c)
which adds quirks(like usb3-lpm-capable) into pdev and the logic
present in xhci_plat_probe() checks for quirks in either sysdev
or pdev for finding the quirks. Because of this logic, some of
the quirks are getting missed(usb3-lpm-capable quirk added by dwc3
host.c driver is getting missed).This patch fixes this by iterating
over all the available parents for finding the quirks. In this way
all the quirks which are present in child or parent are correctly
updated.

Signed-off-by: Anurag Kumar Vulisha <anurag.kumar.vulisha@xilinx.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-plat.c