drm/tegra: vic: Fix build warning when CONFIG_PM=n
authorYueHaibing <yuehaibing@huawei.com>
Sat, 5 Mar 2022 12:32:00 +0000 (20:32 +0800)
committerThierry Reding <treding@nvidia.com>
Fri, 8 Jul 2022 14:39:19 +0000 (16:39 +0200)
drivers/gpu/drm/tegra/vic.c:326:12: error: ‘vic_runtime_suspend’ defined but not used [-Werror=unused-function]
 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]
 static int vic_runtime_resume(struct device *dev)
            ^~~~~~~~~~~~~~~~~~

Mark it as __maybe_unused.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/gpu/drm/tegra/vic.c

index c1734f823d04302b1f0177919ce16bc737daf64e..b14b84494be0a55db376433d91eeed5286f5edee 100644 (file)
@@ -323,7 +323,7 @@ cleanup:
 }
 
 
-static int vic_runtime_resume(struct device *dev)
+static int __maybe_unused vic_runtime_resume(struct device *dev)
 {
        struct vic *vic = dev_get_drvdata(dev);
        int err;
@@ -357,7 +357,7 @@ disable:
        return err;
 }
 
-static int vic_runtime_suspend(struct device *dev)
+static int __maybe_unused vic_runtime_suspend(struct device *dev)
 {
        struct vic *vic = dev_get_drvdata(dev);
        int err;