Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 188453
b: refs/heads/master
c: a3a6a59
h: refs/heads/master
i:
  188451: 0ff4e47
v: v3
  • Loading branch information
Sonic Zhang authored and Mike Frysinger committed Mar 9, 2010
1 parent 6aa0a74 commit 355dcf0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0c270807db7c6478d60ab2bc23511fd5868a7a80
refs/heads/master: a3a6a590190ca77aedf9de871d941c1139a5a24c
15 changes: 9 additions & 6 deletions trunk/arch/blackfin/include/asm/dma-mapping.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,8 @@ dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
extern void
__dma_sync(dma_addr_t addr, size_t size, enum dma_data_direction dir);
static inline void
_dma_sync(dma_addr_t addr, size_t size, enum dma_data_direction dir)
__dma_sync_inline(dma_addr_t addr, size_t size, enum dma_data_direction dir)
{
if (!__builtin_constant_p(dir)) {
__dma_sync(addr, size, dir);
return;
}

switch (dir) {
case DMA_NONE:
BUG();
Expand All @@ -64,6 +59,14 @@ _dma_sync(dma_addr_t addr, size_t size, enum dma_data_direction dir)
break;
}
}
static inline void
_dma_sync(dma_addr_t addr, size_t size, enum dma_data_direction dir)
{
if (__builtin_constant_p(dir))
__dma_sync_inline(addr, size, dir);
else
__dma_sync(addr, size, dir);
}

/*
* Map a single buffer of the indicated size for DMA in streaming mode.
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/blackfin/kernel/dma-mapping.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ EXPORT_SYMBOL(dma_free_coherent);
void __dma_sync(dma_addr_t addr, size_t size,
enum dma_data_direction dir)
{
_dma_sync(addr, size, dir);
__dma_sync_inline(addr, size, dir);
}
EXPORT_SYMBOL(__dma_sync);

Expand Down

0 comments on commit 355dcf0

Please sign in to comment.