drivers: video: nvmap: Fix ptr vs phys_addr types
Alex Van Brunt [Sat, 19 Jan 2013 00:57:26 +0000 (16:57 -0800)]
Use uintptr_t instead of phys_addr_t to store a pointer as an integer.

Change-Id: I164cc7b3a189d91a1926b74780d302af33cbf005
Signed-off-by: Alex Van Brunt <avanbrunt@nvidia.com>
Reviewed-on: http://git-master/r/195686
Reviewed-by: Automatic_Commit_Validation_User

drivers/video/tegra/nvmap/nvmap_dev.c

index 1e22245..5d17ffd 100644 (file)
@@ -317,7 +317,7 @@ int nvmap_flush_heap_block(struct nvmap_client *client,
 {
        pte_t **pte;
        void *addr;
-       phys_addr_t kaddr;
+       uintptr_t kaddr;
        phys_addr_t phys = block->base;
        phys_addr_t end = block->base + len;
 
@@ -337,7 +337,7 @@ int nvmap_flush_heap_block(struct nvmap_client *client,
        if (IS_ERR(pte))
                return PTR_ERR(pte);
 
-       kaddr = (phys_addr_t)addr;
+       kaddr = (uintptr_t)addr;
 
        while (phys < end) {
                phys_addr_t next = (phys + PAGE_SIZE) & PAGE_MASK;