diff options
author | Arnd Bergmann <arnd@arndb.de> | 2016-04-16 16:19:33 -0400 |
---|---|---|
committer | Eduardo Valentin <edubezval@gmail.com> | 2016-05-17 10:28:30 -0400 |
commit | a977c41ec65bbdc5000a130372adba1f85c86833 (patch) | |
tree | 8b03b81eaf86f74a4ff9d4f029e3c1e4b334424b | |
parent | 0b58c08b593d082858e74503bdf553ea01f9f15a (diff) |
thermal: tegra: mark PM functions __maybe_unused
After the PM support has been added to this driver, we get
a harmless warning when that support is disabled at compile
time:
drivers/thermal/tegra/soctherm.c:641:12: error: 'soctherm_resume' defined but not used [-Werror=unused-function]
static int soctherm_resume(struct device *dev)
This marks the two PM functions as __maybe_unused to shut up
the warning. This is preferred over adding an #ifdef around
them, as it is harder to get wrong, and provides better
compile-time coverage.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: a134b4143b65 ("thermal: tegra: add PM support")
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
-rw-r--r-- | drivers/thermal/tegra/soctherm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/thermal/tegra/soctherm.c b/drivers/thermal/tegra/soctherm.c index 559c74279eb8..be829d6e131c 100644 --- a/drivers/thermal/tegra/soctherm.c +++ b/drivers/thermal/tegra/soctherm.c | |||
@@ -629,7 +629,7 @@ static int tegra_soctherm_remove(struct platform_device *pdev) | |||
629 | return 0; | 629 | return 0; |
630 | } | 630 | } |
631 | 631 | ||
632 | static int soctherm_suspend(struct device *dev) | 632 | static int __maybe_unused soctherm_suspend(struct device *dev) |
633 | { | 633 | { |
634 | struct platform_device *pdev = to_platform_device(dev); | 634 | struct platform_device *pdev = to_platform_device(dev); |
635 | 635 | ||
@@ -638,7 +638,7 @@ static int soctherm_suspend(struct device *dev) | |||
638 | return 0; | 638 | return 0; |
639 | } | 639 | } |
640 | 640 | ||
641 | static int soctherm_resume(struct device *dev) | 641 | static int __maybe_unused soctherm_resume(struct device *dev) |
642 | { | 642 | { |
643 | struct platform_device *pdev = to_platform_device(dev); | 643 | struct platform_device *pdev = to_platform_device(dev); |
644 | struct tegra_soctherm *tegra = platform_get_drvdata(pdev); | 644 | struct tegra_soctherm *tegra = platform_get_drvdata(pdev); |