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

drm/tegra: Mark Tegra186 display hub PM functions __maybe_unused

The newly introduced driver has optional suspend/resume functions,
causing a warning when CONFIG_PM is disabled:

drivers/gpu/drm/tegra/hub.c:749:12: error: 'tegra_display_hub_resume' defined but not used [-Werror=unused-function]
drivers/gpu/drm/tegra/hub.c:733:12: error: 'tegra_display_hub_suspend' defined but not used [-Werror=unused-function]

This marks them __maybe_unused to shut up the warnings.

Fixes: c4755fb9064f ("drm/tegra: Add Tegra186 display hub support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Thierry Reding <treding@nvidia.com>

authored by

Arnd Bergmann and committed by
Thierry Reding
013e2b72 bc8828bd

+2 -2
+2 -2
drivers/gpu/drm/tegra/hub.c
··· 728 728 return err; 729 729 } 730 730 731 - static int tegra_display_hub_suspend(struct device *dev) 731 + static int __maybe_unused tegra_display_hub_suspend(struct device *dev) 732 732 { 733 733 struct tegra_display_hub *hub = dev_get_drvdata(dev); 734 734 int err; ··· 744 744 return 0; 745 745 } 746 746 747 - static int tegra_display_hub_resume(struct device *dev) 747 + static int __maybe_unused tegra_display_hub_resume(struct device *dev) 748 748 { 749 749 struct tegra_display_hub *hub = dev_get_drvdata(dev); 750 750 int err;