diff options
Diffstat (limited to 'drivers/char/riscom8.c')
-rw-r--r-- | drivers/char/riscom8.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/char/riscom8.c b/drivers/char/riscom8.c index 214d850112fd..b0ab3f28cc6a 100644 --- a/drivers/char/riscom8.c +++ b/drivers/char/riscom8.c | |||
@@ -81,7 +81,6 @@ | |||
81 | 81 | ||
82 | static struct riscom_board * IRQ_to_board[16]; | 82 | static struct riscom_board * IRQ_to_board[16]; |
83 | static struct tty_driver *riscom_driver; | 83 | static struct tty_driver *riscom_driver; |
84 | static unsigned char * tmp_buf; | ||
85 | 84 | ||
86 | static unsigned long baud_table[] = { | 85 | static unsigned long baud_table[] = { |
87 | 0, 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, 4800, | 86 | 0, 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, 4800, |
@@ -1124,7 +1123,7 @@ static int rc_write(struct tty_struct * tty, | |||
1124 | 1123 | ||
1125 | bp = port_Board(port); | 1124 | bp = port_Board(port); |
1126 | 1125 | ||
1127 | if (!tty || !port->xmit_buf || !tmp_buf) | 1126 | if (!tty || !port->xmit_buf) |
1128 | return 0; | 1127 | return 0; |
1129 | 1128 | ||
1130 | save_flags(flags); | 1129 | save_flags(flags); |
@@ -1612,11 +1611,6 @@ static inline int rc_init_drivers(void) | |||
1612 | if (!riscom_driver) | 1611 | if (!riscom_driver) |
1613 | return -ENOMEM; | 1612 | return -ENOMEM; |
1614 | 1613 | ||
1615 | if (!(tmp_buf = (unsigned char *) get_zeroed_page(GFP_KERNEL))) { | ||
1616 | printk(KERN_ERR "rc: Couldn't get free page.\n"); | ||
1617 | put_tty_driver(riscom_driver); | ||
1618 | return 1; | ||
1619 | } | ||
1620 | memset(IRQ_to_board, 0, sizeof(IRQ_to_board)); | 1614 | memset(IRQ_to_board, 0, sizeof(IRQ_to_board)); |
1621 | riscom_driver->owner = THIS_MODULE; | 1615 | riscom_driver->owner = THIS_MODULE; |
1622 | riscom_driver->name = "ttyL"; | 1616 | riscom_driver->name = "ttyL"; |
@@ -1629,7 +1623,6 @@ static inline int rc_init_drivers(void) | |||
1629 | riscom_driver->flags = TTY_DRIVER_REAL_RAW; | 1623 | riscom_driver->flags = TTY_DRIVER_REAL_RAW; |
1630 | tty_set_operations(riscom_driver, &riscom_ops); | 1624 | tty_set_operations(riscom_driver, &riscom_ops); |
1631 | if ((error = tty_register_driver(riscom_driver))) { | 1625 | if ((error = tty_register_driver(riscom_driver))) { |
1632 | free_page((unsigned long)tmp_buf); | ||
1633 | put_tty_driver(riscom_driver); | 1626 | put_tty_driver(riscom_driver); |
1634 | printk(KERN_ERR "rc: Couldn't register RISCom/8 driver, " | 1627 | printk(KERN_ERR "rc: Couldn't register RISCom/8 driver, " |
1635 | "error = %d\n", | 1628 | "error = %d\n", |
@@ -1657,7 +1650,6 @@ static void rc_release_drivers(void) | |||
1657 | 1650 | ||
1658 | save_flags(flags); | 1651 | save_flags(flags); |
1659 | cli(); | 1652 | cli(); |
1660 | free_page((unsigned long)tmp_buf); | ||
1661 | tty_unregister_driver(riscom_driver); | 1653 | tty_unregister_driver(riscom_driver); |
1662 | put_tty_driver(riscom_driver); | 1654 | put_tty_driver(riscom_driver); |
1663 | restore_flags(flags); | 1655 | restore_flags(flags); |