Commit ccd4cc3e authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Mark Brown

ASoC: tegra: mark runtime-pm functions as __maybe_unused

A reorganization of the driver source led to two of them causing
a compile time warning in some configurations:

tegra/tegra20_spdif.c:36:12: error: 'tegra20_spdif_runtime_resume' defined but not used [-Werror=unused-function]
   36 | static int tegra20_spdif_runtime_resume(struct device *dev)
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
tegra/tegra20_spdif.c:27:12: error: 'tegra20_spdif_runtime_suspend' defined but not used [-Werror=unused-function]
   27 | static int tegra20_spdif_runtime_suspend(struct device *dev)
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tegra/tegra30_ahub.c:64:12: error: 'tegra30_ahub_runtime_resume' defined but not used [-Werror=unused-function]
   64 | static int tegra30_ahub_runtime_resume(struct device *dev)
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~
tegra/tegra30_ahub.c:43:12: error: 'tegra30_ahub_runtime_suspend' defined but not used [-Werror=unused-function]
   43 | static int tegra30_ahub_runtime_suspend(struct device *dev)
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

Mark these functions as __maybe_unused to avoid this kind of warning.

Fixes: b5571449 ("ASoC: tegra30: ahub: Remove handing of disabled runtime PM")
Fixes: c53b396f ("ASoC: tegra20: spdif: Remove handing of disabled runtime PM")
Fixes: 80ec4a4c ("ASoC: tegra20: i2s: Remove handing of disabled runtime PM")
Fixes: b5f6f781 ("ASoC: tegra30: i2s: Remove handing of disabled runtime PM")
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20210422133418.1757893-1-arnd@kernel.orgSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 73371bac
......@@ -34,7 +34,7 @@
#define DRV_NAME "tegra20-i2s"
static int tegra20_i2s_runtime_suspend(struct device *dev)
static __maybe_unused int tegra20_i2s_runtime_suspend(struct device *dev)
{
struct tegra20_i2s *i2s = dev_get_drvdata(dev);
......@@ -45,7 +45,7 @@ static int tegra20_i2s_runtime_suspend(struct device *dev)
return 0;
}
static int tegra20_i2s_runtime_resume(struct device *dev)
static __maybe_unused int tegra20_i2s_runtime_resume(struct device *dev)
{
struct tegra20_i2s *i2s = dev_get_drvdata(dev);
int ret;
......
......@@ -24,7 +24,7 @@
#define DRV_NAME "tegra20-spdif"
static int tegra20_spdif_runtime_suspend(struct device *dev)
static __maybe_unused int tegra20_spdif_runtime_suspend(struct device *dev)
{
struct tegra20_spdif *spdif = dev_get_drvdata(dev);
......@@ -33,7 +33,7 @@ static int tegra20_spdif_runtime_suspend(struct device *dev)
return 0;
}
static int tegra20_spdif_runtime_resume(struct device *dev)
static __maybe_unused int tegra20_spdif_runtime_resume(struct device *dev)
{
struct tegra20_spdif *spdif = dev_get_drvdata(dev);
int ret;
......
......@@ -40,7 +40,7 @@ static inline void tegra30_audio_write(u32 reg, u32 val)
regmap_write(ahub->regmap_ahub, reg, val);
}
static int tegra30_ahub_runtime_suspend(struct device *dev)
static __maybe_unused int tegra30_ahub_runtime_suspend(struct device *dev)
{
regcache_cache_only(ahub->regmap_apbif, true);
regcache_cache_only(ahub->regmap_ahub, true);
......@@ -61,7 +61,7 @@ static int tegra30_ahub_runtime_suspend(struct device *dev)
* stopping streams should dynamically adjust the clock as required. However,
* this is not yet implemented.
*/
static int tegra30_ahub_runtime_resume(struct device *dev)
static __maybe_unused int tegra30_ahub_runtime_resume(struct device *dev)
{
int ret;
......
......@@ -36,7 +36,7 @@
#define DRV_NAME "tegra30-i2s"
static int tegra30_i2s_runtime_suspend(struct device *dev)
static __maybe_unused int tegra30_i2s_runtime_suspend(struct device *dev)
{
struct tegra30_i2s *i2s = dev_get_drvdata(dev);
......@@ -47,7 +47,7 @@ static int tegra30_i2s_runtime_suspend(struct device *dev)
return 0;
}
static int tegra30_i2s_runtime_resume(struct device *dev)
static __maybe_unused int tegra30_i2s_runtime_resume(struct device *dev)
{
struct tegra30_i2s *i2s = dev_get_drvdata(dev);
int ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment