projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
37b9ef9
)
regulator: twl: Use of_device_get_match_data()
author
Axel Lin
<
[email protected]
>
Sat, 19 Jan 2019 12:41:35 +0000
(20:41 +0800)
committer
Mark Brown
<
[email protected]
>
Tue, 22 Jan 2019 17:26:16 +0000
(17:26 +0000)
Use of_device_get_match_data() to simplify the code a bit.
Signed-off-by: Axel Lin <
[email protected]
>
Signed-off-by: Mark Brown <
[email protected]
>
drivers/regulator/twl-regulator.c
patch
|
blob
|
history
diff --git
a/drivers/regulator/twl-regulator.c
b/drivers/regulator/twl-regulator.c
index 884c7505ed91c493b127e680b7406773952fc1d7..402ea43c77d100c39d98092fa029944393e8bd55 100644
(file)
--- a/
drivers/regulator/twl-regulator.c
+++ b/
drivers/regulator/twl-regulator.c
@@
-576,14
+576,9
@@
static int twlreg_probe(struct platform_device *pdev)
struct regulator_init_data *initdata;
struct regulation_constraints *c;
struct regulator_dev *rdev;
- const struct of_device_id *match;
struct regulator_config config = { };
- match = of_match_device(twl_of_match, &pdev->dev);
- if (!match)
- return -ENODEV;
-
- template = match->data;
+ template = of_device_get_match_data(&pdev->dev);
if (!template)
return -ENODEV;