Commit 38b8e6f0 authored by anish kumar's avatar anish kumar Committed by Mark Brown
Browse files

ASoC: dapm: Refactor the code in snd_soc_dapm_new_pcm



refactor snd_soc_dapm_new_pcm to reduce the size of
this function to facilitate further refactoring.

Signed-off-by: default avataranish kumar <yesanishhere@gmail.com>
Reviewed-by: default avatarCharles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent e5af4f9f
Loading
Loading
Loading
Loading
+4 −8
Original line number Diff line number Diff line
@@ -3821,20 +3821,16 @@ int snd_soc_dapm_new_pcm(struct snd_soc_card *card,
				devm_kasprintf(card->dev, GFP_KERNEL,
					       "Anonymous Configuration %d",
					       count);
			if (!w_param_text[count]) {
				ret = -ENOMEM;
				goto outfree_link_name;
			}
		} else {
			w_param_text[count] = devm_kmemdup(card->dev,
						config->stream_name,
						strlen(config->stream_name) + 1,
						GFP_KERNEL);
		}
		if (!w_param_text[count]) {
			ret = -ENOMEM;
			goto outfree_link_name;
		}
		}
		config++;
	}
	w_param_enum[0].items = num_params;