From 793e0fca25fa756884851e445da11bae8099c09c Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Fri, 11 Jan 2019 18:04:10 +0100 Subject: ALSA: arm: Remove superfluous snd_pcm_suspend*() calls The call of snd_pcm_suspend_all() & co became superfluous since we call it in the PCM PM ops. Let's remove them. Reviewed-by: Jaroslav Kysela Signed-off-by: Takashi Iwai --- sound/arm/aaci.c | 1 - sound/arm/pxa2xx-ac97.c | 1 - 2 files changed, 2 deletions(-) (limited to 'sound/arm') diff --git a/sound/arm/aaci.c b/sound/arm/aaci.c index 0114ffed56dd..0c3f073e2600 100644 --- a/sound/arm/aaci.c +++ b/sound/arm/aaci.c @@ -757,7 +757,6 @@ static int aaci_do_suspend(struct snd_card *card) { struct aaci *aaci = card->private_data; snd_power_change_state(card, SNDRV_CTL_POWER_D3cold); - snd_pcm_suspend_all(aaci->pcm); return 0; } diff --git a/sound/arm/pxa2xx-ac97.c b/sound/arm/pxa2xx-ac97.c index 1f72672262d0..68fe5bb11eea 100644 --- a/sound/arm/pxa2xx-ac97.c +++ b/sound/arm/pxa2xx-ac97.c @@ -124,7 +124,6 @@ static int pxa2xx_ac97_do_suspend(struct snd_card *card) pxa2xx_audio_ops_t *platform_ops = card->dev->platform_data; snd_power_change_state(card, SNDRV_CTL_POWER_D3cold); - snd_pcm_suspend_all(pxa2xx_ac97_pcm); snd_ac97_suspend(pxa2xx_ac97_ac97); if (platform_ops && platform_ops->suspend) platform_ops->suspend(platform_ops->priv); -- cgit v1.2.3 From bc70a9d70052c45483c2ef6a7fe08638cf88f490 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Mon, 4 Feb 2019 14:26:27 +0100 Subject: ALSA: arm: Avoid passing NULL to memory allocators We should pass a proper non-NULL device object to memory allocators although it was accepted in the past. The card->dev points to the most appropriate device object in such a case, so let's put it. Acked-by: Christoph Hellwig Signed-off-by: Takashi Iwai --- sound/arm/aaci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sound/arm') diff --git a/sound/arm/aaci.c b/sound/arm/aaci.c index 0c3f073e2600..a2d4b41096e0 100644 --- a/sound/arm/aaci.c +++ b/sound/arm/aaci.c @@ -941,7 +941,8 @@ static int aaci_init_pcm(struct aaci *aaci) snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &aaci_playback_ops); snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &aaci_capture_ops); snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, - NULL, 0, 64 * 1024); + aaci->card->dev, + 0, 64 * 1024); } return ret; -- cgit v1.2.3