Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/sun4i: mark PM functions as __maybe_unused

Disabling CONFIG_PM produces a compile time warning when these
functions are not referenced:

drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c:1072:12: error: 'sun6i_dsi_runtime_suspend' defined but not used [-Werror=unused-function]
static int sun6i_dsi_runtime_suspend(struct device *dev)
^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c:1043:12: error: 'sun6i_dsi_runtime_resume' defined but not used [-Werror=unused-function]
static int sun6i_dsi_runtime_resume(struct device *dev)
^~~~~~~~~~~~~~~~~~~~~~~~

Fixes: 133add5b5ad4 ("drm/sun4i: Add Allwinner A31 MIPI-DSI controller support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180525155030.3667352-1-arnd@arndb.de

authored by

Arnd Bergmann and committed by
Maxime Ripard
6b1c5eaf 952a08a2

+2 -2
+2 -2
drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c
··· 1040 1040 return 0; 1041 1041 } 1042 1042 1043 - static int sun6i_dsi_runtime_resume(struct device *dev) 1043 + static int __maybe_unused sun6i_dsi_runtime_resume(struct device *dev) 1044 1044 { 1045 1045 struct sun6i_dsi *dsi = dev_get_drvdata(dev); 1046 1046 ··· 1069 1069 return 0; 1070 1070 } 1071 1071 1072 - static int sun6i_dsi_runtime_suspend(struct device *dev) 1072 + static int __maybe_unused sun6i_dsi_runtime_suspend(struct device *dev) 1073 1073 { 1074 1074 struct sun6i_dsi *dsi = dev_get_drvdata(dev); 1075 1075