ASoC: tegra: merge DAI call back functions into ops
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tue, 8 Aug 2023 22:56:58 +0000 (22:56 +0000)
committerMark Brown <broonie@kernel.org>
Mon, 14 Aug 2023 12:09:31 +0000 (13:09 +0100)
ALSA SoC merges DAI call backs into .ops.
This patch merge these into one.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/874jl9b0sl.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/tegra/tegra20_ac97.c
sound/soc/tegra/tegra20_i2s.c
sound/soc/tegra/tegra20_spdif.c
sound/soc/tegra/tegra210_admaif.c
sound/soc/tegra/tegra30_i2s.c

index 60e7df41c64c80642f1c1addf335a7cbf2d8fc76..e713feca25fa426fccfaf73637a781843112c0b7 100644 (file)
@@ -203,10 +203,6 @@ static int tegra20_ac97_trigger(struct snd_pcm_substream *substream, int cmd,
        return 0;
 }
 
-static const struct snd_soc_dai_ops tegra20_ac97_dai_ops = {
-       .trigger        = tegra20_ac97_trigger,
-};
-
 static int tegra20_ac97_probe(struct snd_soc_dai *dai)
 {
        struct tegra20_ac97 *ac97 = snd_soc_dai_get_drvdata(dai);
@@ -217,9 +213,13 @@ static int tegra20_ac97_probe(struct snd_soc_dai *dai)
        return 0;
 }
 
+static const struct snd_soc_dai_ops tegra20_ac97_dai_ops = {
+       .probe          = tegra20_ac97_probe,
+       .trigger        = tegra20_ac97_trigger,
+};
+
 static struct snd_soc_dai_driver tegra20_ac97_dai = {
        .name = "tegra-ac97-pcm",
-       .probe = tegra20_ac97_probe,
        .playback = {
                .stream_name = "PCM Playback",
                .channels_min = 2,
index d38b58305c6bedd5626eb29782ee2df5e9fb8faf..f11618e8f13ee250bf37fc1ec49a61b122cef502 100644 (file)
@@ -310,6 +310,7 @@ static int tegra20_i2s_startup(struct snd_pcm_substream *substream,
 }
 
 static const struct snd_soc_dai_ops tegra20_i2s_dai_ops = {
+       .probe          = tegra20_i2s_probe,
        .set_fmt        = tegra20_i2s_set_fmt,
        .hw_params      = tegra20_i2s_hw_params,
        .trigger        = tegra20_i2s_trigger,
@@ -317,7 +318,6 @@ static const struct snd_soc_dai_ops tegra20_i2s_dai_ops = {
 };
 
 static const struct snd_soc_dai_driver tegra20_i2s_dai_template = {
-       .probe = tegra20_i2s_probe,
        .playback = {
                .stream_name = "Playback",
                .channels_min = 2,
index d034803695a0617c500ecd6a3fb53325c35d865d..b0670aa4d9671140f04d3e877b5ead59944eb655 100644 (file)
@@ -241,6 +241,7 @@ static int tegra20_spdif_probe(struct snd_soc_dai *dai)
 }
 
 static const struct snd_soc_dai_ops tegra20_spdif_dai_ops = {
+       .probe = tegra20_spdif_probe,
        .hw_params = tegra20_spdif_hw_params,
        .trigger = tegra20_spdif_trigger,
        .startup = tegra20_spdif_startup,
@@ -248,7 +249,6 @@ static const struct snd_soc_dai_ops tegra20_spdif_dai_ops = {
 
 static struct snd_soc_dai_driver tegra20_spdif_dai = {
        .name = "tegra20-spdif",
-       .probe = tegra20_spdif_probe,
        .playback = {
                .stream_name = "Playback",
                .channels_min = 2,
index 6868508585a0158f9a000d3e620d2a1294d61e67..9f9334e48049005f2ec84bc6603c3d753d9b1c36 100644 (file)
@@ -419,11 +419,6 @@ static int tegra_admaif_trigger(struct snd_pcm_substream *substream, int cmd,
        }
 }
 
-static const struct snd_soc_dai_ops tegra_admaif_dai_ops = {
-       .hw_params      = tegra_admaif_hw_params,
-       .trigger        = tegra_admaif_trigger,
-};
-
 static int tegra210_admaif_pget_mono_to_stereo(struct snd_kcontrol *kcontrol,
        struct snd_ctl_elem_value *ucontrol)
 {
@@ -550,10 +545,15 @@ static int tegra_admaif_dai_probe(struct snd_soc_dai *dai)
        return 0;
 }
 
+static const struct snd_soc_dai_ops tegra_admaif_dai_ops = {
+       .probe          = tegra_admaif_dai_probe,
+       .hw_params      = tegra_admaif_hw_params,
+       .trigger        = tegra_admaif_trigger,
+};
+
 #define DAI(dai_name)                                  \
        {                                                       \
                .name = dai_name,                               \
-               .probe = tegra_admaif_dai_probe,                \
                .playback = {                                   \
                        .stream_name = dai_name " Playback",    \
                        .channels_min = 1,                      \
index 6442806030956e088e3e0dcf3fdd78351bde5c9a..81eaece511304ca1b4f6b0509dd367ce9a3348e8 100644 (file)
@@ -304,6 +304,7 @@ static int tegra30_i2s_probe(struct snd_soc_dai *dai)
 }
 
 static const struct snd_soc_dai_ops tegra30_i2s_dai_ops = {
+       .probe          = tegra30_i2s_probe,
        .set_fmt        = tegra30_i2s_set_fmt,
        .hw_params      = tegra30_i2s_hw_params,
        .trigger        = tegra30_i2s_trigger,
@@ -311,7 +312,6 @@ static const struct snd_soc_dai_ops tegra30_i2s_dai_ops = {
 };
 
 static const struct snd_soc_dai_driver tegra30_i2s_dai_template = {
-       .probe = tegra30_i2s_probe,
        .playback = {
                .stream_name = "Playback",
                .channels_min = 2,