@@ -1514,10 +1514,9 @@ static struct of_dma_filter_info edma_filter_info = {
.filter_fn = edma_filter_fn,
};
-static struct edma_soc_info **edma_setup_info_from_dt(struct device *dev,
+static struct edma_soc_info *edma_setup_info_from_dt(struct device *dev,
struct device_node *node)
{
- static struct edma_soc_info **info;
struct edma_soc_info *ninfo;
int ret;
@@ -1539,9 +1538,7 @@ static struct edma_soc_info **edma_setup_info_from_dt(struct device *dev,
of_dma_controller_register(dev->of_node, of_dma_simple_xlate,
&edma_filter_info);
- info = &ninfo;
-
- return info;
+ return ninfo;
}
#else
static struct edma_soc_info **edma_setup_info_from_dt(struct device *dev,
@@ -1554,6 +1551,7 @@ static struct edma_soc_info **edma_setup_info_from_dt(struct device *dev,
static int edma_probe(struct platform_device *pdev)
{
struct edma_soc_info **info = pdev->dev.platform_data;
+ struct edma_soc_info *ninfo[EDMA_MAX_CC] = {NULL};
s8 (*queue_priority_mapping)[2];
s8 (*queue_tc_mapping)[2];
int i, j, off, ln, found = 0;
@@ -1572,7 +1570,9 @@ static int edma_probe(struct platform_device *pdev)
int ret;
if (node) {
- info = edma_setup_info_from_dt(dev, node);
+ /* For now, for DT we populate only first ninfo element */
+ ninfo[0] = edma_setup_info_from_dt(dev, node);
+ info = ninfo;
if (IS_ERR(info)) {
dev_err(dev, "failed to get DT data\n");
return PTR_ERR(info);