diff options
author | Rob Herring <robh@kernel.org> | 2023-10-06 16:38:43 -0500 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2023-10-09 10:54:48 +0530 |
commit | a67ba97dfb30486deb4661f770b954387acc898d (patch) | |
tree | 8fb9a02a53c281372134edba8a0e7646cc0950f8 /drivers/dma/fsl-edma-main.c | |
parent | 0481291f0ccbc5147635cf0eb108f9fe5a05ee7d (diff) |
dmaengine: 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/20231006213844.333027-1-robh@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma/fsl-edma-main.c')
-rw-r--r-- | drivers/dma/fsl-edma-main.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/dma/fsl-edma-main.c b/drivers/dma/fsl-edma-main.c index 78ceaa71675f..2638290e4199 100644 --- a/drivers/dma/fsl-edma-main.c +++ b/drivers/dma/fsl-edma-main.c @@ -13,13 +13,11 @@ #include <linux/interrupt.h> #include <linux/clk.h> #include <linux/of.h> -#include <linux/of_device.h> -#include <linux/of_address.h> -#include <linux/of_irq.h> #include <linux/of_dma.h> #include <linux/dma-mapping.h> #include <linux/pm_runtime.h> #include <linux/pm_domain.h> +#include <linux/property.h> #include "fsl-edma-common.h" @@ -414,8 +412,6 @@ static int fsl_edma3_attach_pd(struct platform_device *pdev, struct fsl_edma_eng static int fsl_edma_probe(struct platform_device *pdev) { - const struct of_device_id *of_id = - of_match_device(fsl_edma_dt_ids, &pdev->dev); struct device_node *np = pdev->dev.of_node; struct fsl_edma_engine *fsl_edma; const struct fsl_edma_drvdata *drvdata = NULL; @@ -424,8 +420,7 @@ static int fsl_edma_probe(struct platform_device *pdev) int chans; int ret, i; - if (of_id) - drvdata = of_id->data; + drvdata = device_get_match_data(&pdev->dev); if (!drvdata) { dev_err(&pdev->dev, "unable to find driver data\n"); return -EINVAL; |