summaryrefslogtreecommitdiff
path: root/drivers/regulator/lochnagar-regulator.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/regulator/lochnagar-regulator.c')
-rw-r--r--drivers/regulator/lochnagar-regulator.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/regulator/lochnagar-regulator.c b/drivers/regulator/lochnagar-regulator.c
index 11b358efbc92..e53911c80719 100644
--- a/drivers/regulator/lochnagar-regulator.c
+++ b/drivers/regulator/lochnagar-regulator.c
@@ -13,7 +13,6 @@
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/of.h>
-#include <linux/of_device.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/regulator/driver.h>
@@ -243,7 +242,6 @@ static int lochnagar_regulator_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
struct lochnagar *lochnagar = dev_get_drvdata(dev->parent);
struct regulator_config config = { };
- const struct of_device_id *of_id;
const struct regulator_desc *desc;
struct regulator_dev *rdev;
int ret;
@@ -252,12 +250,10 @@ static int lochnagar_regulator_probe(struct platform_device *pdev)
config.regmap = lochnagar->regmap;
config.driver_data = lochnagar;
- of_id = of_match_device(lochnagar_of_match, dev);
- if (!of_id)
+ desc = device_get_match_data(dev);
+ if (!desc)
return -EINVAL;
- desc = of_id->data;
-
rdev = devm_regulator_register(dev, desc, &config);
if (IS_ERR(rdev)) {
ret = PTR_ERR(rdev);