]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
usb: core: of.c: fix defined but not declare warning
authorPeter Chen <peter.chen@nxp.com>
Wed, 15 Jun 2016 03:25:43 +0000 (11:25 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 9 Aug 2016 14:16:13 +0000 (16:16 +0200)
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>
drivers/usb/core/Makefile
drivers/usb/core/of.c

index 9780877010b4d19b1302d4b899ff3f19462a18b5..da36b784a0ef7769c98236f4b864f6e0608f4ce7 100644 (file)
@@ -5,8 +5,9 @@
 usbcore-y := usb.o hub.o hcd.o urb.o message.o driver.o
 usbcore-y += config.o file.o buffer.o sysfs.o endpoint.o
 usbcore-y += devio.o notify.o generic.o quirks.o devices.o
-usbcore-y += port.o of.o
+usbcore-y += port.o
 
+usbcore-$(CONFIG_OF)           += of.o
 usbcore-$(CONFIG_PCI)          += hcd-pci.o
 usbcore-$(CONFIG_ACPI)         += usb-acpi.o
 
index 2289700c31d6e2fb3fd55e58280a32a48a676703..3de4f8873984d2d04749f2f87b8b5c0fb2b9f59b 100644 (file)
@@ -18,6 +18,7 @@
  */
 
 #include <linux/of.h>
+#include <linux/usb/of.h>
 
 /**
  * usb_of_get_child_node - Find the device node match port number