Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 43696
b: refs/heads/master
c: 938a702
h: refs/heads/master
v: v3
  • Loading branch information
Jiri Slaby authored and Linus Torvalds committed Dec 8, 2006
1 parent 06549aa commit d468dc4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8acef8fcab2d824c1c445857f457fb04facc765d
refs/heads/master: 938a7023bbbc626b0ab7ece13fe8cb26cfcc486b
13 changes: 12 additions & 1 deletion trunk/drivers/char/isicom.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ struct isi_board {
signed char count;
spinlock_t card_lock; /* Card wide lock 11/5/00 -sameer */
unsigned long flags;
unsigned int index;
};

struct isi_port {
Expand Down Expand Up @@ -1781,6 +1782,7 @@ static int __devinit isicom_probe(struct pci_dev *pdev,
break;
}

board->index = index;
board->base = ioaddr;
board->irq = pciirq;
card++;
Expand Down Expand Up @@ -1811,6 +1813,10 @@ static int __devinit isicom_probe(struct pci_dev *pdev,
if (retval < 0)
goto errunri;

for (index = 0; index < board->port_count; index++)
tty_register_device(isicom_normal, board->index * 16 + index,
&pdev->dev);

return 0;

errunri:
Expand All @@ -1825,6 +1831,10 @@ static int __devinit isicom_probe(struct pci_dev *pdev,
static void __devexit isicom_remove(struct pci_dev *pdev)
{
struct isi_board *board = pci_get_drvdata(pdev);
unsigned int i;

for (i = 0; i < board->port_count; i++)
tty_unregister_device(isicom_normal, board->index * 16 + i);

free_irq(board->irq, board);
release_region(board->base, 16);
Expand Down Expand Up @@ -1874,7 +1884,8 @@ static int __init isicom_init(void)
isicom_normal->init_termios = tty_std_termios;
isicom_normal->init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL |
CLOCAL;
isicom_normal->flags = TTY_DRIVER_REAL_RAW;
isicom_normal->flags = TTY_DRIVER_REAL_RAW |
TTY_DRIVER_DYNAMIC_DEV;
tty_set_operations(isicom_normal, &isicom_ops);

retval = tty_register_driver(isicom_normal);
Expand Down

0 comments on commit d468dc4

Please sign in to comment.