diff options
author | Rob Herring <robh@kernel.org> | 2023-10-06 23:38:35 +0200 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2023-10-09 07:25:16 +0200 |
commit | c48de45d4cefc5a2f0d0e4101c39884326ac704c (patch) | |
tree | 20d0558911921bf7384f1ed5e96f48186052a74e /drivers/dma/mmp_pdma.c | |
parent | dmaengine: Use device_get_match_data() (diff) | |
download | linux-c48de45d4cefc5a2f0d0e4101c39884326ac704c.tar.xz linux-c48de45d4cefc5a2f0d0e4101c39884326ac704c.zip |
dmaengine: Drop unnecessary of_match_device() calls
If probe is reached, we've already matched the device and in the case of
DT matching, the struct device_node pointer will be set. Therefore, there
is no need to call of_match_device() in probe.
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20231006213835.332848-1-robh@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma/mmp_pdma.c')
-rw-r--r-- | drivers/dma/mmp_pdma.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/dma/mmp_pdma.c b/drivers/dma/mmp_pdma.c index 492ec491a59b..136fcaeff8dd 100644 --- a/drivers/dma/mmp_pdma.c +++ b/drivers/dma/mmp_pdma.c @@ -15,7 +15,6 @@ #include <linux/device.h> #include <linux/platform_data/mmp_dma.h> #include <linux/dmapool.h> -#include <linux/of_device.h> #include <linux/of_dma.h> #include <linux/of.h> @@ -1019,7 +1018,6 @@ static struct dma_chan *mmp_pdma_dma_xlate(struct of_phandle_args *dma_spec, static int mmp_pdma_probe(struct platform_device *op) { struct mmp_pdma_device *pdev; - const struct of_device_id *of_id; struct mmp_dma_platdata *pdata = dev_get_platdata(&op->dev); int i, ret, irq = 0; int dma_channels = 0, irq_num = 0; @@ -1039,8 +1037,7 @@ static int mmp_pdma_probe(struct platform_device *op) if (IS_ERR(pdev->base)) return PTR_ERR(pdev->base); - of_id = of_match_device(mmp_pdma_dt_ids, pdev->dev); - if (of_id) { + if (pdev->dev->of_node) { /* Parse new and deprecated dma-channels properties */ if (of_property_read_u32(pdev->dev->of_node, "dma-channels", &dma_channels)) |