summaryrefslogtreecommitdiffstats
path: root/drivers/char/psaux.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1997-12-06 23:51:34 +0000
committerRalf Baechle <ralf@linux-mips.org>1997-12-06 23:51:34 +0000
commit230e5ab6a084ed50470f101934782dbf54b0d06b (patch)
tree5dd821c8d33f450470588e7a543f74bf74306e9e /drivers/char/psaux.c
parentc9b1c8a64c6444d189856f1e26bdcb8b4cd0113a (diff)
Merge with Linux 2.1.67.
Diffstat (limited to 'drivers/char/psaux.c')
-rw-r--r--drivers/char/psaux.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/char/psaux.c b/drivers/char/psaux.c
index d297670a8..771af9a51 100644
--- a/drivers/char/psaux.c
+++ b/drivers/char/psaux.c
@@ -321,13 +321,13 @@ static int open_aux(struct inode * inode, struct file * file)
* 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 {
@@ -345,7 +345,7 @@ static long write_aux(struct inode * inode, struct file * file,
retval = -EIO;
if (written) {
retval = written;
- inode->i_mtime = CURRENT_TIME;
+ file->f_dentry->d_inode->i_mtime = CURRENT_TIME;
}
}
@@ -468,10 +468,10 @@ static int open_qp(struct inode * inode, struct file * file)
* 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;
@@ -480,7 +480,7 @@ static long write_qp(struct inode * inode, struct file * file,
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;
}
@@ -546,11 +546,11 @@ __initfunc(static int probe_qp(void))
* 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()) {
@@ -559,7 +559,7 @@ static long read_aux(struct inode * inode, struct file * file,
add_wait_queue(&queue->proc_list, &wait);
repeat:
current->state = TASK_INTERRUPTIBLE;
- if (queue_empty() && !(current->signal & ~current->blocked)) {
+ if (queue_empty() && !signal_pending(current)) {
schedule();
goto repeat;
}
@@ -573,10 +573,10 @@ repeat:
}
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 (current->signal & ~current->blocked)
+ if (signal_pending(current))
return -ERESTARTSYS;
return 0;
}