summaryrefslogtreecommitdiff
path: root/v4l
diff options
context:
space:
mode:
authorTrent Piepho <xyzzy@speakeasy.org>2007-02-19 19:57:36 -0800
committerTrent Piepho <xyzzy@speakeasy.org>2007-02-19 19:57:36 -0800
commit98901e271eeb3ffc496d67ebe1f30c744d7e63cd (patch)
tree4816d0977734c49761a4f21493d6d7a5b322b46c /v4l
parentdf6112a72da3840ed73c44ba5bdc8f69228d4393 (diff)
downloadmediapointer-dvb-s2-98901e271eeb3ffc496d67ebe1f30c744d7e63cd.tar.gz
mediapointer-dvb-s2-98901e271eeb3ffc496d67ebe1f30c744d7e63cd.tar.bz2
compat: Add compat code for vm_insert_page()
From: Trent Piepho <xyzzy@speakeasy.org> Add an inline versin of vm_insert_page() that uses remap_pfn_range() to compat.h. Remove compat code from em28xx-video.c, sn9c102_core.c, and usbvision-video.c since compat.h is now doing the same thing. USB_ZC0301, USB_ET61X251, and USB_ZR364XX will now compile under 2.6.12. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Diffstat (limited to 'v4l')
-rw-r--r--v4l/compat.h10
-rw-r--r--v4l/versions.txt6
2 files changed, 13 insertions, 3 deletions
diff --git a/v4l/compat.h b/v4l/compat.h
index 25c11f460..2b2de93a7 100644
--- a/v4l/compat.h
+++ b/v4l/compat.h
@@ -224,6 +224,16 @@ static inline unsigned long vmalloc_to_pfn(void * vmalloc_addr)
#endif
+/* vm_insert_page() was added in 2.6.15 */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15) && defined(_LINUX_MM_H)
+static inline int vm_insert_page(struct vm_area_struct *vma,
+ unsigned long addr, struct page *page)
+{
+ return remap_pfn_range(vma, addr, page_to_pfn(page), PAGE_SIZE,
+ vma->vm_page_prot);
+}
+#endif
+
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,9)
#ifndef kcalloc
#define kcalloc(n,size,flags) \
diff --git a/v4l/versions.txt b/v4l/versions.txt
index d00fc9a67..f29387417 100644
--- a/v4l/versions.txt
+++ b/v4l/versions.txt
@@ -39,9 +39,6 @@ TUNER_3036
# Uses vm_insert_page()
[2.6.15]
-USB_ZC0301
-USB_ET61X251
-USB_ZR364XX
[2.6.12]
VIDEO_VIVI
@@ -216,3 +213,6 @@ VIDEO_SAA7110
SOUND_ACI_MIXER
USB_KONICAWC
USB_QUICKCAM_MESSENGER
+USB_ZC0301
+USB_ET61X251
+USB_ZR364XX