Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: pxa: use asoc_substream_to_rtd()

Now we can use asoc_substream_to_rtd() macro,
let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87k0yz0yua.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Kuninori Morimoto and committed by
Mark Brown
83b95c2f c101ce88

+17 -17
+1 -1
sound/soc/pxa/brownstone.c
··· 43 43 static int brownstone_wm8994_hw_params(struct snd_pcm_substream *substream, 44 44 struct snd_pcm_hw_params *params) 45 45 { 46 - struct snd_soc_pcm_runtime *rtd = substream->private_data; 46 + struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 47 47 struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 48 48 struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 49 49 int freq_out, sspa_mclk, sysclk;
+2 -2
sound/soc/pxa/corgi.c
··· 96 96 97 97 static int corgi_startup(struct snd_pcm_substream *substream) 98 98 { 99 - struct snd_soc_pcm_runtime *rtd = substream->private_data; 99 + struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 100 100 101 101 /* check the jack status at stream startup */ 102 102 corgi_ext_control(&rtd->card->dapm); ··· 115 115 static int corgi_hw_params(struct snd_pcm_substream *substream, 116 116 struct snd_pcm_hw_params *params) 117 117 { 118 - struct snd_soc_pcm_runtime *rtd = substream->private_data; 118 + struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 119 119 struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 120 120 struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 121 121 unsigned int clk = 0;
+1 -1
sound/soc/pxa/hx4700.c
··· 53 53 static int hx4700_hw_params(struct snd_pcm_substream *substream, 54 54 struct snd_pcm_hw_params *params) 55 55 { 56 - struct snd_soc_pcm_runtime *rtd = substream->private_data; 56 + struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 57 57 struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 58 58 struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 59 59 int ret = 0;
+1 -1
sound/soc/pxa/imote2.c
··· 11 11 static int imote2_asoc_hw_params(struct snd_pcm_substream *substream, 12 12 struct snd_pcm_hw_params *params) 13 13 { 14 - struct snd_soc_pcm_runtime *rtd = substream->private_data; 14 + struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 15 15 struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 16 16 struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 17 17 unsigned int clk = 0;
+3 -3
sound/soc/pxa/magician.c
··· 68 68 69 69 static int magician_startup(struct snd_pcm_substream *substream) 70 70 { 71 - struct snd_soc_pcm_runtime *rtd = substream->private_data; 71 + struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 72 72 73 73 /* check the jack status at stream startup */ 74 74 magician_ext_control(&rtd->card->dapm); ··· 82 82 static int magician_playback_hw_params(struct snd_pcm_substream *substream, 83 83 struct snd_pcm_hw_params *params) 84 84 { 85 - struct snd_soc_pcm_runtime *rtd = substream->private_data; 85 + struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 86 86 struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 87 87 struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 88 88 unsigned int width; ··· 120 120 static int magician_capture_hw_params(struct snd_pcm_substream *substream, 121 121 struct snd_pcm_hw_params *params) 122 122 { 123 - struct snd_soc_pcm_runtime *rtd = substream->private_data; 123 + struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 124 124 struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 125 125 struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 126 126 int ret = 0;
+1 -1
sound/soc/pxa/mmp-pcm.c
··· 110 110 static int mmp_pcm_open(struct snd_soc_component *component, 111 111 struct snd_pcm_substream *substream) 112 112 { 113 - struct snd_soc_pcm_runtime *rtd = substream->private_data; 113 + struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 114 114 struct platform_device *pdev = to_platform_device(component->dev); 115 115 struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 116 116 struct mmp_dma_data dma_data;
+2 -2
sound/soc/pxa/poodle.c
··· 68 68 69 69 static int poodle_startup(struct snd_pcm_substream *substream) 70 70 { 71 - struct snd_soc_pcm_runtime *rtd = substream->private_data; 71 + struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 72 72 73 73 /* check the jack status at stream startup */ 74 74 poodle_ext_control(&rtd->card->dapm); ··· 89 89 static int poodle_hw_params(struct snd_pcm_substream *substream, 90 90 struct snd_pcm_hw_params *params) 91 91 { 92 - struct snd_soc_pcm_runtime *rtd = substream->private_data; 92 + struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 93 93 struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 94 94 struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 95 95 unsigned int clk = 0;
+1 -1
sound/soc/pxa/pxa2xx-i2s.c
··· 95 95 static int pxa2xx_i2s_startup(struct snd_pcm_substream *substream, 96 96 struct snd_soc_dai *dai) 97 97 { 98 - struct snd_soc_pcm_runtime *rtd = substream->private_data; 98 + struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 99 99 struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 100 100 101 101 if (IS_ERR(clk_i2s))
+2 -2
sound/soc/pxa/spitz.c
··· 105 105 106 106 static int spitz_startup(struct snd_pcm_substream *substream) 107 107 { 108 - struct snd_soc_pcm_runtime *rtd = substream->private_data; 108 + struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 109 109 110 110 /* check the jack status at stream startup */ 111 111 spitz_ext_control(&rtd->card->dapm); ··· 116 116 static int spitz_hw_params(struct snd_pcm_substream *substream, 117 117 struct snd_pcm_hw_params *params) 118 118 { 119 - struct snd_soc_pcm_runtime *rtd = substream->private_data; 119 + struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 120 120 struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 121 121 struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 122 122 unsigned int clk = 0;
+1 -1
sound/soc/pxa/tosa.c
··· 72 72 73 73 static int tosa_startup(struct snd_pcm_substream *substream) 74 74 { 75 - struct snd_soc_pcm_runtime *rtd = substream->private_data; 75 + struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 76 76 77 77 /* check the jack status at stream startup */ 78 78 tosa_ext_control(&rtd->card->dapm);
+1 -1
sound/soc/pxa/z2.c
··· 33 33 static int z2_hw_params(struct snd_pcm_substream *substream, 34 34 struct snd_pcm_hw_params *params) 35 35 { 36 - struct snd_soc_pcm_runtime *rtd = substream->private_data; 36 + struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 37 37 struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 38 38 struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 39 39 unsigned int clk = 0;
+1 -1
sound/soc/pxa/zylonite.c
··· 75 75 static int zylonite_voice_hw_params(struct snd_pcm_substream *substream, 76 76 struct snd_pcm_hw_params *params) 77 77 { 78 - struct snd_soc_pcm_runtime *rtd = substream->private_data; 78 + struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); 79 79 struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0); 80 80 struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); 81 81 unsigned int wm9713_div = 0;