projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge tag 'mac80211-next-for-davem-2015-01-15' of git://git.kernel.org/pub/scm/linux...
[cascardo/linux.git]
/
sound
/
soc
/
soc-core.c
diff --git
a/sound/soc/soc-core.c
b/sound/soc/soc-core.c
index
985052b
..
2c62620
100644
(file)
--- a/
sound/soc/soc-core.c
+++ b/
sound/soc/soc-core.c
@@
-3230,7
+3230,7
@@
int snd_soc_of_parse_audio_routing(struct snd_soc_card *card,
const char *propname)
{
struct device_node *np = card->dev->of_node;
const char *propname)
{
struct device_node *np = card->dev->of_node;
- int num_routes
, old_routes
;
+ int num_routes;
struct snd_soc_dapm_route *routes;
int i, ret;
struct snd_soc_dapm_route *routes;
int i, ret;
@@
-3248,9
+3248,7
@@
int snd_soc_of_parse_audio_routing(struct snd_soc_card *card,
return -EINVAL;
}
return -EINVAL;
}
- old_routes = card->num_dapm_routes;
- routes = devm_kzalloc(card->dev,
- (old_routes + num_routes) * sizeof(*routes),
+ routes = devm_kzalloc(card->dev, num_routes * sizeof(*routes),
GFP_KERNEL);
if (!routes) {
dev_err(card->dev,
GFP_KERNEL);
if (!routes) {
dev_err(card->dev,
@@
-3258,11
+3256,9
@@
int snd_soc_of_parse_audio_routing(struct snd_soc_card *card,
return -EINVAL;
}
return -EINVAL;
}
- memcpy(routes, card->dapm_routes, old_routes * sizeof(*routes));
-
for (i = 0; i < num_routes; i++) {
ret = of_property_read_string_index(np, propname,
for (i = 0; i < num_routes; i++) {
ret = of_property_read_string_index(np, propname,
- 2 * i, &routes[
old_routes +
i].sink);
+ 2 * i, &routes[i].sink);
if (ret) {
dev_err(card->dev,
"ASoC: Property '%s' index %d could not be read: %d\n",
if (ret) {
dev_err(card->dev,
"ASoC: Property '%s' index %d could not be read: %d\n",
@@
-3270,7
+3266,7
@@
int snd_soc_of_parse_audio_routing(struct snd_soc_card *card,
return -EINVAL;
}
ret = of_property_read_string_index(np, propname,
return -EINVAL;
}
ret = of_property_read_string_index(np, propname,
- (2 * i) + 1, &routes[
old_routes +
i].source);
+ (2 * i) + 1, &routes[i].source);
if (ret) {
dev_err(card->dev,
"ASoC: Property '%s' index %d could not be read: %d\n",
if (ret) {
dev_err(card->dev,
"ASoC: Property '%s' index %d could not be read: %d\n",
@@
-3279,7
+3275,7
@@
int snd_soc_of_parse_audio_routing(struct snd_soc_card *card,
}
}
}
}
- card->num_dapm_routes
+
= num_routes;
+ card->num_dapm_routes = num_routes;
card->dapm_routes = routes;
return 0;
card->dapm_routes = routes;
return 0;