Skip to content

Commit

Permalink
staging: brcm80211: Remove abstraction layer for dma alignment
Browse files Browse the repository at this point in the history
Directly align buffers instead of abstracting it.

Signed-off-by: Brett Rudley <brudley@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Brett Rudley authored and Greg Kroah-Hartman committed Nov 9, 2010
1 parent 4766ae6 commit 8fb6b18
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
2 changes: 0 additions & 2 deletions drivers/staging/brcm80211/include/linux_osl.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,6 @@ typedef struct {

#define BUS_SWAP32(v) (v)

#define DMA_CONSISTENT_ALIGN osl_dma_consistent_align()
extern uint osl_dma_consistent_align(void);
extern void *osl_dma_alloc_consistent(osl_t *osh, uint size, u16 align,
uint *tot, unsigned long *pap);

Expand Down
7 changes: 1 addition & 6 deletions drivers/staging/brcm80211/util/linux_osl.c
Original file line number Diff line number Diff line change
Expand Up @@ -285,19 +285,14 @@ uint osl_pci_slot(osl_t *osh)
return PCI_SLOT(((struct pci_dev *)osh->pdev)->devfn);
}

uint osl_dma_consistent_align(void)
{
return PAGE_SIZE;
}

void *osl_dma_alloc_consistent(osl_t *osh, uint size, u16 align_bits,
uint *alloced, unsigned long *pap)
{
ASSERT((osh && (osh->magic == OS_HANDLE_MAGIC)));

if (align_bits) {
u16 align = (1 << align_bits);
if (!IS_ALIGNED(DMA_CONSISTENT_ALIGN, align))
if (!IS_ALIGNED(PAGE_SIZE, align))
size += align;
*alloced = size;
}
Expand Down

0 comments on commit 8fb6b18

Please sign in to comment.