add MGA_VID_GET_VERSION ioctl to old mga_vid driver for compatibility with "new"...
authorattila <attila@b3059339-0415-0410-9bf9-f77b7e298cf2>
Sat, 14 Jun 2008 14:26:42 +0000 (14:26 +0000)
committerattila <attila@b3059339-0415-0410-9bf9-f77b7e298cf2>
Sat, 14 Jun 2008 14:26:42 +0000 (14:26 +0000)
git-svn-id: svn://git.mplayerhq.hu/mplayer/trunk@27058 b3059339-0415-0410-9bf9-f77b7e298cf2

drivers/mga_vid.c

index eb790f2..7b99a6c 100644 (file)
@@ -1193,6 +1193,14 @@ static int mga_vid_ioctl(struct inode *inode, struct file *file, unsigned int cm
 
        switch(cmd) 
        {
+               case MGA_VID_GET_VERSION:
+                       tmp = MGA_VID_VERSION;
+                       if (copy_to_user((uint32_t *) arg, &tmp, sizeof(uint32_t))) {
+                               printk(KERN_ERR "mga_vid: failed copy %p to userspace %p\n", &tmp, (uint32_t *) arg);
+                               return (-EFAULT);
+                       }
+                       break;
+
                case MGA_VID_CONFIG:
                        //FIXME remove
 //                     printk(KERN_DEBUG "mga_vid: vcount = %d\n",readl(card->mmio_base + VCOUNT));