Making this dynamic doesn't really save much memory and makes the code more complex for no good reason
Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com --- src/drivers/apl-ssp.c | 6 +++--- src/drivers/byt-ssp.c | 6 +++--- src/include/uapi/ipc.h | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/src/drivers/apl-ssp.c b/src/drivers/apl-ssp.c index 30bebb7..ac46b80 100644 --- a/src/drivers/apl-ssp.c +++ b/src/drivers/apl-ssp.c @@ -150,7 +150,7 @@ static inline int ssp_set_config(struct dai *dai, sspsp = 0;
ssp->config = *config; - ssp->params = config->ssp[0]; + ssp->params = config->ssp;
/* sspsp2 no dynamic setting */ sspsp2 = 0x0; @@ -231,10 +231,10 @@ static inline int ssp_set_config(struct dai *dai,
#ifdef CLK_TYPE /* not enabled, keep the code for reference */ /* TODO: allow topology to define SSP clock type */ - config->ssp[0].clk_id = SSP_CLK_EXT; + config->ssp.clk_id = SSP_CLK_EXT;
/* clock source */ - switch (config->ssp[0].clk_id) { + switch (config->ssp.clk_id) { case SSP_CLK_AUDIO: sscr0 |= SSCR0_ACS; break; diff --git a/src/drivers/byt-ssp.c b/src/drivers/byt-ssp.c index 0bdeee5..c8a4f31 100644 --- a/src/drivers/byt-ssp.c +++ b/src/drivers/byt-ssp.c @@ -166,7 +166,7 @@ static inline int ssp_set_config(struct dai *dai, sspsp = SSPSP_ETDS; /* make sure SDO line is tri-stated when inactive */
ssp->config = *config; - ssp->params = config->ssp[0]; + ssp->params = config->ssp;
/* clock masters */ /* @@ -240,10 +240,10 @@ static inline int ssp_set_config(struct dai *dai,
#ifdef CLK_TYPE /* not enabled, keep the code for reference */ /* TODO: allow topology to define SSP clock type */ - config->ssp[0].clk_id = SSP_CLK_EXT; + config->ssp.clk_id = SSP_CLK_EXT;
/* clock source */ - switch (config->ssp[0].clk_id) { + switch (config->ssp.clk_id) { case SSP_CLK_AUDIO: sscr0 |= SSCR0_ACS; break; diff --git a/src/include/uapi/ipc.h b/src/include/uapi/ipc.h index 7d4b3fb..9a22c69 100644 --- a/src/include/uapi/ipc.h +++ b/src/include/uapi/ipc.h @@ -282,9 +282,9 @@ struct sof_ipc_dai_config {
/* HW specific data */ union { - struct sof_ipc_dai_ssp_params ssp[0]; - struct sof_ipc_dai_hda_params hda[0]; - struct sof_ipc_dai_dmic_params dmic[0]; + struct sof_ipc_dai_ssp_params ssp; + struct sof_ipc_dai_hda_params hda; + struct sof_ipc_dai_dmic_params dmic; }; };