summaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1999-07-05 23:09:37 +0000
committerRalf Baechle <ralf@linux-mips.org>1999-07-05 23:09:37 +0000
commitaba344fdfed81b2c03d6114c54cfd73a486aa10b (patch)
treed032d8430bf1234c3ecc6f6330d6de6e887e5963 /drivers/char
parent40c138bfc6d37dbff5339f84575db1e3cec6e34e (diff)
Merge with Linux 2.3.9.
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/ftape/lowlevel/ftape-proc.c5
-rw-r--r--drivers/char/pc_keyb.c2
-rw-r--r--drivers/char/serial.c9
-rw-r--r--drivers/char/sysrq.c2
-rw-r--r--drivers/char/tpqic02.c2
-rw-r--r--drivers/char/tty_io.c10
6 files changed, 16 insertions, 14 deletions
diff --git a/drivers/char/ftape/lowlevel/ftape-proc.c b/drivers/char/ftape/lowlevel/ftape-proc.c
index ee21d92d4..ef91ff6c9 100644
--- a/drivers/char/ftape/lowlevel/ftape-proc.c
+++ b/drivers/char/ftape/lowlevel/ftape-proc.c
@@ -112,11 +112,14 @@ static struct inode_operations ftape_proc_inode_operations =
NULL, /* mknod */
NULL, /* rename */
NULL, /* readlink */
+ NULL, /* get_block */
NULL, /* readpage */
NULL, /* writepage */
- NULL, /* bmap */
+ NULL, /* flushpage */
NULL, /* truncate */
NULL, /* permission */
+ NULL, /* smap */
+ NULL, /* revalidate */
};
/*
diff --git a/drivers/char/pc_keyb.c b/drivers/char/pc_keyb.c
index bf3d1f41d..8c4b85eec 100644
--- a/drivers/char/pc_keyb.c
+++ b/drivers/char/pc_keyb.c
@@ -782,7 +782,7 @@ static void aux_write_ack(int val)
spin_lock_irqsave(&kbd_controller_lock, flags);
kb_wait();
- kbd_write_cmd(KBD_CCMD_WRITE_MOUSE);
+ kbd_write_command(KBD_CCMD_WRITE_MOUSE);
kb_wait();
kbd_write_output(val);
/* we expect an ACK in response. */
diff --git a/drivers/char/serial.c b/drivers/char/serial.c
index 4a3d6e00e..ded6b227e 100644
--- a/drivers/char/serial.c
+++ b/drivers/char/serial.c
@@ -105,7 +105,8 @@
#define RS_STROBE_TIME (10*HZ)
#define RS_ISR_PASS_LIMIT 256
-#define IRQ_T(info) ((info->flags & ASYNC_SHARE_IRQ) ? SA_SHIRQ : SA_INTERRUPT)
+#define IRQ_T(state) \
+ ((state->flags & ASYNC_SHARE_IRQ) ? SA_SHIRQ : SA_INTERRUPT)
#define SERIAL_INLINE
@@ -1025,7 +1026,7 @@ static int startup(struct async_struct * info)
} else
handler = rs_interrupt_single;
- retval = request_irq(state->irq, handler, IRQ_T(info),
+ retval = request_irq(state->irq, handler, IRQ_T(state),
"serial", NULL);
if (retval) {
if (capable(CAP_SYS_ADMIN)) {
@@ -1190,7 +1191,7 @@ static void shutdown(struct async_struct * info)
if (IRQ_ports[state->irq]) {
free_irq(state->irq, NULL);
retval = request_irq(state->irq, rs_interrupt_single,
- IRQ_T(info), "serial", NULL);
+ IRQ_T(state), "serial", NULL);
if (retval)
printk("serial shutdown: request_irq: error %d"
@@ -2039,7 +2040,7 @@ static int set_multiport_struct(struct async_struct * info,
else
handler = rs_interrupt;
- retval = request_irq(state->irq, handler, IRQ_T(info),
+ retval = request_irq(state->irq, handler, IRQ_T(state),
"serial", NULL);
if (retval) {
printk("Couldn't reallocate serial interrupt "
diff --git a/drivers/char/sysrq.c b/drivers/char/sysrq.c
index 5a4ad1c6f..574f1b1e9 100644
--- a/drivers/char/sysrq.c
+++ b/drivers/char/sysrq.c
@@ -155,7 +155,7 @@ static void all_files_read_only(void) /* Kill write permissions of all files
struct file *file;
for (file = inuse_filps; file; file = file->f_next)
- if (file->f_dentry && file->f_count && S_ISREG(file->f_dentry->d_inode->i_mode))
+ if (file->f_dentry && atomic_read(&file->f_count) && S_ISREG(file->f_dentry->d_inode->i_mode))
file->f_mode &= ~2;
}
diff --git a/drivers/char/tpqic02.c b/drivers/char/tpqic02.c
index 67b8f3a71..edcf6f2f3 100644
--- a/drivers/char/tpqic02.c
+++ b/drivers/char/tpqic02.c
@@ -2216,7 +2216,7 @@ static int qic02_tape_open_no_use_count(struct inode * inode, struct file * filp
}
/* Only one at a time from here on... */
- if (filp->f_count>1) /* filp->f_count==1 for the first open() */
+ if (atomic_read(&filp->f_count)>1) /* filp->f_count==1 for the first open() */
{
return -EBUSY;
}
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c
index df5a8efc7..3951b5422 100644
--- a/drivers/char/tty_io.c
+++ b/drivers/char/tty_io.c
@@ -628,10 +628,12 @@ static ssize_t tty_read(struct file * file, char * buf, size_t count,
return -ERESTARTSYS;
}
#endif
+ lock_kernel();
if (tty->ldisc.read)
i = (tty->ldisc.read)(tty,file,buf,count);
else
i = -EIO;
+ unlock_kernel();
if (i > 0)
inode->i_atime = CURRENT_TIME;
return i;
@@ -658,7 +660,9 @@ static inline ssize_t do_tty_write(
unsigned long size = PAGE_SIZE*2;
if (size > count)
size = count;
+ lock_kernel();
ret = write(tty, file, buf, size);
+ unlock_kernel();
if (ret <= 0)
break;
written += ret;
@@ -2034,11 +2038,7 @@ long __init console_init(long kmem_start, long kmem_end)
memcpy(tty_std_termios.c_cc, INIT_C_CC, NCCS);
tty_std_termios.c_iflag = ICRNL | IXON;
tty_std_termios.c_oflag = OPOST | ONLCR;
-#if CONFIG_COBALT_SERIAL
- tty_std_termios.c_cflag = B115200 | CS8 | CREAD | HUPCL;
-#else
tty_std_termios.c_cflag = B38400 | CS8 | CREAD | HUPCL;
-#endif
tty_std_termios.c_lflag = ISIG | ICANON | ECHO | ECHOE | ECHOK |
ECHOCTL | ECHOKE | IEXTEN;
@@ -2131,10 +2131,8 @@ __initfunc(int tty_init(void))
if (tty_register_driver(&dev_console_driver))
panic("Couldn't register /dev/tty0 driver\n");
-#ifndef CONFIG_COBALT_MICRO_SERVER
kbd_init();
#endif
-#endif
#ifdef CONFIG_ESPSERIAL /* init ESP before rs, so rs doesn't see the port */
espserial_init();
#endif