Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
[powerpc.git] / drivers / char / riscom8.c
index 119e629..214d850 100644 (file)
@@ -625,7 +625,7 @@ static inline int rc_setup_board(struct riscom_board * bp)
        if (bp->flags & RC_BOARD_ACTIVE) 
                return 0;
        
-       error = request_irq(bp->irq, rc_interrupt, SA_INTERRUPT,
+       error = request_irq(bp->irq, rc_interrupt, IRQF_DISABLED,
                            "RISCom/8", NULL);
        if (error) 
                return error;
@@ -675,26 +675,12 @@ static void rc_change_speed(struct riscom_board *bp, struct riscom_port *port)
        port->COR2 = 0;
        port->MSVR = MSVR_RTS;
        
-       baud = C_BAUD(tty);
-       
-       if (baud & CBAUDEX) {
-               baud &= ~CBAUDEX;
-               if (baud < 1 || baud > 2) 
-                       port->tty->termios->c_cflag &= ~CBAUDEX;
-               else
-                       baud += 15;
-       }
-       if (baud == 15)  {
-               if ((port->flags & ASYNC_SPD_MASK) == ASYNC_SPD_HI)
-                       baud ++;
-               if ((port->flags & ASYNC_SPD_MASK) == ASYNC_SPD_VHI)
-                       baud += 2;
-       }
+       baud = tty_get_baud_rate(tty);
        
        /* Select port on the board */
        rc_out(bp, CD180_CAR, port_No(port));
        
-       if (!baud_table[baud])  {
+       if (!baud)  {
                /* Drop DTR & exit */
                bp->DTR |= (1u << port_No(port));
                rc_out(bp, RC_DTR, bp->DTR);
@@ -710,7 +696,7 @@ static void rc_change_speed(struct riscom_board *bp, struct riscom_port *port)
         */
        
        /* Set baud rate for port */
-       tmp = (((RC_OSCFREQ + baud_table[baud]/2) / baud_table[baud] +
+       tmp = (((RC_OSCFREQ + baud/2) / baud +
                CD180_TPC/2) / CD180_TPC);
 
        rc_out(bp, CD180_RBPRH, (tmp >> 8) & 0xff); 
@@ -718,7 +704,7 @@ static void rc_change_speed(struct riscom_board *bp, struct riscom_port *port)
        rc_out(bp, CD180_RBPRL, tmp & 0xff); 
        rc_out(bp, CD180_TBPRL, tmp & 0xff);
        
-       baud = (baud_table[baud] + 5) / 10;   /* Estimated CPS */
+       baud = (baud + 5) / 10;   /* Estimated CPS */
        
        /* Two timer ticks seems enough to wakeup something like SLIP driver */
        tmp = ((baud + HZ/2) / HZ) * 2 - CD180_NFIFO;           
@@ -1597,7 +1583,7 @@ static void do_softint(void *private_)
        }
 }
 
-static struct tty_operations riscom_ops = {
+static const struct tty_operations riscom_ops = {
        .open  = rc_open,
        .close = rc_close,
        .write = rc_write,
@@ -1634,7 +1620,6 @@ static inline int rc_init_drivers(void)
        memset(IRQ_to_board, 0, sizeof(IRQ_to_board));
        riscom_driver->owner = THIS_MODULE;
        riscom_driver->name = "ttyL";
-       riscom_driver->devfs_name = "tts/L";
        riscom_driver->major = RISCOM8_NORMAL_MAJOR;
        riscom_driver->type = TTY_DRIVER_TYPE_SERIAL;
        riscom_driver->subtype = SERIAL_TYPE_NORMAL;
@@ -1743,10 +1728,10 @@ static int iobase;
 static int iobase1;
 static int iobase2;
 static int iobase3;
-MODULE_PARM(iobase, "i");
-MODULE_PARM(iobase1, "i");
-MODULE_PARM(iobase2, "i");
-MODULE_PARM(iobase3, "i");
+module_param(iobase, int, 0);
+module_param(iobase1, int, 0);
+module_param(iobase2, int, 0);
+module_param(iobase3, int, 0);
 
 MODULE_LICENSE("GPL");
 #endif /* MODULE */