[DM/DMA] Use strict mode for device DMA pool
Signed-off-by: GuEe-GUI <2991707448@qq.com>
This commit is contained in:
parent
61779ef4c6
commit
8f392779ef
|
@ -322,8 +322,14 @@ static void *dma_alloc(struct rt_device *dev, rt_size_t size,
|
|||
|
||||
rt_list_for_each_entry(pool, &dma_pool_nodes, list)
|
||||
{
|
||||
if ((flags & RT_DMA_F_DEVICE) &&
|
||||
(!(pool->flags & RT_DMA_F_DEVICE) || pool->dev != dev))
|
||||
if (pool->flags & RT_DMA_F_DEVICE)
|
||||
{
|
||||
if (!(flags & RT_DMA_F_DEVICE) || pool->dev != dev)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else if ((flags & RT_DMA_F_DEVICE))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue