aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/isicom.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/isicom.c')
-rw-r--r--drivers/char/isicom.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/char/isicom.c b/drivers/char/isicom.c
index c5cb2a9e68ba..604882dac2d2 100644
--- a/drivers/char/isicom.c
+++ b/drivers/char/isicom.c
@@ -195,6 +195,7 @@ struct isi_board {
195 signed char count; 195 signed char count;
196 spinlock_t card_lock; /* Card wide lock 11/5/00 -sameer */ 196 spinlock_t card_lock; /* Card wide lock 11/5/00 -sameer */
197 unsigned long flags; 197 unsigned long flags;
198 unsigned int index;
198}; 199};
199 200
200struct isi_port { 201struct isi_port {
@@ -1781,6 +1782,7 @@ static int __devinit isicom_probe(struct pci_dev *pdev,
1781 break; 1782 break;
1782 } 1783 }
1783 1784
1785 board->index = index;
1784 board->base = ioaddr; 1786 board->base = ioaddr;
1785 board->irq = pciirq; 1787 board->irq = pciirq;
1786 card++; 1788 card++;
@@ -1811,6 +1813,10 @@ static int __devinit isicom_probe(struct pci_dev *pdev,
1811 if (retval < 0) 1813 if (retval < 0)
1812 goto errunri; 1814 goto errunri;
1813 1815
1816 for (index = 0; index < board->port_count; index++)
1817 tty_register_device(isicom_normal, board->index * 16 + index,
1818 &pdev->dev);
1819
1814 return 0; 1820 return 0;
1815 1821
1816errunri: 1822errunri:
@@ -1825,6 +1831,10 @@ err:
1825static void __devexit isicom_remove(struct pci_dev *pdev) 1831static void __devexit isicom_remove(struct pci_dev *pdev)
1826{ 1832{
1827 struct isi_board *board = pci_get_drvdata(pdev); 1833 struct isi_board *board = pci_get_drvdata(pdev);
1834 unsigned int i;
1835
1836 for (i = 0; i < board->port_count; i++)
1837 tty_unregister_device(isicom_normal, board->index * 16 + i);
1828 1838
1829 free_irq(board->irq, board); 1839 free_irq(board->irq, board);
1830 release_region(board->base, 16); 1840 release_region(board->base, 16);
@@ -1874,7 +1884,8 @@ static int __init isicom_init(void)
1874 isicom_normal->init_termios = tty_std_termios; 1884 isicom_normal->init_termios = tty_std_termios;
1875 isicom_normal->init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | 1885 isicom_normal->init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL |
1876 CLOCAL; 1886 CLOCAL;
1877 isicom_normal->flags = TTY_DRIVER_REAL_RAW; 1887 isicom_normal->flags = TTY_DRIVER_REAL_RAW |
1888 TTY_DRIVER_DYNAMIC_DEV;
1878 tty_set_operations(isicom_normal, &isicom_ops); 1889 tty_set_operations(isicom_normal, &isicom_ops);
1879 1890
1880 retval = tty_register_driver(isicom_normal); 1891 retval = tty_register_driver(isicom_normal);