]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ASoC: sh: rsnd: remove snd_pcm_ops
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Wed, 2 Oct 2019 05:33:01 +0000 (14:33 +0900)
committerMark Brown <broonie@kernel.org>
Tue, 8 Oct 2019 12:45:21 +0000 (13:45 +0100)
snd_pcm_ops is no longer needed.
Let's use component driver callback.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/871rvvaf02.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sh/rcar/core.c

index bda5b958d0dc5c17b1681212fe5cb96377fd2b31..4bed26842095627160e70c5613f2ce7cb6000797 100644 (file)
@@ -1373,8 +1373,9 @@ static int rsnd_dai_probe(struct rsnd_priv *priv)
 /*
  *             pcm ops
  */
-static int rsnd_hw_params(struct snd_pcm_substream *substream,
-                        struct snd_pcm_hw_params *hw_params)
+static int rsnd_hw_params(struct snd_soc_component *component,
+                         struct snd_pcm_substream *substream,
+                         struct snd_pcm_hw_params *hw_params)
 {
        struct snd_soc_dai *dai = rsnd_substream_to_dai(substream);
        struct rsnd_dai *rdai = rsnd_dai_to_rdai(dai);
@@ -1421,7 +1422,8 @@ static int rsnd_hw_params(struct snd_pcm_substream *substream,
                                        params_buffer_bytes(hw_params));
 }
 
-static int rsnd_hw_free(struct snd_pcm_substream *substream)
+static int rsnd_hw_free(struct snd_soc_component *component,
+                       struct snd_pcm_substream *substream)
 {
        struct snd_soc_dai *dai = rsnd_substream_to_dai(substream);
        struct rsnd_dai *rdai = rsnd_dai_to_rdai(dai);
@@ -1435,7 +1437,8 @@ static int rsnd_hw_free(struct snd_pcm_substream *substream)
        return snd_pcm_lib_free_pages(substream);
 }
 
-static snd_pcm_uframes_t rsnd_pointer(struct snd_pcm_substream *substream)
+static snd_pcm_uframes_t rsnd_pointer(struct snd_soc_component *component,
+                                     struct snd_pcm_substream *substream)
 {
        struct snd_soc_dai *dai = rsnd_substream_to_dai(substream);
        struct rsnd_dai *rdai = rsnd_dai_to_rdai(dai);
@@ -1447,13 +1450,6 @@ static snd_pcm_uframes_t rsnd_pointer(struct snd_pcm_substream *substream)
        return pointer;
 }
 
-static const struct snd_pcm_ops rsnd_pcm_ops = {
-       .ioctl          = snd_pcm_lib_ioctl,
-       .hw_params      = rsnd_hw_params,
-       .hw_free        = rsnd_hw_free,
-       .pointer        = rsnd_pointer,
-};
-
 /*
  *             snd_kcontrol
  */
@@ -1647,8 +1643,11 @@ int rsnd_kctrl_new(struct rsnd_mod *mod,
  *             snd_soc_component
  */
 static const struct snd_soc_component_driver rsnd_soc_component = {
-       .ops            = &rsnd_pcm_ops,
        .name           = "rsnd",
+       .ioctl          = snd_soc_pcm_lib_ioctl,
+       .hw_params      = rsnd_hw_params,
+       .hw_free        = rsnd_hw_free,
+       .pointer        = rsnd_pointer,
 };
 
 static int rsnd_rdai_continuance_probe(struct rsnd_priv *priv,