diff --git a/sound/soc/tegra-alt/machine_drivers/tegra_machine_driver_mobile.c b/sound/soc/tegra-alt/machine_drivers/tegra_machine_driver_mobile.c index 46ce2bfd..26f41e11 100644 --- a/sound/soc/tegra-alt/machine_drivers/tegra_machine_driver_mobile.c +++ b/sound/soc/tegra-alt/machine_drivers/tegra_machine_driver_mobile.c @@ -408,13 +408,7 @@ static int tegra_machine_set_params(struct snd_soc_card *card, (1ULL << SNDRV_PCM_FORMAT_S32_LE) : formats; /* update dai link hw_params */ -#if KERNEL_VERSION(4, 5, 0) > LINUX_VERSION_CODE - for (idx = 0; idx < num_of_dai_links;) { - rtd = &card->rtd[idx]; - -#else list_for_each_entry(rtd, &card->rtd_list, list) { -#endif if (rtd->dai_link->params) { struct snd_soc_pcm_stream *dai_params; @@ -702,14 +696,7 @@ static int tegra_machine_suspend_pre(struct snd_soc_card *card) struct snd_soc_pcm_runtime *rtd; /* DAPM dai link stream work for non pcm links */ -#if KERNEL_VERSION(4, 5, 0) > LINUX_VERSION_CODE - unsigned int idx; - - for (idx = 0; idx < card->num_rtd; idx++) { - rtd = &card->rtd[idx]; -#else list_for_each_entry(rtd, &card->rtd_list, list) { -#endif if (rtd->dai_link->params) INIT_DELAYED_WORK(&rtd->delayed_work, NULL); } @@ -1009,17 +996,7 @@ static const struct of_device_id tegra_machine_of_match[] = { static void __maybe_unused ignore_suspend(struct snd_soc_card *card) { struct snd_soc_pcm_runtime *rtd; -#if KERNEL_VERSION(4, 5, 0) > LINUX_VERSION_CODE - struct tegra_machine *machine = snd_soc_card_get_drvdata(card); - int idx; - int num_of_dai_links = machine->soc_data->num_xbar_dai_links + - machine->num_codec_links; - - for (idx = 0; idx < num_of_dai_links; idx++) { - rtd = &card->rtd[idx]; -#else list_for_each_entry(rtd, &card->rtd_list, list) { -#endif rtd->dai_link->ignore_suspend = true; } } diff --git a/sound/soc/tegra-alt/utils/tegra_asoc_machine_alt.c b/sound/soc/tegra-alt/utils/tegra_asoc_machine_alt.c index 0b43a624..5e202fe9 100644 --- a/sound/soc/tegra-alt/utils/tegra_asoc_machine_alt.c +++ b/sound/soc/tegra-alt/utils/tegra_asoc_machine_alt.c @@ -3896,14 +3896,8 @@ int tegra_machine_add_i2s_codec_controls(struct snd_soc_card *card, char name[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; unsigned int id; int ret; -#if KERNEL_VERSION(4, 5, 0) > LINUX_VERSION_CODE - unsigned int i; - for (i = 0; i < num_dai_links; i++) { - rtd = &card->rtd[i]; -#else list_for_each_entry(rtd, &card->rtd_list, list) { -#endif np = rtd->dai_link->cpu_of_node; if (!np)