Hi all, Today's linux-next merge of the sound tree got a conflict in: sound/soc/generic/simple-card.c between commit: 19dd0777773a ("ASoC: simple-card: fixup refcount_t underflow") from the sound-asoc-fixes tree and commit: c39291a76444 ("ASoC: simple-card: cleanup DAI link loop method - step2") from the sound tree. I fixed it up (I think - see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts. -- Cheers, Stephen Rothwell diff --cc sound/soc/generic/simple-card.c index 3fe34417ec89,08df261024cf..000000000000 --- a/sound/soc/generic/simple-card.c +++ b/sound/soc/generic/simple-card.c @@@ -401,8 -426,76 +426,76 @@@ dai_link_of_err return ret; } - static int asoc_simple_card_parse_aux_devs(struct device_node *node, - struct simple_card_data *priv) + static int simple_for_each_link(struct simple_priv *priv, + struct link_info *li, + int (*func_noml)(struct simple_priv *priv, + struct device_node *np, + struct device_node *codec, + struct link_info *li, bool is_top), + int (*func_dpcm)(struct simple_priv *priv, + struct device_node *np, + struct device_node *codec, + struct link_info *li, bool is_top)) + { + struct device *dev = simple_priv_to_dev(priv); + struct device_node *top = dev->of_node; + struct device_node *node; + bool is_top = 0; + + /* Check if it has dai-link */ + node = of_get_child_by_name(top, PREFIX "dai-link"); + if (!node) { - node = top; ++ node = of_node_get(top); + is_top = 1; + } + + /* loop for all dai-link */ + do { + struct asoc_simple_card_data adata; + struct device_node *codec; + struct device_node *np; + int num = of_get_child_count(node); + int ret; + + /* get codec */ + codec = of_get_child_by_name(node, is_top ? + PREFIX "codec" : "codec"); + if (!codec) + return -ENODEV; + + of_node_put(codec); + + /* get convert-xxx property */ + memset(&adata, 0, sizeof(adata)); + for_each_child_of_node(node, np) + simple_get_conversion(dev, np, &adata); + + /* loop for all CPU/Codec node */ + for_each_child_of_node(node, np) { + /* + * It is DPCM + * if it has many CPUs, + * or has convert-xxx property + */ + if (num > 2 || + adata.convert_rate || adata.convert_channels) + ret = func_dpcm(priv, np, codec, li, is_top); + /* else normal sound */ + else + ret = func_noml(priv, np, codec, li, is_top); + + if (ret < 0) + return ret; + } + + node = of_get_next_child(top, node); + } while (!is_top && node); + + return 0; + } + + static int simple_parse_aux_devs(struct device_node *node, + struct simple_priv *priv) { struct device *dev = simple_priv_to_dev(priv); struct device_node *aux_node;
Attachment:
pgpnlK3O4CLnW.pgp
Description: OpenPGP digital signature