usb: ohci-at91: use __maybe_unused to hide pm functions
authorArnd Bergmann <arnd@arndb.de>
Wed, 2 Mar 2016 15:24:05 +0000 (16:24 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Mar 2016 04:37:41 +0000 (20:37 -0800)
commitd29051930becb9c63a9b13409722090e701cdacc
tree28134dca6748ff0363518848a488738dc66411f2
parent8dac5300c251263cc91f49713d64b5ca85a76d53
usb: ohci-at91: use __maybe_unused to hide pm functions

The ohci-at91 driver uses #ifdef to check for CONFIG_PM, but then
uses SIMPLE_DEV_PM_OPS, which leaves the references out when
CONFIG_PM_SLEEP is not defined, so we get a warning with
PM=y && PM_SLEEP=n:

drivers/usb/host/ohci-at91.c:587:1: error: 'ohci_hcd_at91_drv_suspend' defined but not used [-Werror=unused-function]
drivers/usb/host/ohci-at91.c:631:12: error: 'ohci_hcd_at91_drv_resume' defined but not used [-Werror=unused-function]

This removes the incorrect #ifdef and instead uses a __maybe_unused
annotation to let the compiler know it can silently drop
the function definition.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/ohci-at91.c
This page took 0.025661 seconds and 5 git commands to generate.