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 60e7df4..e713fec 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 d38b583..f11618e 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 d034803..b0670aa 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 6868508..9f9334e 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 6442806..81eaece 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,