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

drm/tegra: vic: Fix unused-function warnings

The use of the old-style SET_RUNTIME_PM_OPS() and
SET_SYSTEM_SLEEP_PM_OPS() macros requires function definitions
to be hidden to avoid

drivers/gpu/drm/tegra/vic.c:326:12: error: 'vic_runtime_suspend' defined but not used [-Werror=unused-function]
326 | static int vic_runtime_suspend(struct device *dev)
| ^~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/tegra/vic.c:292:12: error: 'vic_runtime_resume' defined but not used [-Werror=unused-function]
292 | static int vic_runtime_resume(struct device *dev)
| ^~~~~~~~~~~~~~~~~~

Use the new-style SYSTEM_SLEEP_PM_OPS() and RUNTIME_PM_OPS() instead.

Fixes: 1e15f5b911d6 ("drm/tegra: vic: Stop channel on suspend")
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
42457494 74bb98dd

+2 -3
+2 -3
drivers/gpu/drm/tegra/vic.c
··· 513 513 } 514 514 515 515 static const struct dev_pm_ops vic_pm_ops = { 516 - SET_RUNTIME_PM_OPS(vic_runtime_suspend, vic_runtime_resume, NULL) 517 - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, 518 - pm_runtime_force_resume) 516 + RUNTIME_PM_OPS(vic_runtime_suspend, vic_runtime_resume, NULL) 517 + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume) 519 518 }; 520 519 521 520 struct platform_driver tegra_vic_driver = {