From 8fb6b18884703d447af4c5ed1eeec02b489aa54b Mon Sep 17 00:00:00 2001 From: Brett Rudley Date: Mon, 1 Nov 2010 17:10:15 -0700 Subject: [PATCH] staging: brcm80211: Remove abstraction layer for dma alignment Directly align buffers instead of abstracting it. Signed-off-by: Brett Rudley Signed-off-by: Greg Kroah-Hartman --- drivers/staging/brcm80211/include/linux_osl.h | 2 -- drivers/staging/brcm80211/util/linux_osl.c | 7 +------ 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/staging/brcm80211/include/linux_osl.h b/drivers/staging/brcm80211/include/linux_osl.h index b13ae7614042..e6d2f30c63ca 100644 --- a/drivers/staging/brcm80211/include/linux_osl.h +++ b/drivers/staging/brcm80211/include/linux_osl.h @@ -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); diff --git a/drivers/staging/brcm80211/util/linux_osl.c b/drivers/staging/brcm80211/util/linux_osl.c index effe043f1962..01851e56b157 100644 --- a/drivers/staging/brcm80211/util/linux_osl.c +++ b/drivers/staging/brcm80211/util/linux_osl.c @@ -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; } -- 2.20.1