ASoC: rockchip: i2s_tdm: Dup static DAI template
authorNicolas Frattaroli <frattaroli.nicolas@gmail.com>
Thu, 25 Nov 2021 08:48:59 +0000 (09:48 +0100)
committerMark Brown <broonie@kernel.org>
Tue, 30 Nov 2021 13:08:01 +0000 (13:08 +0000)
commit53689f7f91a2ab0079422e1d1b6e096cf68d58f4
treeee82d59bc9de559e496026eac77391a48544f988
parent8a724d5f60904084e09de2685ff9e77bc8a40815
ASoC: rockchip: i2s_tdm: Dup static DAI template

Previously, the DAI template was used directly, which lead to
fun bugs such as "why is my channels_max changing?" when one
instantiated more than one i2s_tdm IP block in a device tree.

This change makes it so that we instead duplicate the template
struct, and then use that.

Fixes: 081068fd6414 ("ASoC: rockchip: add support for i2s-tdm controller")
Signed-off-by: Nicolas Frattaroli <frattaroli.nicolas@gmail.com>
Link: https://lore.kernel.org/r/20211125084900.417102-1-frattaroli.nicolas@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/rockchip/rockchip_i2s_tdm.c