mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
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 <[email protected]> Acked-by: Thierry Reding <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
This commit is contained in:
parent
94c622b2a7
commit
333f16ec68
1 changed files with 4 additions and 6 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue