diff options
author | Johan Hovold <johan@kernel.org> | 2017-11-09 18:07:23 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-11-28 15:12:38 +0100 |
commit | 7739376eb1ed68593805e5b4ed359123d0718549 (patch) | |
tree | 92bd0a2f9e3d87809c83e92e55d87c7d13f943e4 /drivers/usb/core/usb.c | |
parent | 03310a15484ab6a8f6d91bbf7fe486b17275c09a (diff) | |
download | linux-7739376eb1ed68593805e5b4ed359123d0718549.tar.gz linux-7739376eb1ed68593805e5b4ed359123d0718549.tar.bz2 linux-7739376eb1ed68593805e5b4ed359123d0718549.zip |
USB: of: clean up device-node helper
Clean up the USB device-node helper that is used to look up a device
node given a parent hub device and a port number. Also pass in a struct
usb_device as first argument to provide some type checking.
Give the helper the more descriptive name usb_of_get_device_node(),
which matches the new usb_of_get_interface_node() helper that is used to
look up a second type of of child node from a USB device.
Note that the terms "device node" and "interface node" are defined and
used by the OF Recommended Practice for USB.
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/core/usb.c')
-rw-r--r-- | drivers/usb/core/usb.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c index 845286f08ab0..2f5fbc56a9dd 100644 --- a/drivers/usb/core/usb.c +++ b/drivers/usb/core/usb.c @@ -645,8 +645,7 @@ struct usb_device *usb_alloc_dev(struct usb_device *parent, raw_port = usb_hcd_find_raw_port_number(usb_hcd, port1); } - dev->dev.of_node = usb_of_get_child_node(parent->dev.of_node, - raw_port); + dev->dev.of_node = usb_of_get_device_node(parent, raw_port); /* hub driver sets up TT records */ } |