[Mplayer-cvslog] CVS: main/drivers mga_vid.c,1.46,1.47

Alex Beregszaszi alex at mplayerhq.hu
Fri Jun 28 18:35:40 CEST 2002


Update of /cvsroot/mplayer/main/drivers
In directory mail:/var/tmp.root/cvs-serv1981

Modified Files:
	mga_vid.c 
Log Message:
linux-2.5.x support patch by Sytse Wielinga <s.b.wieling at student.utwente.nl>

Index: mga_vid.c
===================================================================
RCS file: /cvsroot/mplayer/main/drivers/mga_vid.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -r1.46 -r1.47
--- mga_vid.c	13 May 2002 22:10:11 -0000	1.46
+++ mga_vid.c	28 Jun 2002 16:35:37 -0000	1.47
@@ -133,7 +133,9 @@
                 *endp = (char *)cp;
         return result;
 }
+#endif
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0) || LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,5)
 static long simple_strtol(const char *cp,char **endp,unsigned int base)
 {
         if(*cp=='-')
@@ -1472,8 +1474,13 @@
 #ifdef MP_DEBUG
 	printk(KERN_DEBUG "mga_vid: mapping video memory into userspace\n");
 #endif	
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,3)
+	if(remap_page_range(vma, vma->vm_start, mga_mem_base + mga_src_base,
+		 vma->vm_end - vma->vm_start, vma->vm_page_prot)) 
+#else
 	if(remap_page_range(vma->vm_start, mga_mem_base + mga_src_base,
 		 vma->vm_end - vma->vm_start, vma->vm_page_prot)) 
+#endif
 	{
 		printk(KERN_ERR "mga_vid: error mapping video memory\n");
 		return(-EAGAIN);
@@ -1507,7 +1514,11 @@
 
 static int mga_vid_open(struct inode *inode, struct file *file)
 {
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,2)
+	int minor = MINOR(inode->i_rdev.value);
+#else
 	int minor = MINOR(inode->i_rdev);
+#endif
 
 	if(minor != 0)
 	 return(-ENXIO);




More information about the MPlayer-cvslog mailing list