summaryrefslogtreecommitdiff
path: root/sound/soc/renesas/rcar/core.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/renesas/rcar/core.c')
-rw-r--r--sound/soc/renesas/rcar/core.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/sound/soc/renesas/rcar/core.c b/sound/soc/renesas/rcar/core.c
index f3f0c3f0bb9f..a72f36d3ca2c 100644
--- a/sound/soc/renesas/rcar/core.c
+++ b/sound/soc/renesas/rcar/core.c
@@ -597,7 +597,7 @@ int rsnd_dai_connect(struct rsnd_mod *mod,
dev_dbg(dev, "%s is connected to io (%s)\n",
rsnd_mod_name(mod),
- rsnd_io_is_play(io) ? "Playback" : "Capture");
+ snd_pcm_direction_name(io->substream->stream));
return 0;
}
@@ -1482,8 +1482,13 @@ static int rsnd_dai_probe(struct rsnd_priv *priv)
int dai_i;
nr = rsnd_dai_of_node(priv, &is_graph);
+
+ /*
+ * There is a case that it is used only for ADG (Sound Clock).
+ * No DAI is not error
+ */
if (!nr)
- return -EINVAL;
+ return 0;
rdrv = devm_kcalloc(dev, nr, sizeof(*rdrv), GFP_KERNEL);
rdai = devm_kcalloc(dev, nr, sizeof(*rdai), GFP_KERNEL);
@@ -2059,7 +2064,7 @@ static void rsnd_remove(struct platform_device *pdev)
remove_func[i](priv);
}
-static int __maybe_unused rsnd_suspend(struct device *dev)
+static int rsnd_suspend(struct device *dev)
{
struct rsnd_priv *priv = dev_get_drvdata(dev);
@@ -2068,7 +2073,7 @@ static int __maybe_unused rsnd_suspend(struct device *dev)
return 0;
}
-static int __maybe_unused rsnd_resume(struct device *dev)
+static int rsnd_resume(struct device *dev)
{
struct rsnd_priv *priv = dev_get_drvdata(dev);
@@ -2076,13 +2081,13 @@ static int __maybe_unused rsnd_resume(struct device *dev)
}
static const struct dev_pm_ops rsnd_pm_ops = {
- SET_SYSTEM_SLEEP_PM_OPS(rsnd_suspend, rsnd_resume)
+ SYSTEM_SLEEP_PM_OPS(rsnd_suspend, rsnd_resume)
};
static struct platform_driver rsnd_driver = {
.driver = {
.name = "rcar_sound",
- .pm = &rsnd_pm_ops,
+ .pm = pm_ptr(&rsnd_pm_ops),
.of_match_table = rsnd_of_match,
},
.probe = rsnd_probe,