Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
dbb55ce8
Commit
dbb55ce8
authored
Dec 08, 2014
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'asoc/topic/dapm' into asoc-next
parents
941725f5
f8781db8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
sound/soc/soc-core.c
sound/soc/soc-core.c
+9
-5
No files found.
sound/soc/soc-core.c
View file @
dbb55ce8
...
@@ -3536,7 +3536,7 @@ int snd_soc_of_parse_audio_routing(struct snd_soc_card *card,
...
@@ -3536,7 +3536,7 @@ int snd_soc_of_parse_audio_routing(struct snd_soc_card *card,
const
char
*
propname
)
const
char
*
propname
)
{
{
struct
device_node
*
np
=
card
->
dev
->
of_node
;
struct
device_node
*
np
=
card
->
dev
->
of_node
;
int
num_routes
;
int
num_routes
,
old_routes
;
struct
snd_soc_dapm_route
*
routes
;
struct
snd_soc_dapm_route
*
routes
;
int
i
,
ret
;
int
i
,
ret
;
...
@@ -3554,7 +3554,9 @@ int snd_soc_of_parse_audio_routing(struct snd_soc_card *card,
...
@@ -3554,7 +3554,9 @@ int snd_soc_of_parse_audio_routing(struct snd_soc_card *card,
return
-
EINVAL
;
return
-
EINVAL
;
}
}
routes
=
devm_kzalloc
(
card
->
dev
,
num_routes
*
sizeof
(
*
routes
),
old_routes
=
card
->
num_dapm_routes
;
routes
=
devm_kzalloc
(
card
->
dev
,
(
old_routes
+
num_routes
)
*
sizeof
(
*
routes
),
GFP_KERNEL
);
GFP_KERNEL
);
if
(
!
routes
)
{
if
(
!
routes
)
{
dev_err
(
card
->
dev
,
dev_err
(
card
->
dev
,
...
@@ -3562,9 +3564,11 @@ int snd_soc_of_parse_audio_routing(struct snd_soc_card *card,
...
@@ -3562,9 +3564,11 @@ 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
++
)
{
for
(
i
=
0
;
i
<
num_routes
;
i
++
)
{
ret
=
of_property_read_string_index
(
np
,
propname
,
ret
=
of_property_read_string_index
(
np
,
propname
,
2
*
i
,
&
routes
[
i
].
sink
);
2
*
i
,
&
routes
[
old_routes
+
i
].
sink
);
if
(
ret
)
{
if
(
ret
)
{
dev_err
(
card
->
dev
,
dev_err
(
card
->
dev
,
"ASoC: Property '%s' index %d could not be read: %d
\n
"
,
"ASoC: Property '%s' index %d could not be read: %d
\n
"
,
...
@@ -3572,7 +3576,7 @@ int snd_soc_of_parse_audio_routing(struct snd_soc_card *card,
...
@@ -3572,7 +3576,7 @@ int snd_soc_of_parse_audio_routing(struct snd_soc_card *card,
return
-
EINVAL
;
return
-
EINVAL
;
}
}
ret
=
of_property_read_string_index
(
np
,
propname
,
ret
=
of_property_read_string_index
(
np
,
propname
,
(
2
*
i
)
+
1
,
&
routes
[
i
].
source
);
(
2
*
i
)
+
1
,
&
routes
[
old_routes
+
i
].
source
);
if
(
ret
)
{
if
(
ret
)
{
dev_err
(
card
->
dev
,
dev_err
(
card
->
dev
,
"ASoC: Property '%s' index %d could not be read: %d
\n
"
,
"ASoC: Property '%s' index %d could not be read: %d
\n
"
,
...
@@ -3581,7 +3585,7 @@ int snd_soc_of_parse_audio_routing(struct snd_soc_card *card,
...
@@ -3581,7 +3585,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
;
card
->
dapm_routes
=
routes
;
return
0
;
return
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment