diff options
Diffstat (limited to 'drivers/tty/cyclades.c')
-rw-r--r-- | drivers/tty/cyclades.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/tty/cyclades.c b/drivers/tty/cyclades.c index c8850ea832af..e3954dae5064 100644 --- a/drivers/tty/cyclades.c +++ b/drivers/tty/cyclades.c | |||
@@ -3289,7 +3289,7 @@ static int __init cy_detect_isa(void) | |||
3289 | struct cyclades_card *card; | 3289 | struct cyclades_card *card; |
3290 | unsigned short cy_isa_irq, nboard; | 3290 | unsigned short cy_isa_irq, nboard; |
3291 | void __iomem *cy_isa_address; | 3291 | void __iomem *cy_isa_address; |
3292 | unsigned short i, j, cy_isa_nchan; | 3292 | unsigned short i, j, k, cy_isa_nchan; |
3293 | int isparam = 0; | 3293 | int isparam = 0; |
3294 | 3294 | ||
3295 | nboard = 0; | 3295 | nboard = 0; |
@@ -3392,9 +3392,10 @@ static int __init cy_detect_isa(void) | |||
3392 | (unsigned long)(cy_isa_address + (CyISA_Ywin - 1)), | 3392 | (unsigned long)(cy_isa_address + (CyISA_Ywin - 1)), |
3393 | cy_isa_irq, cy_isa_nchan, cy_next_channel); | 3393 | cy_isa_irq, cy_isa_nchan, cy_next_channel); |
3394 | 3394 | ||
3395 | for (j = cy_next_channel; | 3395 | for (k = 0, j = cy_next_channel; |
3396 | j < cy_next_channel + cy_isa_nchan; j++) | 3396 | j < cy_next_channel + cy_isa_nchan; j++, k++) |
3397 | tty_register_device(cy_serial_driver, j, NULL); | 3397 | tty_port_register_device(&card->ports[k].port, |
3398 | cy_serial_driver, j, NULL); | ||
3398 | cy_next_channel += cy_isa_nchan; | 3399 | cy_next_channel += cy_isa_nchan; |
3399 | } | 3400 | } |
3400 | return nboard; | 3401 | return nboard; |
@@ -3698,7 +3699,7 @@ static int __devinit cy_pci_probe(struct pci_dev *pdev, | |||
3698 | void __iomem *addr0 = NULL, *addr2 = NULL; | 3699 | void __iomem *addr0 = NULL, *addr2 = NULL; |
3699 | char *card_name = NULL; | 3700 | char *card_name = NULL; |
3700 | u32 uninitialized_var(mailbox); | 3701 | u32 uninitialized_var(mailbox); |
3701 | unsigned int device_id, nchan = 0, card_no, i; | 3702 | unsigned int device_id, nchan = 0, card_no, i, j; |
3702 | unsigned char plx_ver; | 3703 | unsigned char plx_ver; |
3703 | int retval, irq; | 3704 | int retval, irq; |
3704 | 3705 | ||
@@ -3909,8 +3910,9 @@ static int __devinit cy_pci_probe(struct pci_dev *pdev, | |||
3909 | 3910 | ||
3910 | dev_info(&pdev->dev, "%s/PCI #%d found: %d channels starting from " | 3911 | dev_info(&pdev->dev, "%s/PCI #%d found: %d channels starting from " |
3911 | "port %d.\n", card_name, card_no + 1, nchan, cy_next_channel); | 3912 | "port %d.\n", card_name, card_no + 1, nchan, cy_next_channel); |
3912 | for (i = cy_next_channel; i < cy_next_channel + nchan; i++) | 3913 | for (j = 0, i = cy_next_channel; i < cy_next_channel + nchan; i++, j++) |
3913 | tty_register_device(cy_serial_driver, i, &pdev->dev); | 3914 | tty_port_register_device(&card->ports[j].port, |
3915 | cy_serial_driver, i, &pdev->dev); | ||
3914 | cy_next_channel += nchan; | 3916 | cy_next_channel += nchan; |
3915 | 3917 | ||
3916 | return 0; | 3918 | return 0; |