diff options
author | Dave Airlie <airlied@redhat.com> | 2018-09-26 21:06:46 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2018-09-26 21:06:46 -0400 |
commit | bf78296ab1cb215d0609ac6cff4e43e941e51265 (patch) | |
tree | a193615b327d9ee538e71ca5f13bbfb4f3db4e6b /drivers/usb/core/of.c | |
parent | 18eb2f6e19d77900695987e3a2b775cccbe5b84e (diff) | |
parent | 6bf4ca7fbc85d80446ac01c0d1d77db4d91a6d84 (diff) |
BackMerge v4.19-rc5 into drm-next
Sean Paul requested an -rc5 backmerge from some sun4i fixes.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/usb/core/of.c')
-rw-r--r-- | drivers/usb/core/of.c | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/drivers/usb/core/of.c b/drivers/usb/core/of.c index fd77442c2d12..651708d8c908 100644 --- a/drivers/usb/core/of.c +++ b/drivers/usb/core/of.c | |||
@@ -105,29 +105,3 @@ usb_of_get_interface_node(struct usb_device *udev, u8 config, u8 ifnum) | |||
105 | return NULL; | 105 | return NULL; |
106 | } | 106 | } |
107 | EXPORT_SYMBOL_GPL(usb_of_get_interface_node); | 107 | EXPORT_SYMBOL_GPL(usb_of_get_interface_node); |
108 | |||
109 | /** | ||
110 | * usb_of_get_companion_dev - Find the companion device | ||
111 | * @dev: the device pointer to find a companion | ||
112 | * | ||
113 | * Find the companion device from platform bus. | ||
114 | * | ||
115 | * Takes a reference to the returned struct device which needs to be dropped | ||
116 | * after use. | ||
117 | * | ||
118 | * Return: On success, a pointer to the companion device, %NULL on failure. | ||
119 | */ | ||
120 | struct device *usb_of_get_companion_dev(struct device *dev) | ||
121 | { | ||
122 | struct device_node *node; | ||
123 | struct platform_device *pdev = NULL; | ||
124 | |||
125 | node = of_parse_phandle(dev->of_node, "companion", 0); | ||
126 | if (node) | ||
127 | pdev = of_find_device_by_node(node); | ||
128 | |||
129 | of_node_put(node); | ||
130 | |||
131 | return pdev ? &pdev->dev : NULL; | ||
132 | } | ||
133 | EXPORT_SYMBOL_GPL(usb_of_get_companion_dev); | ||