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
af151ded
Commit
af151ded
authored
Aug 31, 2013
by
Mark Brown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
regulator: wm831x-isink: Convert to devm_regulator_register()
Signed-off-by:
Mark Brown
<
broonie@linaro.org
>
parent
d73b4cb7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
14 deletions
+3
-14
drivers/regulator/wm831x-isink.c
drivers/regulator/wm831x-isink.c
+3
-14
No files found.
drivers/regulator/wm831x-isink.c
View file @
af151ded
...
...
@@ -194,7 +194,8 @@ static int wm831x_isink_probe(struct platform_device *pdev)
config
.
init_data
=
pdata
->
isink
[
id
];
config
.
driver_data
=
isink
;
isink
->
regulator
=
regulator_register
(
&
isink
->
desc
,
&
config
);
isink
->
regulator
=
devm_regulator_register
(
&
pdev
->
dev
,
&
isink
->
desc
,
&
config
);
if
(
IS_ERR
(
isink
->
regulator
))
{
ret
=
PTR_ERR
(
isink
->
regulator
);
dev_err
(
wm831x
->
dev
,
"Failed to register ISINK%d: %d
\n
"
,
...
...
@@ -210,31 +211,19 @@ static int wm831x_isink_probe(struct platform_device *pdev)
if
(
ret
!=
0
)
{
dev_err
(
&
pdev
->
dev
,
"Failed to request ISINK IRQ %d: %d
\n
"
,
irq
,
ret
);
goto
err
_regulator
;
goto
err
;
}
platform_set_drvdata
(
pdev
,
isink
);
return
0
;
err_regulator:
regulator_unregister
(
isink
->
regulator
);
err:
return
ret
;
}
static
int
wm831x_isink_remove
(
struct
platform_device
*
pdev
)
{
struct
wm831x_isink
*
isink
=
platform_get_drvdata
(
pdev
);
regulator_unregister
(
isink
->
regulator
);
return
0
;
}
static
struct
platform_driver
wm831x_isink_driver
=
{
.
probe
=
wm831x_isink_probe
,
.
remove
=
wm831x_isink_remove
,
.
driver
=
{
.
name
=
"wm831x-isink"
,
.
owner
=
THIS_MODULE
,
...
...
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