OSDN Git Service

usb: common: Consider only available nodes for dr_mode
authorFabrizio Castro <fabrizio.castro@bp.renesas.com>
Fri, 1 Mar 2019 11:05:45 +0000 (11:05 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 19 Mar 2019 13:57:32 +0000 (14:57 +0100)
commit238e0268c82789e4c107a37045d529a6dbce51a9
tree01210a392924cbd12438147dbe4e0f786a56e333
parent976daf9d1199932df80e7b04546d1a1bd4ed5ece
usb: common: Consider only available nodes for dr_mode

There are cases where multiple device tree nodes point to the
same phy node by means of the "phys" property, but we should
only consider those nodes that are marked as available rather
than just any node.

Fixes: 98bfb3946695 ("usb: of: add an api to get dr_mode by the phy node")
Cc: stable@vger.kernel.org # v4.4+
Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/common/common.c