mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-21 08:19:28 +00:00
dma: tegra: assume CONFIG_OF
Tegra only supports, and always enables, device tree. Remove all ifdefs and runtime checks for DT support from the driver. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
This commit is contained in:
parent
bcc7fa9547
commit
dc7badba19
1 changed files with 7 additions and 15 deletions
|
@ -1213,7 +1213,6 @@ static const struct tegra_dma_chip_data tegra20_dma_chip_data = {
|
|||
.support_channel_pause = false,
|
||||
};
|
||||
|
||||
#if defined(CONFIG_OF)
|
||||
/* Tegra30 specific DMA controller information */
|
||||
static const struct tegra_dma_chip_data tegra30_dma_chip_data = {
|
||||
.nr_channels = 32,
|
||||
|
@ -1243,7 +1242,6 @@ static const struct of_device_id tegra_dma_of_match[] = {
|
|||
},
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, tegra_dma_of_match);
|
||||
#endif
|
||||
|
||||
static int tegra_dma_probe(struct platform_device *pdev)
|
||||
{
|
||||
|
@ -1252,20 +1250,14 @@ static int tegra_dma_probe(struct platform_device *pdev)
|
|||
int ret;
|
||||
int i;
|
||||
const struct tegra_dma_chip_data *cdata = NULL;
|
||||
const struct of_device_id *match;
|
||||
|
||||
if (pdev->dev.of_node) {
|
||||
const struct of_device_id *match;
|
||||
match = of_match_device(of_match_ptr(tegra_dma_of_match),
|
||||
&pdev->dev);
|
||||
if (!match) {
|
||||
dev_err(&pdev->dev, "Error: No device match found\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
cdata = match->data;
|
||||
} else {
|
||||
/* If no device tree then fallback to tegra20 */
|
||||
cdata = &tegra20_dma_chip_data;
|
||||
match = of_match_device(tegra_dma_of_match, &pdev->dev);
|
||||
if (!match) {
|
||||
dev_err(&pdev->dev, "Error: No device match found\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
cdata = match->data;
|
||||
|
||||
tdma = devm_kzalloc(&pdev->dev, sizeof(*tdma) + cdata->nr_channels *
|
||||
sizeof(struct tegra_dma_channel), GFP_KERNEL);
|
||||
|
@ -1460,7 +1452,7 @@ static struct platform_driver tegra_dmac_driver = {
|
|||
.name = "tegra-apbdma",
|
||||
.owner = THIS_MODULE,
|
||||
.pm = &tegra_dma_dev_pm_ops,
|
||||
.of_match_table = of_match_ptr(tegra_dma_of_match),
|
||||
.of_match_table = tegra_dma_of_match,
|
||||
},
|
||||
.probe = tegra_dma_probe,
|
||||
.remove = tegra_dma_remove,
|
||||
|
|
Loading…
Reference in a new issue