changeset 27026:9e24bdf7bf97

add MGA_VID_GET_VERSION ioctl to old mga_vid driver for compatibility with "new" mplayer
author attila
date Sat, 14 Jun 2008 14:26:42 +0000
parents e598c9756181
children 03f571138664
files drivers/mga_vid.c
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/drivers/mga_vid.c	Sat Jun 14 09:14:16 2008 +0000
+++ b/drivers/mga_vid.c	Sat Jun 14 14:26:42 2008 +0000
@@ -1193,6 +1193,14 @@
 
 	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));