diff options
author | Peter Chen <peter.chen@nxp.com> | 2016-06-14 23:25:43 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-08-09 10:16:13 -0400 |
commit | 0573f2c519e570d056989e57565e1ff1640dd794 (patch) | |
tree | 08b11683f13dbc8307f9834b7fee3880139f0607 | |
parent | a26a142275c690d122edfba79120412cd7dbe38e (diff) |
usb: core: of.c: fix defined but not declare warning
The helper usb_of_get_child_node is defined at of.c, but missing its
declare as a global function. Fix it by adding related header file
as well as compile it on conditional of CONFIG_OF.
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: linux-usb@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: Ben Dooks <ben.dooks@codethink.co.uk>
Cc: linux-kernel@lists.codethink.co.uk
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Reported-by: Ben Dooks <ben.dooks@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/usb/core/Makefile | 3 | ||||
-rw-r--r-- | drivers/usb/core/of.c | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/core/Makefile b/drivers/usb/core/Makefile index 9780877010b4..da36b784a0ef 100644 --- a/drivers/usb/core/Makefile +++ b/drivers/usb/core/Makefile | |||
@@ -5,8 +5,9 @@ | |||
5 | usbcore-y := usb.o hub.o hcd.o urb.o message.o driver.o | 5 | usbcore-y := usb.o hub.o hcd.o urb.o message.o driver.o |
6 | usbcore-y += config.o file.o buffer.o sysfs.o endpoint.o | 6 | usbcore-y += config.o file.o buffer.o sysfs.o endpoint.o |
7 | usbcore-y += devio.o notify.o generic.o quirks.o devices.o | 7 | usbcore-y += devio.o notify.o generic.o quirks.o devices.o |
8 | usbcore-y += port.o of.o | 8 | usbcore-y += port.o |
9 | 9 | ||
10 | usbcore-$(CONFIG_OF) += of.o | ||
10 | usbcore-$(CONFIG_PCI) += hcd-pci.o | 11 | usbcore-$(CONFIG_PCI) += hcd-pci.o |
11 | usbcore-$(CONFIG_ACPI) += usb-acpi.o | 12 | usbcore-$(CONFIG_ACPI) += usb-acpi.o |
12 | 13 | ||
diff --git a/drivers/usb/core/of.c b/drivers/usb/core/of.c index 2289700c31d6..3de4f8873984 100644 --- a/drivers/usb/core/of.c +++ b/drivers/usb/core/of.c | |||
@@ -18,6 +18,7 @@ | |||
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <linux/of.h> | 20 | #include <linux/of.h> |
21 | #include <linux/usb/of.h> | ||
21 | 22 | ||
22 | /** | 23 | /** |
23 | * usb_of_get_child_node - Find the device node match port number | 24 | * usb_of_get_child_node - Find the device node match port number |