summaryrefslogtreecommitdiff
path: root/drivers/dma
diff options
context:
space:
mode:
authorLaxman Dewangan <ldewangan@nvidia.com>2016-03-01 18:54:40 +0530
committerVinod Koul <vinod.koul@intel.com>2016-03-03 21:22:07 +0530
commit333f16ec68f6fc6b208130de22717b585e6f3242 (patch)
treecabaffc142c95181783fa1b1189972da3d50667d /drivers/dma
parent94c622b2a742c6793d74a71280df0c3a5365a156 (diff)
downloadlwn-333f16ec68f6fc6b208130de22717b585e6f3242.tar.gz
lwn-333f16ec68f6fc6b208130de22717b585e6f3242.zip
dmaengine: tegra: don't open code of_device_get_match_data()
Use of_device_get_match_data() for getting matched data instead of implementing this locally. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Acked-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r--drivers/dma/tegra20-apb-dma.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/dma/tegra20-apb-dma.c b/drivers/dma/tegra20-apb-dma.c
index 935da8192f59..ced588f22f0d 100644
--- a/drivers/dma/tegra20-apb-dma.c
+++ b/drivers/dma/tegra20-apb-dma.c
@@ -1317,15 +1317,13 @@ static int tegra_dma_probe(struct platform_device *pdev)
struct tegra_dma *tdma;
int ret;
int i;
- const struct tegra_dma_chip_data *cdata = NULL;
- const struct of_device_id *match;
+ const struct tegra_dma_chip_data *cdata;
- match = of_match_device(tegra_dma_of_match, &pdev->dev);
- if (!match) {
- dev_err(&pdev->dev, "Error: No device match found\n");
+ cdata = of_device_get_match_data(&pdev->dev);
+ if (!cdata) {
+ dev_err(&pdev->dev, "Error: No device match data found\n");
return -ENODEV;
}
- cdata = match->data;
tdma = devm_kzalloc(&pdev->dev, sizeof(*tdma) + cdata->nr_channels *
sizeof(struct tegra_dma_channel), GFP_KERNEL);