Commit 7085180d authored by Axel Lin's avatar Axel Lin Committed by Mark Brown

regulator: twl6030: Use of_device_get_match_data()

Use of_device_get_match_data() to simplify the code a bit.
Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 67cc7ca3
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment