summaryrefslogtreecommitdiff
path: root/sound/soc/sof/imx/imx8.c
diff options
context:
space:
mode:
authorDaniel Baluta <daniel.baluta@nxp.com>2020-07-20 10:20:41 +0300
committerMark Brown <broonie@kernel.org>2020-07-22 12:44:58 +0100
commitbeaa7bd10dce348b033aff3f466ab1a78b33fed3 (patch)
tree666125ae8e2d2028342a33408a7c3cf365d2309a /sound/soc/sof/imx/imx8.c
parent45b7262174dcc2ca62e23220219eee1462dcada9 (diff)
ASoC: SOF: imx: Use ARRAY_SIZE instead of hardcoded value
With this change we no longer need to update num_drv when adding new DAI driver. Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Link: https://lore.kernel.org/r/20200720072046.8152-3-daniel.baluta@oss.nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/imx/imx8.c')
-rw-r--r--sound/soc/sof/imx/imx8.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/sof/imx/imx8.c b/sound/soc/sof/imx/imx8.c
index b558132bb609..c7aab646cb8e 100644
--- a/sound/soc/sof/imx/imx8.c
+++ b/sound/soc/sof/imx/imx8.c
@@ -415,7 +415,7 @@ struct snd_sof_dsp_ops sof_imx8_ops = {
/* DAI drivers */
.drv = imx8_dai,
- .num_drv = 1, /* we have only 1 ESAI interface on i.MX8 */
+ .num_drv = ARRAY_SIZE(imx8_dai),
/* ALSA HW info flags */
.hw_info = SNDRV_PCM_INFO_MMAP |
@@ -455,7 +455,7 @@ struct snd_sof_dsp_ops sof_imx8x_ops = {
/* DAI drivers */
.drv = imx8_dai,
- .num_drv = 1, /* we have only 1 ESAI interface on i.MX8 */
+ .num_drv = ARRAY_SIZE(imx8_dai),
/* ALSA HW info flags */
.hw_info = SNDRV_PCM_INFO_MMAP |