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
77caabaa
Commit
77caabaa
authored
Jan 30, 2012
by
Mark Brown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ASoC: wm5100: Convert to devm_regmap_init_i2c()
Signed-off-by:
Mark Brown
<
broonie@opensource.wolfsonmicro.com
>
parent
e06ab3b8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
6 deletions
+3
-6
sound/soc/codecs/wm5100.c
sound/soc/codecs/wm5100.c
+3
-6
No files found.
sound/soc/codecs/wm5100.c
View file @
77caabaa
...
...
@@ -2454,7 +2454,7 @@ static __devinit int wm5100_i2c_probe(struct i2c_client *i2c,
wm5100
->
dev
=
&
i2c
->
dev
;
wm5100
->
regmap
=
regmap_init_i2c
(
i2c
,
&
wm5100_regmap
);
wm5100
->
regmap
=
devm_
regmap_init_i2c
(
i2c
,
&
wm5100_regmap
);
if
(
IS_ERR
(
wm5100
->
regmap
))
{
ret
=
PTR_ERR
(
wm5100
->
regmap
);
dev_err
(
&
i2c
->
dev
,
"Failed to allocate register map: %d
\n
"
,
...
...
@@ -2479,7 +2479,7 @@ static __devinit int wm5100_i2c_probe(struct i2c_client *i2c,
if
(
ret
!=
0
)
{
dev_err
(
&
i2c
->
dev
,
"Failed to request core supplies: %d
\n
"
,
ret
);
goto
err
_regmap
;
goto
err
;
}
ret
=
regulator_bulk_enable
(
ARRAY_SIZE
(
wm5100
->
core_supplies
),
...
...
@@ -2487,7 +2487,7 @@ static __devinit int wm5100_i2c_probe(struct i2c_client *i2c,
if
(
ret
!=
0
)
{
dev_err
(
&
i2c
->
dev
,
"Failed to enable core supplies: %d
\n
"
,
ret
);
goto
err
_regmap
;
goto
err
;
}
if
(
wm5100
->
pdata
.
ldo_ena
)
{
...
...
@@ -2660,8 +2660,6 @@ static __devinit int wm5100_i2c_probe(struct i2c_client *i2c,
err_enable:
regulator_bulk_disable
(
ARRAY_SIZE
(
wm5100
->
core_supplies
),
wm5100
->
core_supplies
);
err_regmap:
regmap_exit
(
wm5100
->
regmap
);
err:
return
ret
;
}
...
...
@@ -2682,7 +2680,6 @@ static __devexit int wm5100_i2c_remove(struct i2c_client *i2c)
gpio_set_value_cansleep
(
wm5100
->
pdata
.
ldo_ena
,
0
);
gpio_free
(
wm5100
->
pdata
.
ldo_ena
);
}
regmap_exit
(
wm5100
->
regmap
);
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