summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/palmas-regulator.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 17:35:05 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 17:39:31 +0000
commit85c675d0d09a45a135bddd15d7b385f8758c32fb (patch)
tree76267dbc9b9a130337be3640948fe397b04ac629 /drivers/regulator/palmas-regulator.c
parentAdding upstream version 6.6.15. (diff)
downloadlinux-85c675d0d09a45a135bddd15d7b385f8758c32fb.tar.xz
linux-85c675d0d09a45a135bddd15d7b385f8758c32fb.zip
Adding upstream version 6.7.7.upstream/6.7.7
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'drivers/regulator/palmas-regulator.c')
-rw-r--r--drivers/regulator/palmas-regulator.c8
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;