staging: brcm80211: Remove abstraction layer for dma alignment
authorBrett Rudley <brudley@broadcom.com>
Tue, 2 Nov 2010 00:10:15 +0000 (17:10 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 9 Nov 2010 23:37:32 +0000 (15:37 -0800)
Directly align buffers instead of abstracting it.

Signed-off-by: Brett Rudley <brudley@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/brcm80211/include/linux_osl.h
drivers/staging/brcm80211/util/linux_osl.c

index b13ae76..e6d2f30 100644 (file)
@@ -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);
 
index effe043..01851e5 100644 (file)
@@ -285,11 +285,6 @@ 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)
 {
@@ -297,7 +292,7 @@ void *osl_dma_alloc_consistent(osl_t *osh, uint size, u16 align_bits,
 
        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;
        }