patch-2.1.4 linux/drivers/char/baycom.c

Next file: linux/drivers/char/console.c
Previous file: linux/drivers/char/apm_bios.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.3/linux/drivers/char/baycom.c linux/drivers/char/baycom.c
@@ -437,7 +437,7 @@
 	if(free < needed) return 0;		/* buffer overrun */
 	hdr = (struct packet_hdr *)(buf->buffer+buf->wr);
 	if (from_user) 
-		memcpy_fromfs(hdr+1,data,len);
+		copy_from_user(hdr+1,data,len);
 	else
 		memcpy(hdr+1,data,len);
 	hdr->len = len;
@@ -1847,7 +1847,7 @@
 		par.slottime = bc->ch_params.slottime;
 		par.ppersist = bc->ch_params.ppersist;
 		par.fulldup = bc->ch_params.fulldup;
-		memcpy_tofs((void *)arg, &par, sizeof(par));
+		copy_to_user((void *)arg, &par, sizeof(par));
 		return 0;
 
 	case BAYCOMCTL_SETPARAMS:
@@ -1857,7 +1857,7 @@
 				sizeof(par));
 		if (i)
 			return i;
-		memcpy_fromfs(&par, (void *)arg, sizeof(par));
+		copy_from_user(&par, (void *)arg, sizeof(par));
 		printk(KERN_INFO "baycom: changing hardware type: modem %u "
 		       "iobase 0x%x irq %u options 0x%x\n", par.modem_type,
 		       par.iobase, par.irq, par.options);
@@ -1877,7 +1877,7 @@
 				sizeof(struct baycom_statistics));
 		if (i)
 			return i;
-		memcpy_tofs((void *)arg, &bc->stat, 
+		copy_to_user((void *)arg, &bc->stat, 
 			    sizeof(struct baycom_statistics));
 		return 0;
 		

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov