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
bc830f35
Commit
bc830f35
authored
Jul 01, 2013
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'regulator/topic/lp397x' into regulator-next
parents
0a192cc8
2af0af67
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
16 deletions
+6
-16
drivers/regulator/lp3971.c
drivers/regulator/lp3971.c
+3
-8
drivers/regulator/lp3972.c
drivers/regulator/lp3972.c
+3
-8
No files found.
drivers/regulator/lp3971.c
View file @
bc830f35
...
...
@@ -434,7 +434,7 @@ static int lp3971_i2c_probe(struct i2c_client *i2c,
return
-
ENODEV
;
}
lp3971
=
kzalloc
(
sizeof
(
struct
lp3971
),
GFP_KERNEL
);
lp3971
=
devm_kzalloc
(
&
i2c
->
dev
,
sizeof
(
struct
lp3971
),
GFP_KERNEL
);
if
(
lp3971
==
NULL
)
return
-
ENOMEM
;
...
...
@@ -449,19 +449,15 @@ static int lp3971_i2c_probe(struct i2c_client *i2c,
ret
=
-
ENODEV
;
if
(
ret
<
0
)
{
dev_err
(
&
i2c
->
dev
,
"failed to detect device
\n
"
);
goto
err_detec
t
;
return
re
t
;
}
ret
=
setup_regulators
(
lp3971
,
pdata
);
if
(
ret
<
0
)
goto
err_detec
t
;
return
re
t
;
i2c_set_clientdata
(
i2c
,
lp3971
);
return
0
;
err_detect:
kfree
(
lp3971
);
return
ret
;
}
static
int
lp3971_i2c_remove
(
struct
i2c_client
*
i2c
)
...
...
@@ -473,7 +469,6 @@ static int lp3971_i2c_remove(struct i2c_client *i2c)
regulator_unregister
(
lp3971
->
rdev
[
i
]);
kfree
(
lp3971
->
rdev
);
kfree
(
lp3971
);
return
0
;
}
...
...
drivers/regulator/lp3972.c
View file @
bc830f35
...
...
@@ -528,7 +528,7 @@ static int lp3972_i2c_probe(struct i2c_client *i2c,
return
-
ENODEV
;
}
lp3972
=
kzalloc
(
sizeof
(
struct
lp3972
),
GFP_KERNEL
);
lp3972
=
devm_kzalloc
(
&
i2c
->
dev
,
sizeof
(
struct
lp3972
),
GFP_KERNEL
);
if
(
!
lp3972
)
return
-
ENOMEM
;
...
...
@@ -546,19 +546,15 @@ static int lp3972_i2c_probe(struct i2c_client *i2c,
}
if
(
ret
<
0
)
{
dev_err
(
&
i2c
->
dev
,
"failed to detect device. ret = %d
\n
"
,
ret
);
goto
err_detec
t
;
return
re
t
;
}
ret
=
setup_regulators
(
lp3972
,
pdata
);
if
(
ret
<
0
)
goto
err_detec
t
;
return
re
t
;
i2c_set_clientdata
(
i2c
,
lp3972
);
return
0
;
err_detect:
kfree
(
lp3972
);
return
ret
;
}
static
int
lp3972_i2c_remove
(
struct
i2c_client
*
i2c
)
...
...
@@ -569,7 +565,6 @@ static int lp3972_i2c_remove(struct i2c_client *i2c)
for
(
i
=
0
;
i
<
lp3972
->
num_regulators
;
i
++
)
regulator_unregister
(
lp3972
->
rdev
[
i
]);
kfree
(
lp3972
->
rdev
);
kfree
(
lp3972
);
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