linux/drivers/usb/core
Johan Hovold 2bf6986712 USB: of: fix root-hub device-tree node handling
In an attempt to work around a pinmux over-allocation issue in driver
core, commit dc5878abf4 ("usb: core: move root hub's device node
assignment after it is added to bus") moved the device-tree node
assignment until after the root hub had been registered.

This not only makes the device-tree node unavailable to the usb driver
during probe, but also prevents the of_node from being linked to in
sysfs and causes a race with user-space for the (recently added) devspec
attribute.

Use the new device_set_of_node_from_dev() helper to reuse the node of
the sysdev device, something which now prevents driver core from trying
to reclaim any pinctrl pins during probe.

Fixes: dc5878abf4 ("usb: core: move root hub's device node assignment after it is added to bus")
Fixes: 51fa91475e ("usb/core: Added devspec sysfs entry for devices behind the usb hub")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-13 11:07:32 +02:00
..
buffer.c usb: separate out sysdev pointer from usb_bus 2017-03-23 08:20:21 +01:00
config.c usb-core: Add LINEAR_FRAME_INTR_BINTERVAL USB quirk 2017-03-14 17:07:31 +08:00
devices.c usb: fix some references for /proc/bus/usb 2017-04-18 16:54:19 +02:00
devio.c USB: add usbfs ioctl to retrieve the connection speed 2017-06-13 10:48:24 +02:00
driver.c usb: hub: Do not attempt to autosuspend disconnected devices 2017-03-23 08:13:22 +01:00
endpoint.c usb: patches for v4.10 merge window 2016-11-18 16:02:15 +01:00
file.c USB: Proper handling of Race Condition when two USB class drivers try to call init_usb_class simultaneously 2017-03-29 11:55:25 +02:00
generic.c USB: core: add missing license information to some files 2016-10-29 12:51:56 -04:00
hcd-pci.c usb: hcd: out of bounds access in for_each_companion 2016-04-13 12:06:18 -07:00
hcd.c USB: of: fix root-hub device-tree node handling 2017-06-13 11:07:32 +02:00
hub.c USB: hub: fix SS max number of ports 2017-05-17 11:53:02 +02:00
hub.h usb: Support USB 3.1 extended port status request 2016-01-24 20:16:52 -08:00
Kconfig docs-rst: fix usb cross-references 2017-04-11 14:41:29 -06:00
ledtrig-usbport.c usb: core: usbport: Use proper LED API to fix potential crash 2016-12-06 08:37:41 +01:00
Makefile usb: add CONFIG_USB_PCI for system have both PCI HW and non-PCI based USB HW 2017-03-17 13:16:56 +09:00
message.c usb: get rid of some ReST doc build errors 2017-04-11 14:40:48 -06:00
notify.c USB: core: add missing license information to some files 2016-10-29 12:51:56 -04:00
of.c USB: of: document reference taken by child-lookup helper 2017-06-13 11:07:32 +02:00
otg_whitelist.h usb: core: use IS_ENABLED() instead of checking for built-in or module 2016-09-02 14:36:33 +02:00
port.c Revert "USB / PM: Allow USB devices to remain runtime-suspended when sleeping" 2016-05-02 08:44:31 -07:00
quirks.c usb-core: Add LINEAR_FRAME_INTR_BINTERVAL USB quirk 2017-03-14 17:07:31 +08:00
sysfs.c USB: core: add missing license information to some files 2016-10-29 12:51:56 -04:00
urb.c USB: core: replace %p with %pK 2017-05-17 11:27:41 +02:00
usb-acpi.c usb: optimize acpi companion search for usb port devices 2017-06-03 18:02:58 +09:00
usb.c USB: of: fix root-hub device-tree node handling 2017-06-13 11:07:32 +02:00
usb.h USB: core: add missing license information to some files 2016-10-29 12:51:56 -04:00