• Linus Torvalds's avatar
    spi: Fix tegra20 build with CONFIG_PM=n · efafec27
    Linus Torvalds authored
    Without CONFIG_PM enabled, the SET_RUNTIME_PM_OPS() macro ends up being
    empty, and the only use of tegra_slink_runtime_{resume,suspend} goes
    away, resulting in
    
      drivers/spi/spi-tegra20-slink.c:1200:12: error: ‘tegra_slink_runtime_resume’ defined but not used [-Werror=unused-function]
       1200 | static int tegra_slink_runtime_resume(struct device *dev)
            |            ^~~~~~~~~~~~~~~~~~~~~~~~~~
      drivers/spi/spi-tegra20-slink.c:1188:12: error: ‘tegra_slink_runtime_suspend’ defined but not used [-Werror=unused-function]
       1188 | static int tegra_slink_runtime_suspend(struct device *dev)
            |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    mark the functions __maybe_unused to make the build happy.
    
    This hits the alpha allmodconfig build (and others).
    Reported-by: default avatarGuenter Roeck <linux@roeck-us.net>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    efafec27
spi-tegra20-slink.c 33.2 KB