diff options
author | Rob Herring <robh@kernel.org> | 2023-10-17 23:36:10 +0300 |
---|---|---|
committer | Lee Jones <lee@kernel.org> | 2023-11-01 13:02:17 +0300 |
commit | 830fafce06e6fc2e63e141799833f7c7a73cf62b (patch) | |
tree | d9b5f379a230da54e8a8b70c1095c2e65d72acbb /drivers/mfd/qcom_rpm.c | |
parent | 15d71e678ec14ce26f7a271fef363e5c04ec24bf (diff) | |
download | linux-830fafce06e6fc2e63e141799833f7c7a73cf62b.tar.xz |
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_rpm.c')
-rw-r--r-- | drivers/mfd/qcom_rpm.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/mfd/qcom_rpm.c b/drivers/mfd/qcom_rpm.c index 086611322874..27446f43e3f3 100644 --- a/drivers/mfd/qcom_rpm.c +++ b/drivers/mfd/qcom_rpm.c @@ -7,6 +7,8 @@ #include <linux/module.h> #include <linux/platform_device.h> +#include <linux/property.h> +#include <linux/of.h> #include <linux/of_platform.h> #include <linux/io.h> #include <linux/interrupt.h> @@ -528,7 +530,6 @@ static irqreturn_t qcom_rpm_wakeup_interrupt(int irq, void *dev) static int qcom_rpm_probe(struct platform_device *pdev) { - const struct of_device_id *match; struct device_node *syscon_np; struct qcom_rpm *rpm; u32 fw_version[3]; @@ -570,10 +571,9 @@ static int qcom_rpm_probe(struct platform_device *pdev) if (irq_wakeup < 0) return irq_wakeup; - match = of_match_device(qcom_rpm_of_match, &pdev->dev); - if (!match) + rpm->data = device_get_match_data(&pdev->dev); + if (!rpm->data) return -ENODEV; - rpm->data = match->data; rpm->status_regs = devm_platform_get_and_ioremap_resource(pdev, 0, NULL); if (IS_ERR(rpm->status_regs)) |