summaryrefslogtreecommitdiff
path: root/drivers/regulator/palmas-regulator.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/regulator/palmas-regulator.c')
-rw-r--r--drivers/regulator/palmas-regulator.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/regulator/palmas-regulator.c b/drivers/regulator/palmas-regulator.c
index 076966366b60..60656a815b9e 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[] = {
@@ -1595,22 +1594,19 @@ static const struct of_device_id of_palmas_match_tbl[] = {
static int palmas_regulators_probe(struct platform_device *pdev)
{
struct palmas *palmas = dev_get_drvdata(pdev->dev.parent);
- struct palmas_pmic_platform_data *pdata = dev_get_platdata(&pdev->dev);
+ struct palmas_pmic_platform_data *pdata;
struct device_node *node = pdev->dev.of_node;
struct palmas_pmic_driver_data *driver_data;
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;