summaryrefslogtreecommitdiff
path: root/drivers/regulator/twl6030-regulator.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2019-01-09 17:30:49 +0800
committerMark Brown <broonie@kernel.org>2019-01-14 11:50:41 +0000
commit7085180d6a38197c86a9bea84006fa4a4813c7b7 (patch)
tree85b3330f480fca3874d346a3591cccfb8ae8a654 /drivers/regulator/twl6030-regulator.c
parent67cc7ca316c4167cc5aca54b7f63a55de356d976 (diff)
regulator: twl6030: Use of_device_get_match_data()
Use of_device_get_match_data() to simplify the code a bit. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator/twl6030-regulator.c')
-rw-r--r--drivers/regulator/twl6030-regulator.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/regulator/twl6030-regulator.c b/drivers/regulator/twl6030-regulator.c
index 219cbd910dbf..78b964539775 100644
--- a/drivers/regulator/twl6030-regulator.c
+++ b/drivers/regulator/twl6030-regulator.c
@@ -687,14 +687,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;