ASoC: soc-dai: don't overwide dai->driver->ops

Current ASoC overwrites null_dai_ops to dai->driver->ops if it
was NULL. But, we can remove it if framework always checks
dai->driver->ops when it uses DAI callbacks.
This patch do it, and removes null_dai_ops.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-By: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/87zhb1sskc.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
此提交包含在:
Kuninori Morimoto
2020-04-24 08:14:43 +09:00
提交者 Mark Brown
父節點 aa7b8230d4
當前提交 479914ed77
共有 2 個檔案被更改,包括 39 行新增24 行删除

查看文件

@@ -742,9 +742,6 @@ static inline void soc_resume_init(struct snd_soc_card *card)
}
#endif
static const struct snd_soc_dai_ops null_dai_ops = {
};
static struct device_node
*soc_component_to_node(struct snd_soc_component *component)
{
@@ -2406,8 +2403,6 @@ struct snd_soc_dai *snd_soc_register_dai(struct snd_soc_component *component,
dai->component = component;
dai->dev = dev;
dai->driver = dai_drv;
if (!dai->driver->ops)
dai->driver->ops = &null_dai_ops;
/* see for_each_component_dais */
list_add_tail(&dai->list, &component->dai_list);