diff options
author | Suman Anna <s-anna@ti.com> | 2011-05-26 15:15:18 -0400 |
---|---|---|
committer | Paolo Pisati <paolo.pisati@canonical.com> | 2012-08-17 04:19:04 -0400 |
commit | 8a985497e114d75e28e13ec48442f8b2dadbc363 (patch) | |
tree | 45cfac3ade237d8e8b92e3b6b2af50cebc0439b1 | |
parent | cdedbaf317653ac0f453caa4c71f9ced5d430539 (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) | |||
327 | /* ioctl handler */ | 327 | /* ioctl handler */ |
328 | static long tiler_ioctl(struct file *filp, u32 cmd, unsigned long arg) | 328 | static long tiler_ioctl(struct file *filp, u32 cmd, unsigned long arg) |
329 | { | 329 | { |
330 | pgd_t *pgd; | ||
331 | pmd_t *pmd; | ||
332 | pte_t *ptep, pte; | ||
333 | s32 r; | 330 | s32 r; |
334 | void __user *data = (void __user *)arg; | 331 | void __user *data = (void __user *)arg; |
335 | struct process_info *pi = filp->private_data; | 332 | struct process_info *pi = filp->private_data; |
@@ -393,21 +390,7 @@ static long tiler_ioctl(struct file *filp, u32 cmd, unsigned long arg) | |||
393 | break; | 390 | break; |
394 | /* get physical address */ | 391 | /* get physical address */ |
395 | case TILIOC_GSSP: | 392 | case TILIOC_GSSP: |
396 | pgd = pgd_offset(current->mm, arg); | 393 | return tiler_virt2phys(arg); |
397 | if (!(pgd_none(*pgd) || pgd_bad(*pgd))) { | ||
398 | pmd = pmd_offset(pgd, arg); | ||
399 | if (!(pmd_none(*pmd) || pmd_bad(*pmd))) { | ||
400 | ptep = pte_offset_map(pmd, arg); | ||
401 | if (ptep) { | ||
402 | pte = *ptep; | ||
403 | if (pte_present(pte)) | ||
404 | return (pte & PAGE_MASK) | | ||
405 | (~PAGE_MASK & arg); | ||
406 | } | ||
407 | } | ||
408 | } | ||
409 | /* va not in page table, return NULL */ | ||
410 | return (s32) NULL; | ||
411 | break; | 394 | break; |
412 | /* map block */ | 395 | /* map block */ |
413 | case TILIOC_MBLK: | 396 | case TILIOC_MBLK: |