summaryrefslogtreecommitdiffstats
path: root/drivers/ieee1394/dma.c
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2007-12-15 14:04:42 +0100
committerStefan Richter <stefanr@s5r6.in-berlin.de>2008-01-30 22:22:20 +0100
commitc7ea990f87f9fbe6a7183c03f7993b3360454834 (patch)
treeed8af5fe802271b174aed630d79ea949c0684574 /drivers/ieee1394/dma.c
parent61db81214bcef33a41325bdc436fb515b697fcdb (diff)
downloadop-kernel-dev-c7ea990f87f9fbe6a7183c03f7993b3360454834.zip
op-kernel-dev-c7ea990f87f9fbe6a7183c03f7993b3360454834.tar.gz
ieee1394: small cleanup after "nopage"
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/ieee1394/dma.c')
-rw-r--r--drivers/ieee1394/dma.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/ieee1394/dma.c b/drivers/ieee1394/dma.c
index ec024b5..73685e7 100644
--- a/drivers/ieee1394/dma.c
+++ b/drivers/ieee1394/dma.c
@@ -231,28 +231,20 @@ void dma_region_sync_for_device(struct dma_region *dma, unsigned long offset,
#ifdef CONFIG_MMU
-/* fault() handler for mmap access */
-
static int dma_region_pagefault(struct vm_area_struct *vma,
- struct vm_fault *vmf)
+ struct vm_fault *vmf)
{
- unsigned long kernel_virt_addr;
-
struct dma_region *dma = (struct dma_region *)vma->vm_private_data;
if (!dma->kvirt)
- goto error;
+ return VM_FAULT_SIGBUS;
if (vmf->pgoff >= dma->n_pages)
- goto error;
+ return VM_FAULT_SIGBUS;
- kernel_virt_addr = (unsigned long)dma->kvirt + (vmf->pgoff << PAGE_SHIFT);
- vmf->page = vmalloc_to_page((void *)kernel_virt_addr);
+ vmf->page = vmalloc_to_page(dma->kvirt + (vmf->pgoff << PAGE_SHIFT));
get_page(vmf->page);
return 0;
-
- error:
- return VM_FAULT_SIGBUS;
}
static struct vm_operations_struct dma_region_vm_ops = {
OpenPOWER on IntegriCloud