lkml.org 
[lkml]   [2004]   [Sep]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[vm 6/76] convert zr36120.c to use remap_pfn_range()
On Sat, Sep 25, 2004 at 12:05:36AM -0700, William Lee Irwin III wrote:
> Convert the IGA 1682 framebuffer driver to use remap_pfn_range().

Conver the Zoran 36120/36125 framegrabber driver to use remap_pfn_range().

Index: mm3-2.6.9-rc2/drivers/media/video/zr36120.c
===================================================================
--- mm3-2.6.9-rc2.orig/drivers/media/video/zr36120.c 2004-09-24 17:37:19.000000000 -0700
+++ mm3-2.6.9-rc2/drivers/media/video/zr36120.c 2004-09-24 22:10:34.377593616 -0700
@@ -1474,8 +1474,8 @@
/* start mapping the whole shabang to user memory */
pos = (unsigned long)ztv->fbuffer;
while (size>0) {
- unsigned long page = virt_to_phys((void*)pos);
- if (remap_page_range(vma, start, page, PAGE_SIZE, PAGE_SHARED))
+ unsigned long pfn = virt_to_phys((void*)pos) >> PAGE_SHIFT;
+ if (remap_pfn_range(vma, start, pfn, PAGE_SIZE, PAGE_SHARED))
return -EAGAIN;
start += PAGE_SIZE;
pos += PAGE_SIZE;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 14:06    [from the cache]
©2003-2011 Jasper Spaans