summaryrefslogtreecommitdiff
path: root/Kconfig
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2016-03-02 18:24:04 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-03-04 07:37:41 +0300
commit8dac5300c251263cc91f49713d64b5ca85a76d53 (patch)
treeae06a1c688f77d73d3a009ebe37ede651ef0bf1e /Kconfig
parentc88d4df217f9a32415d63c1259a45da7f50ac38e (diff)
downloadlinux-8dac5300c251263cc91f49713d64b5ca85a76d53.tar.xz
usb: xhci-mtk: use __maybe_unused to hide pm functions
The mediatek XHCI glue driver uses SET_SYSTEM_SLEEP_PM_OPS() to conditionally set the correct suspend/resume options, and also puts both the dev_pm_ops and the functions inside of an #ifdef testing for CONFIG_PM_SLEEP, but those functions then call other code that becomes unused: drivers/usb/host/xhci-mtk.c:135:12: error: 'xhci_mtk_host_disable' defined but not used [-Werror=unused-function] drivers/usb/host/xhci-mtk.c:313:13: error: 'usb_wakeup_enable' defined but not used [-Werror=unused-function] drivers/usb/host/xhci-mtk.c:321:13: error: 'usb_wakeup_disable' defined but not used [-Werror=unused-function] This replaces the #ifdef with __maybe_unused annotations so the compiler knows it can silently drop them instead of warning. For the DEV_PM_OPS definition, we can use an IS_ENABLED() check to avoid defining the structure when CONFIG_PM is not set without the #ifdef. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'Kconfig')
0 files changed, 0 insertions, 0 deletions