Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 54843
b: refs/heads/master
c: 6ad1ccc
h: refs/heads/master
i:
  54841: 136e218
  54839: 70b94c7
v: v3
  • Loading branch information
Jiri Slaby authored and Linus Torvalds committed May 8, 2007
1 parent 7dccde7 commit f9ee5f4
Show file tree
Hide file tree
Showing 2 changed files with 20 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: 9dacf3b2f0cc657a5621e7f6d67ed27ce598f405
refs/heads/master: 6ad1ccc196f76833f41b187e01a28a024fe11f8b
20 changes: 19 additions & 1 deletion trunk/drivers/char/cyclades.c
Original file line number Diff line number Diff line change
Expand Up @@ -4841,6 +4841,9 @@ static int __init cy_detect_isa(void)
cy_isa_irq);
printk("%d channels starting from port %d.\n",
cy_isa_nchan, cy_next_channel);
for (j = cy_next_channel;
j < cy_next_channel + cy_isa_nchan; j++)
tty_register_device(cy_serial_driver, j, NULL);
cy_next_channel += cy_isa_nchan;
}
return nboard;
Expand Down Expand Up @@ -4948,6 +4951,8 @@ static int __devinit cy_init_Ze(unsigned long cy_pci_phys0,

printk("%d channels starting from port %d.\n",
cy_pci_nchan, cy_next_channel);
for (j = cy_next_channel; j < cy_next_channel + cy_pci_nchan; j++)
tty_register_device(cy_serial_driver, j, &pdev->dev);
cy_next_channel += cy_pci_nchan;

return 0;
Expand Down Expand Up @@ -5115,6 +5120,9 @@ static int __devinit cy_pci_probe(struct pci_dev *pdev,
(int)cy_pci_irq);
printk("%d channels starting from port %d.\n",
cy_pci_nchan, cy_next_channel);
for (j = cy_next_channel;
j < cy_next_channel + cy_pci_nchan; j++)
tty_register_device(cy_serial_driver, j, &pdev->dev);

cy_next_channel += cy_pci_nchan;
} else if (device_id == PCI_DEVICE_ID_CYCLOM_Z_Lo) {
Expand Down Expand Up @@ -5282,6 +5290,9 @@ static int __devinit cy_pci_probe(struct pci_dev *pdev,

printk("%d channels starting from port %d.\n",
cy_pci_nchan, cy_next_channel);
for (j = cy_next_channel;
j < cy_next_channel + cy_pci_nchan; j++)
tty_register_device(cy_serial_driver, j, &pdev->dev);
cy_next_channel += cy_pci_nchan;
}

Expand Down Expand Up @@ -5346,6 +5357,9 @@ static void __devexit cy_pci_release(struct pci_dev *pdev)
cy_port[i].line = -1;
cy_port[i].magic = -1;
}
for (i = cinfo->first_line; i < cinfo->first_line +
cinfo->nports; i++)
tty_unregister_device(cy_serial_driver, i);
#endif
}

Expand Down Expand Up @@ -5479,7 +5493,7 @@ static int __init cy_init(void)
cy_serial_driver->init_termios = tty_std_termios;
cy_serial_driver->init_termios.c_cflag =
B9600 | CS8 | CREAD | HUPCL | CLOCAL;
cy_serial_driver->flags = TTY_DRIVER_REAL_RAW;
cy_serial_driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV;
tty_set_operations(cy_serial_driver, &cy_ops);

retval = tty_register_driver(cy_serial_driver);
Expand Down Expand Up @@ -5555,6 +5569,10 @@ static void __exit cy_cleanup_module(void)
#endif /* CONFIG_CYZ_INTR */
)
free_irq(cy_card[i].irq, &cy_card[i]);
for (e1 = cy_card[i].first_line;
e1 < cy_card[i].first_line +
cy_card[i].nports; e1++)
tty_unregister_device(cy_serial_driver, e1);
}
}
} /* cy_cleanup_module */
Expand Down

0 comments on commit f9ee5f4

Please sign in to comment.