diff options
author | Suman Anna <s-anna@ti.com> | 2011-12-16 14:11:02 +0800 |
---|---|---|
committer | Andy Green <andy.green@linaro.org> | 2011-12-26 22:33:18 +0800 |
commit | d6f6754e3418d856fe3226d6efc9e42a6d90d758 (patch) | |
tree | 4e86e7f2104102d6ed2e71a6133413e93d6cb4aa | |
parent | cccf76c576f5cfb04cde5a0e8e5478adbfc03362 (diff) |
TILER: Simplify TILIOC_GSSP ioctl
Simplify the TILIOC_GSSP ioctl to use the common
tiler_virt2phys function
Signed-off-by: Lajos Molnar <molnar@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
-rw-r--r-- | drivers/media/video/tiler/tiler-iface.c | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/drivers/media/video/tiler/tiler-iface.c b/drivers/media/video/tiler/tiler-iface.c index 555d7e00437..eb396c58c81 100644 --- a/drivers/media/video/tiler/tiler-iface.c +++ b/drivers/media/video/tiler/tiler-iface.c @@ -327,9 +327,6 @@ static s32 tiler_mmap(struct file *filp, struct vm_area_struct *vma) /* ioctl handler */ static long tiler_ioctl(struct file *filp, u32 cmd, unsigned long arg) { - pgd_t *pgd; - pmd_t *pmd; - pte_t *ptep, pte; s32 r; void __user *data = (void __user *)arg; struct process_info *pi = filp->private_data; @@ -393,21 +390,7 @@ static long tiler_ioctl(struct file *filp, u32 cmd, unsigned long arg) break; /* get physical address */ case TILIOC_GSSP: - pgd = pgd_offset(current->mm, arg); - if (!(pgd_none(*pgd) || pgd_bad(*pgd))) { - pmd = pmd_offset(pgd, arg); - if (!(pmd_none(*pmd) || pmd_bad(*pmd))) { - ptep = pte_offset_map(pmd, arg); - if (ptep) { - pte = *ptep; - if (pte_present(pte)) - return (pte & PAGE_MASK) | - (~PAGE_MASK & arg); - } - } - } - /* va not in page table, return NULL */ - return (s32) NULL; + return tiler_virt2phys(arg); break; /* map block */ case TILIOC_MBLK: |