patch-2.1.60 linux/drivers/char/psaux.c

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

diff -u --recursive --new-file v2.1.59/linux/drivers/char/psaux.c linux/drivers/char/psaux.c
@@ -302,13 +302,13 @@
  * Write to the aux device.
  */
 
-static long write_aux(struct inode * inode, struct file * file,
-	const char * buffer, unsigned long count)
+static ssize_t write_aux(struct file * file, const char * buffer,
+			 size_t count, loff_t *ppos)
 {
-	int retval = 0;
+	ssize_t retval = 0;
 
 	if (count) {
-		int written = 0;
+		ssize_t written = 0;
 
 		aux_start_atomic();
 		do {
@@ -326,7 +326,7 @@
 		retval = -EIO;
 		if (written) {
 			retval = written;
-			inode->i_mtime = CURRENT_TIME;
+			file->f_dentry->d_inode->i_mtime = CURRENT_TIME;
 		}
 	}
 
@@ -449,10 +449,10 @@
  * Write to the 82C710 mouse device.
  */
 
-static long write_qp(struct inode * inode, struct file * file,
-	const char * buffer, unsigned long count)
+static ssize_t write_qp(struct file * file, const char * buffer,
+			size_t count, loff_t *ppos)
 {
-	int i = count;
+	ssize_t i = count;
 
 	while (i--) {
 		char c;
@@ -461,7 +461,7 @@
 		get_user(c, buffer++);
 		outb_p(c, qp_data);
 	}
-	inode->i_mtime = CURRENT_TIME;
+	file->f_dentry->d_inode->i_mtime = CURRENT_TIME;
 	return count;
 }
 
@@ -527,11 +527,11 @@
  * Put bytes from input queue to buffer.
  */
 
-static long read_aux(struct inode * inode, struct file * file,
-	char * buffer, unsigned long count)
+static ssize_t read_aux(struct file * file, char * buffer,
+			size_t count, loff_t *ppos)
 {
 	struct wait_queue wait = { current, NULL };
-	int i = count;
+	ssize_t i = count;
 	unsigned char c;
 
 	if (queue_empty()) {
@@ -554,7 +554,7 @@
 	}
 	aux_ready = !queue_empty();
 	if (count-i) {
-		inode->i_atime = CURRENT_TIME;
+		file->f_dentry->d_inode->i_atime = CURRENT_TIME;
 		return count-i;
 	}
 	if (signal_pending(current))

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