ASoC: soc-core: add for_each_xxx macro for aux_dev
To be more readable code, this patch adds new for_each_xxx() macro for aux_dev. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87ftmc6w8s.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
Este commit está contenido en:

cometido por
Mark Brown

padre
b812cd5864
commit
c2b71c7103
@@ -111,6 +111,7 @@ static void axg_card_clean_references(struct axg_card *priv)
|
||||
struct snd_soc_card *card = &priv->card;
|
||||
struct snd_soc_dai_link *link;
|
||||
struct snd_soc_dai_link_component *codec;
|
||||
struct snd_soc_aux_dev *aux;
|
||||
int i, j;
|
||||
|
||||
if (card->dai_link) {
|
||||
@@ -123,8 +124,8 @@ static void axg_card_clean_references(struct axg_card *priv)
|
||||
}
|
||||
|
||||
if (card->aux_dev) {
|
||||
for (i = 0; i < card->num_aux_devs; i++)
|
||||
of_node_put(card->aux_dev[i].dlc.of_node);
|
||||
for_each_card_pre_auxs(card, i, aux)
|
||||
of_node_put(aux->dlc.of_node);
|
||||
}
|
||||
|
||||
kfree(card->dai_link);
|
||||
@@ -157,7 +158,7 @@ static int axg_card_add_aux_devices(struct snd_soc_card *card)
|
||||
card->aux_dev = aux;
|
||||
card->num_aux_devs = num;
|
||||
|
||||
for (i = 0; i < card->num_aux_devs; i++, aux++) {
|
||||
for_each_card_pre_auxs(card, i, aux) {
|
||||
aux->dlc.of_node =
|
||||
of_parse_phandle(node, "audio-aux-devs", i);
|
||||
if (!aux->dlc.of_node)
|
||||
|
Referencia en una nueva incidencia
Block a user