aboutsummaryrefslogtreecommitdiff
path: root/drivers/dma/timb_dma.c
diff options
context:
space:
mode:
authorRichard Röjfors <richard.rojfors@pelagicore.com>2010-03-26 08:23:58 +0100
committerDan Williams <dan.j.williams@intel.com>2010-03-26 16:08:20 -0700
commit0f65169b1bf44220308e1ce1f6666ad03ddc27af (patch)
tree90f1e1955d63e876409ce54d8b9cbaf832619671 /drivers/dma/timb_dma.c
parentde5d4453c5b224eefd02b6a141ed411a76d458af (diff)
dma: timb-dma: Update comment and fix compiler warning
An incremental patch which clarifies what the spinlock is used for and fixes a compiler warning. Signed-off-by: Richard Röjfors <richard.rojfors@pelagicore.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/dma/timb_dma.c')
-rw-r--r--drivers/dma/timb_dma.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/dma/timb_dma.c b/drivers/dma/timb_dma.c
index 4dd710246c7..145f1c23408 100644
--- a/drivers/dma/timb_dma.c
+++ b/drivers/dma/timb_dma.c
@@ -79,7 +79,10 @@ struct timb_dma_desc {
struct timb_dma_chan {
struct dma_chan chan;
void __iomem *membase;
- spinlock_t lock; /* Used for mutual exclusion */
+ spinlock_t lock; /* Used to protect data structures,
+ especially the lists and descriptors,
+ from races between the tasklet and calls
+ from above */
dma_cookie_t last_completed_cookie;
bool ongoing;
struct list_head active_list;
@@ -197,7 +200,7 @@ static int td_fill_desc(struct timb_dma_chan *td_chan, u8 *dma_desc,
}
dev_dbg(chan2dev(&td_chan->chan), "desc: %p, addr: %p\n",
- dma_desc, (void *)(int)sg_dma_address(sg));
+ dma_desc, (void *)sg_dma_address(sg));
dma_desc[7] = (sg_dma_address(sg) >> 24) & 0xff;
dma_desc[6] = (sg_dma_address(sg) >> 16) & 0xff;