• Arnd Bergmann's avatar
    staging: atomisp: remove #ifdef for runtime PM functions · 5795a9a5
    Arnd Bergmann authored
    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: a49d2536 ("staging/atomisp: Add support for the Intel IPU v2")
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    5795a9a5
atomisp_v4l2.c 44.4 KB