fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / drivers / tc / zs.c
index 6756d0f..fc31972 100644 (file)
@@ -39,7 +39,6 @@
  *     is shared with DSRS(DTE) at pin 23.
  */
 
-#include <linux/config.h>
 #include <linux/errno.h>
 #include <linux/signal.h>
 #include <linux/sched.h>
@@ -186,8 +185,6 @@ static struct tty_driver *serial_driver;
 #define RS_STROBE_TIME 10
 #define RS_ISR_PASS_LIMIT 256
 
-#define _INLINE_ inline
-
 static void probe_sccs(void);
 static void change_speed(struct dec_serial *info);
 static void rs_wait_until_sent(struct tty_struct *tty, int timeout);
@@ -344,14 +341,13 @@ static inline void rs_recv_clear(struct dec_zschannel *zsc)
  * This routine is used by the interrupt handler to schedule
  * processing in the software interrupt portion of the driver.
  */
-static _INLINE_ void rs_sched_event(struct dec_serial *info, int event)
+static void rs_sched_event(struct dec_serial *info, int event)
 {
        info->event |= 1 << event;
        tasklet_schedule(&info->tlet);
 }
 
-static _INLINE_ void receive_chars(struct dec_serial *info,
-                                  struct pt_regs *regs)
+static void receive_chars(struct dec_serial *info)
 {
        struct tty_struct *tty = info->tty;
        unsigned char ch, stat, flag;
@@ -393,7 +389,7 @@ static _INLINE_ void receive_chars(struct dec_serial *info,
                        if (ch == 0)
                                continue;
                        if (time_before(jiffies, break_pressed + HZ * 5)) {
-                               handle_sysrq(ch, regs, NULL);
+                               handle_sysrq(ch, NULL);
                                break_pressed = 0;
                                continue;
                        }
@@ -441,7 +437,7 @@ static void transmit_chars(struct dec_serial *info)
                rs_sched_event(info, RS_EVENT_WRITE_WAKEUP);
 }
 
-static _INLINE_ void status_handle(struct dec_serial *info)
+static void status_handle(struct dec_serial *info)
 {
        unsigned char stat;
 
@@ -494,7 +490,7 @@ static _INLINE_ void status_handle(struct dec_serial *info)
 /*
  * This is the serial driver's generic interrupt routine
  */
-static irqreturn_t rs_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t rs_interrupt(int irq, void *dev_id)
 {
        struct dec_serial *info = (struct dec_serial *) dev_id;
        irqreturn_t status = IRQ_NONE;
@@ -522,7 +518,7 @@ static irqreturn_t rs_interrupt(int irq, void *dev_id, struct pt_regs *regs)
                status = IRQ_HANDLED;
 
                if (zs_intreg & CHBRxIP) {
-                       receive_chars(info, regs);
+                       receive_chars(info);
                }
                if (zs_intreg & CHBTxIP) {
                        transmit_chars(info);
@@ -1242,7 +1238,7 @@ static int rs_ioctl(struct tty_struct *tty, struct file * file,
        return 0;
 }
 
-static void rs_set_termios(struct tty_struct *tty, struct termios *old_termios)
+static void rs_set_termios(struct tty_struct *tty, struct ktermios *old_termios)
 {
        struct dec_serial *info = (struct dec_serial *)tty->driver_data;
        int was_stopped;
@@ -1705,7 +1701,7 @@ static void __init probe_sccs(void)
        spin_unlock_irqrestore(&zs_lock, flags);
 }
 
-static struct tty_operations serial_ops = {
+static const struct tty_operations serial_ops = {
        .open = rs_open,
        .close = rs_close,
        .write = rs_write,
@@ -1748,7 +1744,6 @@ int __init zs_init(void)
        /* Not all of this is exactly right for us. */
 
        serial_driver->owner = THIS_MODULE;
-       serial_driver->devfs_name = "tts/";
        serial_driver->name = "ttyS";
        serial_driver->major = TTY_MAJOR;
        serial_driver->minor_start = 64;
@@ -1757,7 +1752,7 @@ int __init zs_init(void)
        serial_driver->init_termios = tty_std_termios;
        serial_driver->init_termios.c_cflag =
                B9600 | CS8 | CREAD | HUPCL | CLOCAL;
-       serial_driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS;
+       serial_driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV;
        tty_set_operations(serial_driver, &serial_ops);
 
        if (tty_register_driver(serial_driver))
@@ -1796,7 +1791,7 @@ int __init zs_init(void)
                zs_soft[channel].clk_divisor = 16;
                zs_soft[channel].zs_baud = get_zsbaud(&zs_soft[channel]);
 
-               if (request_irq(zs_soft[channel].irq, rs_interrupt, SA_SHIRQ,
+               if (request_irq(zs_soft[channel].irq, rs_interrupt, IRQF_SHARED,
                                "scc", &zs_soft[channel]))
                        printk(KERN_ERR "decserial: can't get irq %d\n",
                               zs_soft[channel].irq);