summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/twl-regulator.c
diff options
context:
space:
mode:
authorAxel Lin2019-01-19 13:41:35 +0100
committerMark Brown2019-01-22 18:26:16 +0100
commit93997a05e6bd7347eb8d103c96af7df4625933f1 (patch)
tree9370d98c42f45c1553e789a33e3b1273680fff60 /drivers/regulator/twl-regulator.c
parentregulator: arizona-ldo1: Convert to use regulator_linear_range for ldo1_hc (diff)
downloadkernel-qcow2-linux-93997a05e6bd7347eb8d103c96af7df4625933f1.tar.gz
kernel-qcow2-linux-93997a05e6bd7347eb8d103c96af7df4625933f1.tar.xz
kernel-qcow2-linux-93997a05e6bd7347eb8d103c96af7df4625933f1.zip
regulator: twl: 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/twl-regulator.c')
-rw-r--r--drivers/regulator/twl-regulator.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/regulator/twl-regulator.c b/drivers/regulator/twl-regulator.c
index 884c7505ed91..402ea43c77d1 100644
--- 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;