diff options
Diffstat (limited to 'drivers/regulator/palmas-regulator.c')
-rw-r--r-- | drivers/regulator/palmas-regulator.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/regulator/palmas-regulator.c b/drivers/regulator/palmas-regulator.c index 076966366b..e0dc033aae 100644 --- a/drivers/regulator/palmas-regulator.c +++ b/drivers/regulator/palmas-regulator.c @@ -19,7 +19,6 @@ #include <linux/regmap.h> #include <linux/mfd/palmas.h> #include <linux/of.h> -#include <linux/of_platform.h> #include <linux/regulator/of_regulator.h> static const struct linear_range smps_low_ranges[] = { @@ -1601,16 +1600,13 @@ static int palmas_regulators_probe(struct platform_device *pdev) struct regulator_config config = { }; struct palmas_pmic *pmic; const char *pdev_name; - const struct of_device_id *match; int ret = 0; unsigned int reg; - match = of_match_device(of_match_ptr(of_palmas_match_tbl), &pdev->dev); - - if (!match) + driver_data = (struct palmas_pmic_driver_data *)device_get_match_data(&pdev->dev); + if (!driver_data) return -ENODATA; - driver_data = (struct palmas_pmic_driver_data *)match->data; pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL); if (!pdata) return -ENOMEM; |