2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-30 16:13:54 +08:00

usb: host: ehci: allow ehci_* symbols to be unused

not all platforms will use all of those ehci_*
symbols on their hc_driver structure. Sometimes
we might need to provide a modified version of
a certain method or not provide it at all, as is
the case with OMAPs which don't support port handoff
feature.

Whenever we compile a kernel for an OMAP board with
EHCI enabled, we get compile warnings:

drivers/usb/host/ehci-hub.c:1079: warning: 'ehci_relinquish_port' \
	defined but not used
drivers/usb/host/ehci-hub.c:1088: warning: 'ehci_port_handed_over' \
	defined but not used

In order to cleanup those warnings, we're adding
__maybe_unused annotation to those functions.

Signed-off-by: Felipe Balbi <balbi@ti.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Felipe Balbi 2012-02-15 09:34:26 +02:00 committed by Greg Kroah-Hartman
parent 03a41f3da4
commit 5407a3c3d9

View File

@ -107,7 +107,7 @@ static void ehci_handover_companion_ports(struct ehci_hcd *ehci)
ehci->owned_ports = 0; ehci->owned_ports = 0;
} }
static int ehci_port_change(struct ehci_hcd *ehci) static int __maybe_unused ehci_port_change(struct ehci_hcd *ehci)
{ {
int i = HCS_N_PORTS(ehci->hcs_params); int i = HCS_N_PORTS(ehci->hcs_params);
@ -1076,7 +1076,8 @@ error_exit:
return retval; return retval;
} }
static void ehci_relinquish_port(struct usb_hcd *hcd, int portnum) static void __maybe_unused ehci_relinquish_port(struct usb_hcd *hcd,
int portnum)
{ {
struct ehci_hcd *ehci = hcd_to_ehci(hcd); struct ehci_hcd *ehci = hcd_to_ehci(hcd);
@ -1085,7 +1086,8 @@ static void ehci_relinquish_port(struct usb_hcd *hcd, int portnum)
set_owner(ehci, --portnum, PORT_OWNER); set_owner(ehci, --portnum, PORT_OWNER);
} }
static int ehci_port_handed_over(struct usb_hcd *hcd, int portnum) static int __maybe_unused ehci_port_handed_over(struct usb_hcd *hcd,
int portnum)
{ {
struct ehci_hcd *ehci = hcd_to_ehci(hcd); struct ehci_hcd *ehci = hcd_to_ehci(hcd);
u32 __iomem *reg; u32 __iomem *reg;