summaryrefslogtreecommitdiff
path: root/drivers/mfd/qcom-spmi-pmic.c
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2023-10-17 15:36:10 -0500
committerLee Jones <lee@kernel.org>2023-11-01 10:02:17 +0000
commit830fafce06e6fc2e63e141799833f7c7a73cf62b (patch)
treed9b5f379a230da54e8a8b70c1095c2e65d72acbb /drivers/mfd/qcom-spmi-pmic.c
parent15d71e678ec14ce26f7a271fef363e5c04ec24bf (diff)
mfd: Use device_get_match_data() in a bunch of drivers
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. Reviewed-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20231017203612.2701060-1-robh@kernel.org Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'drivers/mfd/qcom-spmi-pmic.c')
-rw-r--r--drivers/mfd/qcom-spmi-pmic.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/mfd/qcom-spmi-pmic.c b/drivers/mfd/qcom-spmi-pmic.c
index ee55f09da3ba..203b1e27a1ae 100644
--- a/drivers/mfd/qcom-spmi-pmic.c
+++ b/drivers/mfd/qcom-spmi-pmic.c
@@ -8,10 +8,12 @@
#include <linux/gfp.h>
#include <linux/kernel.h>
#include <linux/module.h>
+#include <linux/of.h>
+#include <linux/of_device.h>
+#include <linux/of_platform.h>
#include <linux/spmi.h>
#include <linux/types.h>
#include <linux/regmap.h>
-#include <linux/of_platform.h>
#include <soc/qcom/qcom-spmi-pmic.h>
#define PMIC_REV2 0x101
@@ -264,7 +266,7 @@ static int pmic_spmi_probe(struct spmi_device *sdev)
if (!ctx)
return -ENOMEM;
- ctx->num_usids = (uintptr_t)of_device_get_match_data(&sdev->dev);
+ ctx->num_usids = (uintptr_t)device_get_match_data(&sdev->dev);
/* Only the first slave id for a PMIC contains this information */
if (sdev->usid % ctx->num_usids == 0) {