hc
2023-12-06 08f87f769b595151be1afeff53e144f543faa614
kernel/sound/soc/samsung/s3c24xx_simtec.c
....@@ -1,11 +1,6 @@
1
-/* sound/soc/samsung/s3c24xx_simtec.c
2
- *
3
- * Copyright 2009 Simtec Electronics
4
- *
5
- * This program is free software; you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License version 2 as
7
- * published by the Free Software Foundation.
8
-*/
1
+// SPDX-License-Identifier: GPL-2.0
2
+//
3
+// Copyright 2009 Simtec Electronics
94
105 #include <linux/gpio.h>
116 #include <linux/clk.h>
....@@ -164,9 +159,9 @@
164159 static int simtec_hw_params(struct snd_pcm_substream *substream,
165160 struct snd_pcm_hw_params *params)
166161 {
167
- struct snd_soc_pcm_runtime *rtd = substream->private_data;
168
- struct snd_soc_dai *codec_dai = rtd->codec_dai;
169
- struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
162
+ struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
163
+ struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
164
+ struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
170165 int ret;
171166
172167 ret = snd_soc_dai_set_sysclk(codec_dai, 0,