mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-01 22:54:01 +00:00
usb: common: Consider only available nodes for dr_mode
commit238e0268c8
upstream. 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:98bfb39466
("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>
This commit is contained in:
parent
ef4df134e7
commit
015e5c1761
1 changed files with 2 additions and 0 deletions
|
@ -145,6 +145,8 @@ enum usb_dr_mode of_usb_get_dr_mode_by_phy(struct device_node *np, int arg0)
|
|||
|
||||
do {
|
||||
controller = of_find_node_with_property(controller, "phys");
|
||||
if (!of_device_is_available(controller))
|
||||
continue;
|
||||
index = 0;
|
||||
do {
|
||||
if (arg0 == -1) {
|
||||
|
|
Loading…
Reference in a new issue