staging: atomisp: remove #ifdef for runtime PM functions
authorArnd Bergmann <arnd@arndb.de>
Fri, 28 Apr 2017 12:10:31 +0000 (13:10 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 28 Apr 2017 12:27:26 +0000 (14:27 +0200)
commit5795a9a5fed75a729444f9d83fab597ec131d282
tree4d4fe753380a1289995dad75de8a895ae45a1917
parent5162e1ae0c58dcf98ae322a92d60360142d0ae00
staging: atomisp: remove #ifdef for runtime PM functions

The runtime power management functions are called from the reset handler even
if CONFIG_PM is disabled, leading to a link error:

drivers/staging/built-in.o: In function `atomisp_reset':
(.text+0x4cd1c): undefined reference to `atomisp_runtime_suspend'
drivers/staging/built-in.o: In function `atomisp_reset':
(.text+0x4cd3a): undefined reference to `atomisp_mrfld_power_down'
drivers/staging/built-in.o: In function `atomisp_reset':
(.text+0x4cd58): undefined reference to `atomisp_mrfld_power_up'
drivers/staging/built-in.o: In function `atomisp_reset':
(.text+0x4cd77): undefined reference to `atomisp_runtime_resume'

Removing the #ifdef around the PM functions avoids the problem, and
lets us simplify it further. The __maybe_unused annotation is needed
to ensure the compiler can silently drop the unused callbacks.

Fixes: a49d25364dfb ("staging/atomisp: Add support for the Intel IPU v2")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c