summaryrefslogtreecommitdiffstats
path: root/drivers/dma/pl330.c
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2014-07-06 14:32:28 -0400
committerVinod Koul <vinod.koul@intel.com>2014-07-15 12:31:04 -0400
commitfbbcd9be96a0295e9d127e124f72fa0039f53d8e (patch)
treeff3d7937c8e9b8f84750af4cd42729972b836ba1 /drivers/dma/pl330.c
parent1b446d2a61c436f7ad542fcdb212d4e51845ac28 (diff)
dmaengine: pl330: Simplify is_manager()
Since we keep a pointer to the manager thread it is fairly easy to check if a thread is the manager thread. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma/pl330.c')
-rw-r--r--drivers/dma/pl330.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
index 0209823ca77f..c5eeb64dce6f 100644
--- a/drivers/dma/pl330.c
+++ b/drivers/dma/pl330.c
@@ -562,13 +562,7 @@ static inline bool _queue_full(struct pl330_thread *thrd)
562 562
563static inline bool is_manager(struct pl330_thread *thrd) 563static inline bool is_manager(struct pl330_thread *thrd)
564{ 564{
565 struct pl330_dmac *pl330 = thrd->dmac; 565 return thrd->dmac->manager == thrd;
566
567 /* MANAGER is indexed at the end */
568 if (thrd->id == pl330->pinfo->pcfg.num_chan)
569 return true;
570 else
571 return false;
572} 566}
573 567
574/* If manager of the thread is in Non-Secure mode */ 568/* If manager of the thread is in Non-Secure mode */