OSDN Git Service

usb: host: xhci: remove #ifdef around PM functions
authorArnd Bergmann <arnd@arndb.de>
Fri, 21 Apr 2017 21:42:54 +0000 (23:42 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Apr 2017 20:55:19 +0000 (22:55 +0200)
commitd852ed98f62e0d44f594adb850b3d6cedb5c9292
treeb9caee6866a90c2f526a3a41799849070b34d937
parent9f41ebfb7e395650f001c2f711833ef1a37ac0d4
usb: host: xhci: remove #ifdef around PM functions

The #ifdef is slightly wrong as it doesn't cover the xhci_priv_resume_quirk()
function, causing a harmless warning:

drivers/usb/host/xhci-plat.c:58:12: error: 'xhci_priv_resume_quirk' defined but not used [-Werror=unused-function]
 static int xhci_priv_resume_quirk(struct usb_hcd *hcd)

A simpler way to do this correctly is to use __maybe_unused annotations
that let the compiler silently drop the functions when there is no
reference.

Fixes: b0c69b4bace3 ("usb: host: plat: Enable xHCI plat runtime PM")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-plat.c
drivers/usb/host/xhci.h