ASoC: add null_snd_soc_ops and reduce NULL ops check
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tue, 26 Sep 2017 00:40:42 +0000 (00:40 +0000)
committerMark Brown <broonie@kernel.org>
Tue, 26 Sep 2017 16:19:33 +0000 (09:19 -0700)
commit75ab9eb6f15bad78b3ce274c699c27dc98ab13ce
tree22a53174bcd06a07710e8c17f521017f21a03994
parent74b33b8481e7c8a66149093f691b9082b50e24fc
ASoC: add null_snd_soc_ops and reduce NULL ops check

Double NULL pointer check for ops and ops->func is difficult to read
and might be forget to check it if new func was add.
This patch adds new null_snd_soc_ops and use it if rtd->dai_link didn't
have it to avoid NULL ops, and reduces ops NULL check.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-core.c
sound/soc/soc-pcm.c