diff mbox series

[2/4] ASoC: loongson: fix unused PM function warning

Message ID 20230616090156.2347850-2-arnd@kernel.org
State New
Headers show
Series [1/4] ASoC: max98388: fix unused function warnings | expand

Commit Message

Arnd Bergmann June 16, 2023, 9 a.m. UTC
From: Arnd Bergmann <arnd@arndb.de>

Build testing without CONFIG_PM_SLEEP causes a warning:

sound/soc/loongson/loongson_i2s.c:246:12: error: unused function 'i2s_suspend' [-Werror,-Wunused-function]
sound/soc/loongson/loongson_i2s.c:255:12: error: unused function 'i2s_resume' [-Werror,-Wunused-function]

Use the modern SYSTEM_SLEEP_PM_OPS() instead of the old one to avoid this.

Fixes: d24028606e764 ("ASoC: loongson: Add Loongson ASoC Sound Card Support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 sound/soc/loongson/loongson_i2s.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Randy Dunlap June 17, 2023, 4:08 a.m. UTC | #1
On 6/16/23 02:00, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> Build testing without CONFIG_PM_SLEEP causes a warning:
> 
> sound/soc/loongson/loongson_i2s.c:246:12: error: unused function 'i2s_suspend' [-Werror,-Wunused-function]
> sound/soc/loongson/loongson_i2s.c:255:12: error: unused function 'i2s_resume' [-Werror,-Wunused-function]
> 
> Use the modern SYSTEM_SLEEP_PM_OPS() instead of the old one to avoid this.
> 
> Fixes: d24028606e764 ("ASoC: loongson: Add Loongson ASoC Sound Card Support")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org> # build-tested

Thanks.

> ---
>  sound/soc/loongson/loongson_i2s.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sound/soc/loongson/loongson_i2s.c b/sound/soc/loongson/loongson_i2s.c
> index 35d34568be79e..f73b6d6f16c23 100644
> --- a/sound/soc/loongson/loongson_i2s.c
> +++ b/sound/soc/loongson/loongson_i2s.c
> @@ -265,5 +265,5 @@ static int i2s_resume(struct device *dev)
>  }
>  
>  const struct dev_pm_ops loongson_i2s_pm = {
> -	SET_SYSTEM_SLEEP_PM_OPS(i2s_suspend, i2s_resume)
> +	SYSTEM_SLEEP_PM_OPS(i2s_suspend, i2s_resume)
>  };
diff mbox series

Patch

diff --git a/sound/soc/loongson/loongson_i2s.c b/sound/soc/loongson/loongson_i2s.c
index 35d34568be79e..f73b6d6f16c23 100644
--- a/sound/soc/loongson/loongson_i2s.c
+++ b/sound/soc/loongson/loongson_i2s.c
@@ -265,5 +265,5 @@  static int i2s_resume(struct device *dev)
 }
 
 const struct dev_pm_ops loongson_i2s_pm = {
-	SET_SYSTEM_SLEEP_PM_OPS(i2s_suspend, i2s_resume)
+	SYSTEM_SLEEP_PM_OPS(i2s_suspend, i2s_resume)
 };