From e54def4ad8144ab15f826416e2e0f290ef1901b4 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 19 Jun 2024 23:00:30 +0200 Subject: Adding upstream version 6.9.2. Signed-off-by: Daniel Baumann --- sound/arm/aaci.c | 11 ++--------- sound/arm/pxa2xx-ac97.c | 7 +------ 2 files changed, 3 insertions(+), 15 deletions(-) (limited to 'sound/arm') diff --git a/sound/arm/aaci.c b/sound/arm/aaci.c index 0817ad21af..c3340b8ff3 100644 --- a/sound/arm/aaci.c +++ b/sound/arm/aaci.c @@ -737,10 +737,8 @@ static const struct snd_pcm_ops aaci_capture_ops = { /* * Power Management. */ -#ifdef CONFIG_PM static int aaci_do_suspend(struct snd_card *card) { - struct aaci *aaci = card->private_data; snd_power_change_state(card, SNDRV_CTL_POWER_D3cold); return 0; } @@ -763,12 +761,7 @@ static int aaci_resume(struct device *dev) return card ? aaci_do_resume(card) : 0; } -static SIMPLE_DEV_PM_OPS(aaci_dev_pm_ops, aaci_suspend, aaci_resume); -#define AACI_DEV_PM_OPS (&aaci_dev_pm_ops) -#else -#define AACI_DEV_PM_OPS NULL -#endif - +static DEFINE_SIMPLE_DEV_PM_OPS(aaci_dev_pm_ops, aaci_suspend, aaci_resume); static const struct ac97_pcm ac97_defs[] = { [0] = { /* Front PCM */ @@ -1081,7 +1074,7 @@ MODULE_DEVICE_TABLE(amba, aaci_ids); static struct amba_driver aaci_driver = { .drv = { .name = DRIVER_NAME, - .pm = AACI_DEV_PM_OPS, + .pm = &aaci_dev_pm_ops, }, .probe = aaci_probe, .remove = aaci_remove, diff --git a/sound/arm/pxa2xx-ac97.c b/sound/arm/pxa2xx-ac97.c index 2d83ad91f9..4c367e73b2 100644 --- a/sound/arm/pxa2xx-ac97.c +++ b/sound/arm/pxa2xx-ac97.c @@ -111,8 +111,6 @@ static int pxa2xx_ac97_pcm_prepare(struct snd_pcm_substream *substream) return snd_ac97_set_rate(pxa2xx_ac97_ac97, reg, runtime->rate); } -#ifdef CONFIG_PM_SLEEP - static int pxa2xx_ac97_do_suspend(struct snd_card *card) { pxa2xx_audio_ops_t *platform_ops = card->dev->platform_data; @@ -164,8 +162,7 @@ static int pxa2xx_ac97_resume(struct device *dev) return ret; } -static SIMPLE_DEV_PM_OPS(pxa2xx_ac97_pm_ops, pxa2xx_ac97_suspend, pxa2xx_ac97_resume); -#endif +static DEFINE_SIMPLE_DEV_PM_OPS(pxa2xx_ac97_pm_ops, pxa2xx_ac97_suspend, pxa2xx_ac97_resume); static const struct snd_pcm_ops pxa2xx_ac97_pcm_ops = { .open = pxa2xx_ac97_pcm_open, @@ -277,9 +274,7 @@ static struct platform_driver pxa2xx_ac97_driver = { .remove_new = pxa2xx_ac97_remove, .driver = { .name = "pxa2xx-ac97", -#ifdef CONFIG_PM_SLEEP .pm = &pxa2xx_ac97_pm_ops, -#endif }, }; -- cgit v1.2.3