Browse Source

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>
Lars-Peter Clausen 11 years ago
parent
commit
fbbcd9be96
1 changed files with 1 additions and 7 deletions
  1. 1 7
      drivers/dma/pl330.c

+ 1 - 7
drivers/dma/pl330.c

@@ -562,13 +562,7 @@ static inline bool _queue_full(struct pl330_thread *thrd)
 
 static inline bool is_manager(struct pl330_thread *thrd)
 {
-	struct pl330_dmac *pl330 = thrd->dmac;
-
-	/* MANAGER is indexed at the end */
-	if (thrd->id == pl330->pinfo->pcfg.num_chan)
-		return true;
-	else
-		return false;
+	return thrd->dmac->manager == thrd;
 }
 
 /* If manager of the thread is in Non-Secure mode */