summaryrefslogtreecommitdiff
path: root/drivers/regulator/qcom-labibb-regulator.c
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2023-10-17 15:34:41 -0500
committerMark Brown <broonie@kernel.org>2023-10-17 21:38:48 +0100
commit8f7e17d847edf6bc02d0813b123b9d78ba504098 (patch)
tree120904e8da64019d8776c30c7c05959470e5e9b5 /drivers/regulator/qcom-labibb-regulator.c
parent46537a8676d6555141c4b98ec1bf5f3eea971128 (diff)
regulator: Use device_get_match_data()
Use preferred device_get_match_data() instead of of_match_device() to get the driver match data. With this, adjust the includes to explicitly include the correct headers. Signed-off-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20231017203442.2699322-1-robh@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator/qcom-labibb-regulator.c')
-rw-r--r--drivers/regulator/qcom-labibb-regulator.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/regulator/qcom-labibb-regulator.c b/drivers/regulator/qcom-labibb-regulator.c
index a8698ca61143..ba3f9391565f 100644
--- a/drivers/regulator/qcom-labibb-regulator.c
+++ b/drivers/regulator/qcom-labibb-regulator.c
@@ -764,7 +764,6 @@ static int qcom_labibb_regulator_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
struct regulator_config cfg = {};
struct device_node *reg_node;
- const struct of_device_id *match;
const struct labibb_regulator_data *reg_data;
struct regmap *reg_regmap;
unsigned int type;
@@ -776,11 +775,11 @@ static int qcom_labibb_regulator_probe(struct platform_device *pdev)
return -ENODEV;
}
- match = of_match_device(qcom_labibb_match, &pdev->dev);
- if (!match)
+ reg_data = device_get_match_data(&pdev->dev);
+ if (!reg_data)
return -ENODEV;
- for (reg_data = match->data; reg_data->name; reg_data++) {
+ for (; reg_data->name; reg_data++) {
char *sc_irq_name;
int irq = 0;