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
0d1fe0d4
Commit
0d1fe0d4
authored
Dec 03, 2011
by
Mark Brown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ASoC: Convert WM8350 to devm_kzalloc()
Signed-off-by:
Mark Brown
<
broonie@opensource.wolfsonmicro.com
>
parent
b03e96e4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
7 deletions
+4
-7
sound/soc/codecs/wm8350.c
sound/soc/codecs/wm8350.c
+4
-7
No files found.
sound/soc/codecs/wm8350.c
View file @
0d1fe0d4
...
...
@@ -1553,7 +1553,8 @@ static int wm8350_codec_probe(struct snd_soc_codec *codec)
return
-
EINVAL
;
}
priv
=
kzalloc
(
sizeof
(
struct
wm8350_data
),
GFP_KERNEL
);
priv
=
devm_kzalloc
(
codec
->
dev
,
sizeof
(
struct
wm8350_data
),
GFP_KERNEL
);
if
(
priv
==
NULL
)
return
-
ENOMEM
;
snd_soc_codec_set_drvdata
(
codec
,
priv
);
...
...
@@ -1564,7 +1565,7 @@ static int wm8350_codec_probe(struct snd_soc_codec *codec)
ret
=
regulator_bulk_get
(
wm8350
->
dev
,
ARRAY_SIZE
(
priv
->
supplies
),
priv
->
supplies
);
if
(
ret
!=
0
)
goto
err_priv
;
return
ret
;
wm8350
->
codec
.
codec
=
codec
;
codec
->
control_data
=
wm8350
;
...
...
@@ -1640,10 +1641,6 @@ static int wm8350_codec_probe(struct snd_soc_codec *codec)
wm8350_set_bias_level
(
codec
,
SND_SOC_BIAS_STANDBY
);
return
0
;
err_priv:
kfree
(
priv
);
return
ret
;
}
static
int
wm8350_codec_remove
(
struct
snd_soc_codec
*
codec
)
...
...
@@ -1676,7 +1673,7 @@ static int wm8350_codec_remove(struct snd_soc_codec *codec)
wm8350_clear_bits
(
wm8350
,
WM8350_POWER_MGMT_5
,
WM8350_CODEC_ENA
);
regulator_bulk_free
(
ARRAY_SIZE
(
priv
->
supplies
),
priv
->
supplies
);
kfree
(
priv
);
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