summaryrefslogtreecommitdiffstats
path: root/drivers/video/cgfourteenfb.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-10-05 01:18:40 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-10-05 01:18:40 +0000
commit012bb3e61e5eced6c610f9e036372bf0c8def2d1 (patch)
tree87efc733f9b164e8c85c0336f92c8fb7eff6d183 /drivers/video/cgfourteenfb.c
parent625a1589d3d6464b5d90b8a0918789e3afffd220 (diff)
Merge with Linux 2.4.0-test9. Please check DECstation, I had a number
of rejects to fixup while integrating Linus patches. I also found that this kernel will only boot SMP on Origin; the UP kernel freeze soon after bootup with SCSI timeout messages. I commit this anyway since I found that the last CVS versions had the same problem.
Diffstat (limited to 'drivers/video/cgfourteenfb.c')
-rw-r--r--drivers/video/cgfourteenfb.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/video/cgfourteenfb.c b/drivers/video/cgfourteenfb.c
index fe7fae535..05a578bfd 100644
--- a/drivers/video/cgfourteenfb.c
+++ b/drivers/video/cgfourteenfb.c
@@ -1,4 +1,4 @@
-/* $Id: cgfourteenfb.c,v 1.7 1999/11/19 09:57:01 davem Exp $
+/* $Id: cgfourteenfb.c,v 1.8 2000/08/29 07:01:56 davem Exp $
* cgfourteenfb.c: CGfourteen frame buffer driver
*
* Copyright (C) 1996,1998 Jakub Jelinek (jj@ultra.linux.cz)
@@ -299,15 +299,17 @@ static int cg14_ioctl (struct fb_info_sbusfb *fb, unsigned int cmd, unsigned lon
break;
case MDI_GET_CFGINFO:
mdii = (struct mdi_cfginfo *)arg;
- put_user_ret(FBTYPE_MDICOLOR, &mdii->mdi_type, -EFAULT);
- __put_user_ret(fb->type.fb_height, &mdii->mdi_height, -EFAULT);
- __put_user_ret(fb->type.fb_width, &mdii->mdi_width, -EFAULT);
- __put_user_ret(fb->s.cg14.mode, &mdii->mdi_mode, -EFAULT);
- __put_user_ret(72, &mdii->mdi_pixfreq, -EFAULT); /* FIXME */
- __put_user_ret(fb->s.cg14.ramsize, &mdii->mdi_size, -EFAULT);
+ if (put_user(FBTYPE_MDICOLOR, &mdii->mdi_type) ||
+ __put_user(fb->type.fb_height, &mdii->mdi_height) ||
+ __put_user(fb->type.fb_width, &mdii->mdi_width) ||
+ __put_user(fb->s.cg14.mode, &mdii->mdi_mode) ||
+ __put_user(72, &mdii->mdi_pixfreq) || /* FIXME */
+ __put_user(fb->s.cg14.ramsize, &mdii->mdi_size))
+ return -EFAULT;
break;
case MDI_SET_PIXELMODE:
- get_user_ret(mode, (int *)arg, -EFAULT);
+ if (get_user(mode, (int *)arg))
+ return -EFAULT;
spin_lock_irqsave(&fb->lock, flags);
tmp = sbus_readb(mcr);