diff options
author | Rob Herring <robh@kernel.org> | 2023-10-06 17:46:13 -0500 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2023-10-17 11:45:11 +0200 |
commit | 3ba9fdfaa550936837b50b73d6c27ac401fde875 (patch) | |
tree | 4f23007dd97ec35608b6c85ab376fbeb6eca5e69 /drivers/pmdomain/imx | |
parent | e8fa18de717dd9feaa21778a611c60328d377324 (diff) | |
download | lwn-3ba9fdfaa550936837b50b73d6c27ac401fde875.tar.gz lwn-3ba9fdfaa550936837b50b73d6c27ac401fde875.zip |
pmdomain: 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/20231006224614.444488-1-robh@kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/pmdomain/imx')
-rw-r--r-- | drivers/pmdomain/imx/gpc.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/pmdomain/imx/gpc.c b/drivers/pmdomain/imx/gpc.c index 90a8b2c0676f..114f44ca07dd 100644 --- a/drivers/pmdomain/imx/gpc.c +++ b/drivers/pmdomain/imx/gpc.c @@ -7,9 +7,10 @@ #include <linux/clk.h> #include <linux/delay.h> #include <linux/io.h> -#include <linux/of_device.h> +#include <linux/of.h> #include <linux/platform_device.h> #include <linux/pm_domain.h> +#include <linux/property.h> #include <linux/regmap.h> #include <linux/regulator/consumer.h> @@ -403,9 +404,7 @@ clk_err: static int imx_gpc_probe(struct platform_device *pdev) { - const struct of_device_id *of_id = - of_match_device(imx_gpc_dt_ids, &pdev->dev); - const struct imx_gpc_dt_data *of_id_data = of_id->data; + const struct imx_gpc_dt_data *of_id_data = device_get_match_data(&pdev->dev); struct device_node *pgc_node; struct regmap *regmap; void __iomem *base; |