2023-06-16 09:09:07

by Arnd Bergmann

[permalink] [raw]
Subject: [PATCH 2/4] ASoC: loongson: fix unused PM function warning

From: Arnd Bergmann <[email protected]>

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 <[email protected]>
---
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)
};
--
2.39.2



2023-06-17 04:14:14

by Randy Dunlap

[permalink] [raw]
Subject: Re: [PATCH 2/4] ASoC: loongson: fix unused PM function warning



On 6/16/23 02:00, Arnd Bergmann wrote:
> From: Arnd Bergmann <[email protected]>
>
> 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 <[email protected]>

Acked-by: Randy Dunlap <[email protected]>
Tested-by: Randy Dunlap <[email protected]> # 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)
> };

--
~Randy