From: Lu Guanqun Date: Tue, 6 Sep 2011 07:21:38 +0000 (+0800) Subject: ASoC: sst_platform: using builtin function X-Git-Tag: upstream/snapshot3+hdmi~7307^2~865 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=22be504aaa4a3133d81e3fb0c4287960aea19c37;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git ASoC: sst_platform: using builtin function Use the builtin snd_soc_set_runtime_hwparams() instead of assigning it by myself. Signed-off-by: Lu Guanqun Acked-by: Vinod Koul Acked-by: Liam Girdwood Signed-off-by: Mark Brown --- diff --git a/sound/soc/mid-x86/sst_platform.c b/sound/soc/mid-x86/sst_platform.c index d99f253..af666ae 100644 --- a/sound/soc/mid-x86/sst_platform.c +++ b/sound/soc/mid-x86/sst_platform.c @@ -226,13 +226,14 @@ static int sst_platform_init_stream(struct snd_pcm_substream *substream) static int sst_platform_open(struct snd_pcm_substream *substream) { - struct snd_pcm_runtime *runtime; + struct snd_pcm_runtime *runtime = substream->runtime; struct sst_runtime_stream *stream; int ret_val = 0; pr_debug("sst_platform_open called\n"); - runtime = substream->runtime; - runtime->hw = sst_platform_pcm_hw; + + snd_soc_set_runtime_hwparams(substream, &sst_platform_pcm_hw); + stream = kzalloc(sizeof(*stream), GFP_KERNEL); if (!stream) return -ENOMEM;