summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Shmidt <dimitrysh@google.com>2010-02-03 16:41:53 -0800
committerDmitry Shmidt <dimitrysh@google.com>2010-02-03 16:41:53 -0800
commitd05e827b5bdc80384035d87391d066434677d34f (patch)
tree4ee1d485f5b99abb55ab24218064ad8a32af96dc
parent5adcb14c585e7932a27644bcb97dc15f3cf61ecf (diff)
downloadti-d05e827b5bdc80384035d87391d066434677d34f.tar.gz
wl1251: Use in vmalloc_to_unity() exported functions
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
-rw-r--r--sta_dk_4_0_4_32/pform/linux/src/tnetw_sdio.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/sta_dk_4_0_4_32/pform/linux/src/tnetw_sdio.c b/sta_dk_4_0_4_32/pform/linux/src/tnetw_sdio.c
index 082cbae..8e6a29d 100644
--- a/sta_dk_4_0_4_32/pform/linux/src/tnetw_sdio.c
+++ b/sta_dk_4_0_4_32/pform/linux/src/tnetw_sdio.c
@@ -130,14 +130,12 @@ static inline int spans_page(void *s, int len)
static void *vmalloc_to_unity(void *a)
{
- pte_t *pte;
+ struct page *pg;
unsigned long virt = (unsigned long) a;
- unsigned long phys;
- pte = pte_offset_map(pmd_offset(pgd_offset_k(virt), virt), virt);
- phys = (pte_val(*pte) & ~(PAGE_SIZE -1)) | (virt & (PAGE_SIZE -1));
- pte_unmap(pte);
- return phys_to_virt(phys);
+ pg = vmalloc_to_page(a);
+ virt = (unsigned long)page_address(pg) | (virt & (PAGE_SIZE -1));
+ return (void *)virt;
}
SDIO_Status SDIO_SyncRead(SDIO_Handle Handle, SDIO_Request_t *Req)