ASoC: core: ensure component names are unique
authorJerome Brunet <jbrunet@baylibre.com>
Fri, 14 Feb 2020 13:47:04 +0000 (14:47 +0100)
committerMark Brown <broonie@kernel.org>
Fri, 14 Feb 2020 17:15:57 +0000 (17:15 +0000)
commitb2354e4009a773c00054b964d937e1b81cb92078
treefc500fea1b3379b63e3831fdaa89818334a3847b
parente37a0c313a0f8ba0b8de9c30db98fbc77bd8d446
ASoC: core: ensure component names are unique

Make sure each ASoC component is registered with a unique name.
The component is derived from the device name. If a device registers more
than one component, the component names will be the same.

This usually brings up a warning about the debugfs directory creation of
the component since directory already exists.

In such case, start numbering the component of the device so the names
don't collide anymore.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://lore.kernel.org/r/20200214134704.342501-1-jbrunet@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-core.c