patch-2.4.0-test8 linux/drivers/sbus/char/bpp.c
Next file: linux/drivers/sbus/char/display7seg.c
Previous file: linux/drivers/sbus/char/Makefile
Back to the patch index
Back to the overall index
- Lines: 50
- Date:
Tue Aug 29 14:09:15 2000
- Orig file:
v2.4.0-test7/linux/drivers/sbus/char/bpp.c
- Orig date:
Fri Jul 14 12:12:12 2000
diff -u --recursive --new-file v2.4.0-test7/linux/drivers/sbus/char/bpp.c linux/drivers/sbus/char/bpp.c
@@ -507,7 +507,8 @@
if (pins & BPP_GP_PError) byte |= 0x40;
if (pins & BPP_GP_Busy) byte |= 0x80;
- put_user_ret(byte, c, -EFAULT);
+ if (put_user(byte, c))
+ return -EFAULT;
c += 1;
remaining -= 1;
@@ -559,7 +560,8 @@
for (idx = 0 ; idx < repeat ; idx += 1)
buffer[idx] = instances[minor].repeat_byte;
- copy_to_user_ret(c, buffer, repeat, -EFAULT);
+ if (copy_to_user(c, buffer, repeat))
+ return -EFAULT;
remaining -= repeat;
c += repeat;
instances[minor].run_length -= repeat;
@@ -575,7 +577,8 @@
if (rc & BPP_GP_Busy) {
/* OK, this is data. read it in. */
unsigned char byte = bpp_inb(base_addrs[minor]);
- put_user_ret(byte, c, -EFAULT);
+ if (put_user(byte, c))
+ return -EFAULT;
c += 1;
remaining -= 1;
@@ -685,7 +688,8 @@
while (remaining > 0) {
unsigned char byte;
- get_user_ret(byte, c, -EFAULT);
+ if (get_user(byte, c))
+ return -EFAULT;
c += 1;
rc = wait_for(BPP_GP_nAck, BPP_GP_Busy, TIME_IDLE_LIMIT, minor);
@@ -735,7 +739,8 @@
unsigned char byte;
int rc;
- get_user_ret(byte, c, -EFAULT);
+ if (get_user(byte, c))
+ return -EFAULT;
rc = wait_for(0, BPP_GP_Busy, TIME_PResponse, minor);
if (rc == -1) return -ETIMEDOUT;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)