summaryrefslogtreecommitdiffstats
path: root/sound/soc/generic
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2021-04-16 09:11:47 +0200
committerMark Brown <broonie@kernel.org>2021-04-16 16:54:48 +0100
commit343e55e71877415a23372388b3e0c59a9bba42f6 (patch)
tree382d535a86ba49d445bb9e806b0c5344eab1f84c /sound/soc/generic
parent0f687d826736a5b4eee03170382fe54d413b912a (diff)
downloadlinux-343e55e71877415a23372388b3e0c59a9bba42f6.tar.bz2
ASoC: simple-card-utils: Increase maximum number of links to 128
On Tegra186 and later, the number of links can go up to 72, so bump the maximum number of links to the next power of two (128). Fixes: f2138aed231c ("ASoC: simple-card-utils: enable flexible CPU/Codec/Platform") Signed-off-by: Thierry Reding <treding@nvidia.com> Link: https://lore.kernel.org/r/20210416071147.2149109-2-thierry.reding@gmail.com Reviewed-by: Jon Hunter <jonathanh@nvidia.com> Tested-by: Jon Hunter <jonathanh@nvidia.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/generic')
-rw-r--r--sound/soc/generic/audio-graph-card.c4
-rw-r--r--sound/soc/generic/simple-card.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/sound/soc/generic/audio-graph-card.c b/sound/soc/generic/audio-graph-card.c
index 080c1a22bfc2..c7369beee805 100644
--- a/sound/soc/generic/audio-graph-card.c
+++ b/sound/soc/generic/audio-graph-card.c
@@ -619,7 +619,7 @@ static int graph_count_noml(struct asoc_simple_priv *priv,
{
struct device *dev = simple_priv_to_dev(priv);
- if (li->link >= SNDRV_MINOR_DEVICES) {
+ if (li->link >= SNDRV_MAX_LINKS) {
dev_err(dev, "too many links\n");
return -EINVAL;
}
@@ -642,7 +642,7 @@ static int graph_count_dpcm(struct asoc_simple_priv *priv,
{
struct device *dev = simple_priv_to_dev(priv);
- if (li->link >= SNDRV_MINOR_DEVICES) {
+ if (li->link >= SNDRV_MAX_LINKS) {
dev_err(dev, "too many links\n");
return -EINVAL;
}
diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
index e05539b5f997..8b9964d25757 100644
--- a/sound/soc/generic/simple-card.c
+++ b/sound/soc/generic/simple-card.c
@@ -482,7 +482,7 @@ static int simple_count_noml(struct asoc_simple_priv *priv,
struct device_node *codec,
struct link_info *li, bool is_top)
{
- if (li->link >= SNDRV_MINOR_DEVICES) {
+ if (li->link >= SNDRV_MAX_LINKS) {
struct device *dev = simple_priv_to_dev(priv);
dev_err(dev, "too many links\n");
@@ -503,7 +503,7 @@ static int simple_count_dpcm(struct asoc_simple_priv *priv,
struct device_node *codec,
struct link_info *li, bool is_top)
{
- if (li->link >= SNDRV_MINOR_DEVICES) {
+ if (li->link >= SNDRV_MAX_LINKS) {
struct device *dev = simple_priv_to_dev(priv);
dev_err(dev, "too many links\n");