patch-2.4.27 linux-2.4.27/drivers/char/tpqic02.c

Next file: linux-2.4.27/drivers/char/vc_screen.c
Previous file: linux-2.4.27/drivers/char/tipar.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.26/drivers/char/tpqic02.c linux-2.4.27/drivers/char/tpqic02.c
@@ -1818,6 +1818,7 @@
 	kdev_t dev = filp->f_dentry->d_inode->i_rdev;
 	unsigned short flags = filp->f_flags;
 	unsigned long bytes_todo, bytes_done, total_bytes_done = 0;
+	loff_t pos = *ppos;
 	int stat;
 
 	if (status_zombie == YES) {
@@ -1898,6 +1899,7 @@
 
 	/*****************************/
 		if (bytes_todo == 0) {
+			*ppos = pos;
 			return total_bytes_done;
 		}
 
@@ -1966,7 +1968,7 @@
 		if (bytes_done > 0) {
 			status_bytes_rd = YES;
 			buf += bytes_done;
-			*ppos += bytes_done;
+			pos += bytes_done;
 			total_bytes_done += bytes_done;
 			count -= bytes_done;
 		}

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