diff options
Diffstat (limited to 'drivers/mga_vid.c')
-rw-r--r-- | drivers/mga_vid.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/mga_vid.c b/drivers/mga_vid.c index eb790f2060..7b99a6c55f 100644 --- a/drivers/mga_vid.c +++ b/drivers/mga_vid.c @@ -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)); |