patch-2.4.11-dontuse linux/drivers/usb/mdc800.c

Next file: linux/drivers/usb/microtek.c
Previous file: linux/drivers/usb/kaweth.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.10/linux/drivers/usb/mdc800.c linux/drivers/usb/mdc800.c
@@ -718,7 +718,6 @@
 static ssize_t mdc800_device_write (struct file *file, const char *buf, size_t len, loff_t *pos)
 {
 	int i=0;
-	char c;
 
 	spin_lock (&mdc800->io_lock);
 	if (mdc800->state != READY)
@@ -741,14 +740,7 @@
 		}
 
 		/* check for command start */
-		
-		if(get_user(c, buf+i))
-		{
-			spin_unlock (&mdc800->io_lock);
-			return -EFAULT;
-		}
-		
-		if (c == (char) 0x55)
+		if (buf [i] == (char) 0x55)
 		{
 			mdc800->in_count=0;
 			mdc800->out_count=0;
@@ -759,7 +751,7 @@
 		/* save command byte */
 		if (mdc800->in_count < 8)
 		{
-			mdc800->in[mdc800->in_count]=c;
+			mdc800->in[mdc800->in_count]=buf[i];
 			mdc800->in_count++;
 		}
 		else
@@ -990,4 +982,5 @@
 
 MODULE_AUTHOR( DRIVER_AUTHOR );
 MODULE_DESCRIPTION( DRIVER_DESC );
+MODULE_LICENSE("GPL");
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)