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
c155e0ab
Commit
c155e0ab
authored
Mar 13, 2016
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'regulator/topic/core' into regulator-next
parents
905373b6
32165230
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
drivers/regulator/core.c
drivers/regulator/core.c
+13
-13
No files found.
drivers/regulator/core.c
View file @
c155e0ab
...
...
@@ -3913,6 +3913,16 @@ regulator_register(const struct regulator_desc *regulator_desc,
goto
clean
;
}
if
((
config
->
ena_gpio
||
config
->
ena_gpio_initialized
)
&&
gpio_is_valid
(
config
->
ena_gpio
))
{
ret
=
regulator_ena_gpio_request
(
rdev
,
config
);
if
(
ret
!=
0
)
{
rdev_err
(
rdev
,
"Failed to request enable GPIO%d: %d
\n
"
,
config
->
ena_gpio
,
ret
);
goto
clean
;
}
}
/* register with sysfs */
rdev
->
dev
.
class
=
&
regulator_class
;
rdev
->
dev
.
parent
=
dev
;
...
...
@@ -3921,21 +3931,11 @@ regulator_register(const struct regulator_desc *regulator_desc,
ret
=
device_register
(
&
rdev
->
dev
);
if
(
ret
!=
0
)
{
put_device
(
&
rdev
->
dev
);
goto
clean
;
goto
wash
;
}
dev_set_drvdata
(
&
rdev
->
dev
,
rdev
);
if
((
config
->
ena_gpio
||
config
->
ena_gpio_initialized
)
&&
gpio_is_valid
(
config
->
ena_gpio
))
{
ret
=
regulator_ena_gpio_request
(
rdev
,
config
);
if
(
ret
!=
0
)
{
rdev_err
(
rdev
,
"Failed to request enable GPIO%d: %d
\n
"
,
config
->
ena_gpio
,
ret
);
goto
wash
;
}
}
/* set regulator constraints */
if
(
init_data
)
constraints
=
&
init_data
->
constraints
;
...
...
@@ -3974,13 +3974,13 @@ regulator_register(const struct regulator_desc *regulator_desc,
scrub:
regulator_ena_gpio_free
(
rdev
);
wash:
device_unregister
(
&
rdev
->
dev
);
/* device core frees rdev */
rdev
=
ERR_PTR
(
ret
);
goto
out
;
wash:
regulator_ena_gpio_free
(
rdev
);
clean:
kfree
(
rdev
);
rdev
=
ERR_PTR
(
ret
);
...
...
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