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
nexedi
linux
Commits
a290986b
Commit
a290986b
authored
Nov 27, 2011
by
Mark Brown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ASoC: Convert wm8996 to use devm_kzalloc()
Signed-off-by:
Mark Brown
<
broonie@opensource.wolfsonmicro.com
>
parent
897f7847
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
sound/soc/codecs/wm8996.c
sound/soc/codecs/wm8996.c
+2
-3
No files found.
sound/soc/codecs/wm8996.c
View file @
a290986b
...
@@ -3104,7 +3104,8 @@ static __devinit int wm8996_i2c_probe(struct i2c_client *i2c,
...
@@ -3104,7 +3104,8 @@ static __devinit int wm8996_i2c_probe(struct i2c_client *i2c,
int
ret
,
i
;
int
ret
,
i
;
unsigned
int
reg
;
unsigned
int
reg
;
wm8996
=
kzalloc
(
sizeof
(
struct
wm8996_priv
),
GFP_KERNEL
);
wm8996
=
devm_kzalloc
(
&
i2c
->
dev
,
sizeof
(
struct
wm8996_priv
),
GFP_KERNEL
);
if
(
wm8996
==
NULL
)
if
(
wm8996
==
NULL
)
return
-
ENOMEM
;
return
-
ENOMEM
;
...
@@ -3216,7 +3217,6 @@ static __devinit int wm8996_i2c_probe(struct i2c_client *i2c,
...
@@ -3216,7 +3217,6 @@ static __devinit int wm8996_i2c_probe(struct i2c_client *i2c,
if
(
wm8996
->
pdata
.
ldo_ena
>
0
)
if
(
wm8996
->
pdata
.
ldo_ena
>
0
)
gpio_free
(
wm8996
->
pdata
.
ldo_ena
);
gpio_free
(
wm8996
->
pdata
.
ldo_ena
);
err:
err:
kfree
(
wm8996
);
return
ret
;
return
ret
;
}
}
...
@@ -3234,7 +3234,6 @@ static __devexit int wm8996_i2c_remove(struct i2c_client *client)
...
@@ -3234,7 +3234,6 @@ static __devexit int wm8996_i2c_remove(struct i2c_client *client)
gpio_set_value_cansleep
(
wm8996
->
pdata
.
ldo_ena
,
0
);
gpio_set_value_cansleep
(
wm8996
->
pdata
.
ldo_ena
,
0
);
gpio_free
(
wm8996
->
pdata
.
ldo_ena
);
gpio_free
(
wm8996
->
pdata
.
ldo_ena
);
}
}
kfree
(
wm8996
);
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