diff options
-rw-r--r-- | arch/um/drivers/line.c | 3 | ||||
-rw-r--r-- | drivers/isdn/capi/capi.c | 3 | ||||
-rw-r--r-- | drivers/isdn/gigaset/interface.c | 3 | ||||
-rw-r--r-- | drivers/mmc/card/sdio_uart.c | 4 | ||||
-rw-r--r-- | drivers/net/usb/hso.c | 7 | ||||
-rw-r--r-- | drivers/staging/ipack/devices/ipoctal.c | 2 | ||||
-rw-r--r-- | drivers/tty/cyclades.c | 16 | ||||
-rw-r--r-- | drivers/tty/ehv_bytechan.c | 9 | ||||
-rw-r--r-- | drivers/tty/ipwireless/tty.c | 2 | ||||
-rw-r--r-- | drivers/tty/isicom.c | 3 | ||||
-rw-r--r-- | drivers/tty/mxser.c | 6 | ||||
-rw-r--r-- | drivers/tty/nozomi.c | 4 | ||||
-rw-r--r-- | drivers/tty/rocket.c | 4 | ||||
-rw-r--r-- | drivers/tty/serial/ifx6x60.c | 4 | ||||
-rw-r--r-- | drivers/tty/serial/msm_smd_tty.c | 8 | ||||
-rw-r--r-- | drivers/tty/serial/serial_core.c | 3 | ||||
-rw-r--r-- | drivers/tty/synclink_gt.c | 7 | ||||
-rw-r--r-- | drivers/usb/class/cdc-acm.c | 3 | ||||
-rw-r--r-- | drivers/usb/gadget/u_serial.c | 3 | ||||
-rw-r--r-- | net/bluetooth/rfcomm/tty.c | 4 |
20 files changed, 58 insertions, 40 deletions
diff --git a/arch/um/drivers/line.c b/arch/um/drivers/line.c index bbaf2c59830a..457475f98414 100644 --- a/arch/um/drivers/line.c +++ b/arch/um/drivers/line.c | |||
@@ -409,7 +409,8 @@ int setup_one_line(struct line *lines, int n, char *init, | |||
409 | line->valid = 1; | 409 | line->valid = 1; |
410 | err = parse_chan_pair(new, line, n, opts, error_out); | 410 | err = parse_chan_pair(new, line, n, opts, error_out); |
411 | if (!err) { | 411 | if (!err) { |
412 | struct device *d = tty_register_device(driver, n, NULL); | 412 | struct device *d = tty_port_register_device(&line->port, |
413 | driver, n, NULL); | ||
413 | if (IS_ERR(d)) { | 414 | if (IS_ERR(d)) { |
414 | *error_out = "Failed to register device"; | 415 | *error_out = "Failed to register device"; |
415 | err = PTR_ERR(d); | 416 | err = PTR_ERR(d); |
diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c index 38c4bd87b2c9..c679867c2ccd 100644 --- a/drivers/isdn/capi/capi.c +++ b/drivers/isdn/capi/capi.c | |||
@@ -234,7 +234,8 @@ static struct capiminor *capiminor_alloc(struct capi20_appl *ap, u32 ncci) | |||
234 | 234 | ||
235 | mp->minor = minor; | 235 | mp->minor = minor; |
236 | 236 | ||
237 | dev = tty_register_device(capinc_tty_driver, minor, NULL); | 237 | dev = tty_port_register_device(&mp->port, capinc_tty_driver, minor, |
238 | NULL); | ||
238 | if (IS_ERR(dev)) | 239 | if (IS_ERR(dev)) |
239 | goto err_out2; | 240 | goto err_out2; |
240 | 241 | ||
diff --git a/drivers/isdn/gigaset/interface.c b/drivers/isdn/gigaset/interface.c index f9aab7490868..67abf3ff45e8 100644 --- a/drivers/isdn/gigaset/interface.c +++ b/drivers/isdn/gigaset/interface.c | |||
@@ -524,7 +524,8 @@ void gigaset_if_init(struct cardstate *cs) | |||
524 | tasklet_init(&cs->if_wake_tasklet, if_wake, (unsigned long) cs); | 524 | tasklet_init(&cs->if_wake_tasklet, if_wake, (unsigned long) cs); |
525 | 525 | ||
526 | mutex_lock(&cs->mutex); | 526 | mutex_lock(&cs->mutex); |
527 | cs->tty_dev = tty_register_device(drv->tty, cs->minor_index, NULL); | 527 | cs->tty_dev = tty_port_register_device(&cs->port, drv->tty, |
528 | cs->minor_index, NULL); | ||
528 | 529 | ||
529 | if (!IS_ERR(cs->tty_dev)) | 530 | if (!IS_ERR(cs->tty_dev)) |
530 | dev_set_drvdata(cs->tty_dev, cs); | 531 | dev_set_drvdata(cs->tty_dev, cs); |
diff --git a/drivers/mmc/card/sdio_uart.c b/drivers/mmc/card/sdio_uart.c index 372c0325c149..d2339ea37815 100644 --- a/drivers/mmc/card/sdio_uart.c +++ b/drivers/mmc/card/sdio_uart.c | |||
@@ -1132,8 +1132,8 @@ static int sdio_uart_probe(struct sdio_func *func, | |||
1132 | kfree(port); | 1132 | kfree(port); |
1133 | } else { | 1133 | } else { |
1134 | struct device *dev; | 1134 | struct device *dev; |
1135 | dev = tty_register_device(sdio_uart_tty_driver, | 1135 | dev = tty_port_register_device(&port->port, |
1136 | port->index, &func->dev); | 1136 | sdio_uart_tty_driver, port->index, &func->dev); |
1137 | if (IS_ERR(dev)) { | 1137 | if (IS_ERR(dev)) { |
1138 | sdio_uart_port_remove(port); | 1138 | sdio_uart_port_remove(port); |
1139 | ret = PTR_ERR(dev); | 1139 | ret = PTR_ERR(dev); |
diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c index 7736af75e12b..605a4baa9b7b 100644 --- a/drivers/net/usb/hso.c +++ b/drivers/net/usb/hso.c | |||
@@ -2287,9 +2287,11 @@ static int hso_serial_common_create(struct hso_serial *serial, int num_urbs, | |||
2287 | if (minor < 0) | 2287 | if (minor < 0) |
2288 | goto exit; | 2288 | goto exit; |
2289 | 2289 | ||
2290 | tty_port_init(&serial->port); | ||
2291 | |||
2290 | /* register our minor number */ | 2292 | /* register our minor number */ |
2291 | serial->parent->dev = tty_register_device(tty_drv, minor, | 2293 | serial->parent->dev = tty_port_register_device(&serial->port, tty_drv, |
2292 | &serial->parent->interface->dev); | 2294 | minor, &serial->parent->interface->dev); |
2293 | dev = serial->parent->dev; | 2295 | dev = serial->parent->dev; |
2294 | dev_set_drvdata(dev, serial->parent); | 2296 | dev_set_drvdata(dev, serial->parent); |
2295 | i = device_create_file(dev, &dev_attr_hsotype); | 2297 | i = device_create_file(dev, &dev_attr_hsotype); |
@@ -2298,7 +2300,6 @@ static int hso_serial_common_create(struct hso_serial *serial, int num_urbs, | |||
2298 | serial->minor = minor; | 2300 | serial->minor = minor; |
2299 | serial->magic = HSO_SERIAL_MAGIC; | 2301 | serial->magic = HSO_SERIAL_MAGIC; |
2300 | spin_lock_init(&serial->serial_lock); | 2302 | spin_lock_init(&serial->serial_lock); |
2301 | tty_port_init(&serial->port); | ||
2302 | serial->num_rx_urbs = num_urbs; | 2303 | serial->num_rx_urbs = num_urbs; |
2303 | 2304 | ||
2304 | /* RX, allocate urb and initialize */ | 2305 | /* RX, allocate urb and initialize */ |
diff --git a/drivers/staging/ipack/devices/ipoctal.c b/drivers/staging/ipack/devices/ipoctal.c index 394f5deca34e..a68d981c259f 100644 --- a/drivers/staging/ipack/devices/ipoctal.c +++ b/drivers/staging/ipack/devices/ipoctal.c | |||
@@ -502,7 +502,7 @@ static int ipoctal_inst_slot(struct ipoctal *ipoctal, unsigned int bus_nr, | |||
502 | ipoctal->pointer_read[i] = 0; | 502 | ipoctal->pointer_read[i] = 0; |
503 | ipoctal->pointer_write[i] = 0; | 503 | ipoctal->pointer_write[i] = 0; |
504 | ipoctal->nb_bytes[i] = 0; | 504 | ipoctal->nb_bytes[i] = 0; |
505 | tty_register_device(tty, i, NULL); | 505 | tty_port_register_device(&ipoctal->tty_port[i], tty, i, NULL); |
506 | 506 | ||
507 | /* | 507 | /* |
508 | * Enable again the RX. TX will be enabled when | 508 | * Enable again the RX. TX will be enabled when |
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; |
diff --git a/drivers/tty/ehv_bytechan.c b/drivers/tty/ehv_bytechan.c index 4813684cb634..4ab936b7aac6 100644 --- a/drivers/tty/ehv_bytechan.c +++ b/drivers/tty/ehv_bytechan.c | |||
@@ -738,16 +738,17 @@ static int __devinit ehv_bc_tty_probe(struct platform_device *pdev) | |||
738 | goto error; | 738 | goto error; |
739 | } | 739 | } |
740 | 740 | ||
741 | bc->dev = tty_register_device(ehv_bc_driver, i, &pdev->dev); | 741 | tty_port_init(&bc->port); |
742 | bc->port.ops = &ehv_bc_tty_port_ops; | ||
743 | |||
744 | bc->dev = tty_port_register_device(&bc->port, ehv_bc_driver, i, | ||
745 | &pdev->dev); | ||
742 | if (IS_ERR(bc->dev)) { | 746 | if (IS_ERR(bc->dev)) { |
743 | ret = PTR_ERR(bc->dev); | 747 | ret = PTR_ERR(bc->dev); |
744 | dev_err(&pdev->dev, "could not register tty (ret=%i)\n", ret); | 748 | dev_err(&pdev->dev, "could not register tty (ret=%i)\n", ret); |
745 | goto error; | 749 | goto error; |
746 | } | 750 | } |
747 | 751 | ||
748 | tty_port_init(&bc->port); | ||
749 | bc->port.ops = &ehv_bc_tty_port_ops; | ||
750 | |||
751 | dev_set_drvdata(&pdev->dev, bc); | 752 | dev_set_drvdata(&pdev->dev, bc); |
752 | 753 | ||
753 | dev_info(&pdev->dev, "registered /dev/%s%u for byte channel %u\n", | 754 | dev_info(&pdev->dev, "registered /dev/%s%u for byte channel %u\n", |
diff --git a/drivers/tty/ipwireless/tty.c b/drivers/tty/ipwireless/tty.c index f8b5fa0093a3..160f0ad9589d 100644 --- a/drivers/tty/ipwireless/tty.c +++ b/drivers/tty/ipwireless/tty.c | |||
@@ -476,7 +476,7 @@ static int add_tty(int j, | |||
476 | mutex_init(&ttys[j]->ipw_tty_mutex); | 476 | mutex_init(&ttys[j]->ipw_tty_mutex); |
477 | tty_port_init(&ttys[j]->port); | 477 | tty_port_init(&ttys[j]->port); |
478 | 478 | ||
479 | tty_register_device(ipw_tty_driver, j, NULL); | 479 | tty_port_register_device(&ttys[j]->port, ipw_tty_driver, j, NULL); |
480 | ipwireless_associate_network_tty(network, channel_idx, ttys[j]); | 480 | ipwireless_associate_network_tty(network, channel_idx, ttys[j]); |
481 | 481 | ||
482 | if (secondary_channel_idx != -1) | 482 | if (secondary_channel_idx != -1) |
diff --git a/drivers/tty/isicom.c b/drivers/tty/isicom.c index d593a7d18ad5..99cf22e5f2b6 100644 --- a/drivers/tty/isicom.c +++ b/drivers/tty/isicom.c | |||
@@ -1611,7 +1611,8 @@ static int __devinit isicom_probe(struct pci_dev *pdev, | |||
1611 | goto errunri; | 1611 | goto errunri; |
1612 | 1612 | ||
1613 | for (index = 0; index < board->port_count; index++) | 1613 | for (index = 0; index < board->port_count; index++) |
1614 | tty_register_device(isicom_normal, board->index * 16 + index, | 1614 | tty_port_register_device(&board->ports[index].port, |
1615 | isicom_normal, board->index * 16 + index, | ||
1615 | &pdev->dev); | 1616 | &pdev->dev); |
1616 | 1617 | ||
1617 | return 0; | 1618 | return 0; |
diff --git a/drivers/tty/mxser.c b/drivers/tty/mxser.c index e64fe40618cd..8bc265154ad7 100644 --- a/drivers/tty/mxser.c +++ b/drivers/tty/mxser.c | |||
@@ -2625,7 +2625,8 @@ static int __devinit mxser_probe(struct pci_dev *pdev, | |||
2625 | goto err_rel3; | 2625 | goto err_rel3; |
2626 | 2626 | ||
2627 | for (i = 0; i < brd->info->nports; i++) | 2627 | for (i = 0; i < brd->info->nports; i++) |
2628 | tty_register_device(mxvar_sdriver, brd->idx + i, &pdev->dev); | 2628 | tty_port_register_device(&brd->ports[i].port, mxvar_sdriver, |
2629 | brd->idx + i, &pdev->dev); | ||
2629 | 2630 | ||
2630 | pci_set_drvdata(pdev, brd); | 2631 | pci_set_drvdata(pdev, brd); |
2631 | 2632 | ||
@@ -2722,7 +2723,8 @@ static int __init mxser_module_init(void) | |||
2722 | 2723 | ||
2723 | brd->idx = m * MXSER_PORTS_PER_BOARD; | 2724 | brd->idx = m * MXSER_PORTS_PER_BOARD; |
2724 | for (i = 0; i < brd->info->nports; i++) | 2725 | for (i = 0; i < brd->info->nports; i++) |
2725 | tty_register_device(mxvar_sdriver, brd->idx + i, NULL); | 2726 | tty_port_register_device(&brd->ports[i].port, |
2727 | mxvar_sdriver, brd->idx + i, NULL); | ||
2726 | 2728 | ||
2727 | m++; | 2729 | m++; |
2728 | } | 2730 | } |
diff --git a/drivers/tty/nozomi.c b/drivers/tty/nozomi.c index e7592f9037da..b917c9424954 100644 --- a/drivers/tty/nozomi.c +++ b/drivers/tty/nozomi.c | |||
@@ -1473,8 +1473,8 @@ static int __devinit nozomi_card_init(struct pci_dev *pdev, | |||
1473 | port->dc = dc; | 1473 | port->dc = dc; |
1474 | tty_port_init(&port->port); | 1474 | tty_port_init(&port->port); |
1475 | port->port.ops = &noz_tty_port_ops; | 1475 | port->port.ops = &noz_tty_port_ops; |
1476 | tty_dev = tty_register_device(ntty_driver, dc->index_start + i, | 1476 | tty_dev = tty_port_register_device(&port->port, ntty_driver, |
1477 | &pdev->dev); | 1477 | dc->index_start + i, &pdev->dev); |
1478 | 1478 | ||
1479 | if (IS_ERR(tty_dev)) { | 1479 | if (IS_ERR(tty_dev)) { |
1480 | ret = PTR_ERR(tty_dev); | 1480 | ret = PTR_ERR(tty_dev); |
diff --git a/drivers/tty/rocket.c b/drivers/tty/rocket.c index 016984a460e0..9700d34b20a3 100644 --- a/drivers/tty/rocket.c +++ b/drivers/tty/rocket.c | |||
@@ -704,8 +704,8 @@ static void init_r_port(int board, int aiop, int chan, struct pci_dev *pci_dev) | |||
704 | spin_lock_init(&info->slock); | 704 | spin_lock_init(&info->slock); |
705 | mutex_init(&info->write_mtx); | 705 | mutex_init(&info->write_mtx); |
706 | rp_table[line] = info; | 706 | rp_table[line] = info; |
707 | tty_register_device(rocket_driver, line, pci_dev ? &pci_dev->dev : | 707 | tty_port_register_device(&info->port, rocket_driver, line, |
708 | NULL); | 708 | pci_dev ? &pci_dev->dev : NULL); |
709 | } | 709 | } |
710 | 710 | ||
711 | /* | 711 | /* |
diff --git a/drivers/tty/serial/ifx6x60.c b/drivers/tty/serial/ifx6x60.c index 144cd3987d4c..3f0c256d8ef7 100644 --- a/drivers/tty/serial/ifx6x60.c +++ b/drivers/tty/serial/ifx6x60.c | |||
@@ -800,8 +800,8 @@ static int ifx_spi_create_port(struct ifx_spi_device *ifx_dev) | |||
800 | tty_port_init(pport); | 800 | tty_port_init(pport); |
801 | pport->ops = &ifx_tty_port_ops; | 801 | pport->ops = &ifx_tty_port_ops; |
802 | ifx_dev->minor = IFX_SPI_TTY_ID; | 802 | ifx_dev->minor = IFX_SPI_TTY_ID; |
803 | ifx_dev->tty_dev = tty_register_device(tty_drv, ifx_dev->minor, | 803 | ifx_dev->tty_dev = tty_port_register_device(pport, tty_drv, |
804 | &ifx_dev->spi_dev->dev); | 804 | ifx_dev->minor, &ifx_dev->spi_dev->dev); |
805 | if (IS_ERR(ifx_dev->tty_dev)) { | 805 | if (IS_ERR(ifx_dev->tty_dev)) { |
806 | dev_dbg(&ifx_dev->spi_dev->dev, | 806 | dev_dbg(&ifx_dev->spi_dev->dev, |
807 | "%s: registering tty device failed", __func__); | 807 | "%s: registering tty device failed", __func__); |
diff --git a/drivers/tty/serial/msm_smd_tty.c b/drivers/tty/serial/msm_smd_tty.c index b25e6ee71443..925d1fa153db 100644 --- a/drivers/tty/serial/msm_smd_tty.c +++ b/drivers/tty/serial/msm_smd_tty.c | |||
@@ -223,9 +223,11 @@ static int __init smd_tty_init(void) | |||
223 | return ret; | 223 | return ret; |
224 | 224 | ||
225 | for (i = 0; i < smd_tty_channels_len; i++) { | 225 | for (i = 0; i < smd_tty_channels_len; i++) { |
226 | tty_port_init(&smd_tty[smd_tty_channels[i].id].port); | 226 | struct tty_port *port = &smd_tty[smd_tty_channels[i].id].port; |
227 | smd_tty[smd_tty_channels[i].id].port.ops = &smd_tty_port_ops; | 227 | tty_port_init(port); |
228 | tty_register_device(smd_tty_driver, smd_tty_channels[i].id, 0); | 228 | port->ops = &smd_tty_port_ops; |
229 | tty_port_register_device(port, smd_tty_driver, | ||
230 | smd_tty_channels[i].id, NULL); | ||
229 | } | 231 | } |
230 | 232 | ||
231 | return 0; | 233 | return 0; |
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c index d98b1bd407f6..5b308c87b68c 100644 --- a/drivers/tty/serial/serial_core.c +++ b/drivers/tty/serial/serial_core.c | |||
@@ -2346,7 +2346,8 @@ int uart_add_one_port(struct uart_driver *drv, struct uart_port *uport) | |||
2346 | * Register the port whether it's detected or not. This allows | 2346 | * Register the port whether it's detected or not. This allows |
2347 | * setserial to be used to alter this ports parameters. | 2347 | * setserial to be used to alter this ports parameters. |
2348 | */ | 2348 | */ |
2349 | tty_dev = tty_register_device(drv->tty_driver, uport->line, uport->dev); | 2349 | tty_dev = tty_port_register_device(port, drv->tty_driver, uport->line, |
2350 | uport->dev); | ||
2350 | if (likely(!IS_ERR(tty_dev))) { | 2351 | if (likely(!IS_ERR(tty_dev))) { |
2351 | device_set_wakeup_capable(tty_dev, 1); | 2352 | device_set_wakeup_capable(tty_dev, 1); |
2352 | } else { | 2353 | } else { |
diff --git a/drivers/tty/synclink_gt.c b/drivers/tty/synclink_gt.c index 913025369fe7..45f6136f4e51 100644 --- a/drivers/tty/synclink_gt.c +++ b/drivers/tty/synclink_gt.c | |||
@@ -3689,8 +3689,11 @@ static void device_init(int adapter_num, struct pci_dev *pdev) | |||
3689 | } | 3689 | } |
3690 | } | 3690 | } |
3691 | 3691 | ||
3692 | for (i=0; i < port_count; ++i) | 3692 | for (i = 0; i < port_count; ++i) { |
3693 | tty_register_device(serial_driver, port_array[i]->line, &(port_array[i]->pdev->dev)); | 3693 | struct slgt_info *info = port_array[i]; |
3694 | tty_port_register_device(&info->port, serial_driver, info->line, | ||
3695 | &info->pdev->dev); | ||
3696 | } | ||
3694 | } | 3697 | } |
3695 | 3698 | ||
3696 | static int __devinit init_one(struct pci_dev *dev, | 3699 | static int __devinit init_one(struct pci_dev *dev, |
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index 18f4e62aaa75..455ef1649231 100644 --- a/drivers/usb/class/cdc-acm.c +++ b/drivers/usb/class/cdc-acm.c | |||
@@ -1298,7 +1298,8 @@ skip_countries: | |||
1298 | usb_set_intfdata(data_interface, acm); | 1298 | usb_set_intfdata(data_interface, acm); |
1299 | 1299 | ||
1300 | usb_get_intf(control_interface); | 1300 | usb_get_intf(control_interface); |
1301 | tty_register_device(acm_tty_driver, minor, &control_interface->dev); | 1301 | tty_port_register_device(&acm->port, acm_tty_driver, minor, |
1302 | &control_interface->dev); | ||
1302 | 1303 | ||
1303 | return 0; | 1304 | return 0; |
1304 | alloc_fail7: | 1305 | alloc_fail7: |
diff --git a/drivers/usb/gadget/u_serial.c b/drivers/usb/gadget/u_serial.c index 5b3f5fffea92..2b5534c2ab84 100644 --- a/drivers/usb/gadget/u_serial.c +++ b/drivers/usb/gadget/u_serial.c | |||
@@ -1129,7 +1129,8 @@ int gserial_setup(struct usb_gadget *g, unsigned count) | |||
1129 | for (i = 0; i < count; i++) { | 1129 | for (i = 0; i < count; i++) { |
1130 | struct device *tty_dev; | 1130 | struct device *tty_dev; |
1131 | 1131 | ||
1132 | tty_dev = tty_register_device(gs_tty_driver, i, &g->dev); | 1132 | tty_dev = tty_port_register_device(&ports[i].port->port, |
1133 | gs_tty_driver, i, &g->dev); | ||
1133 | if (IS_ERR(tty_dev)) | 1134 | if (IS_ERR(tty_dev)) |
1134 | pr_warning("%s: no classdev for port %d, err %ld\n", | 1135 | pr_warning("%s: no classdev for port %d, err %ld\n", |
1135 | __func__, i, PTR_ERR(tty_dev)); | 1136 | __func__, i, PTR_ERR(tty_dev)); |
diff --git a/net/bluetooth/rfcomm/tty.c b/net/bluetooth/rfcomm/tty.c index b54c86a2e66b..18a80b94a8bd 100644 --- a/net/bluetooth/rfcomm/tty.c +++ b/net/bluetooth/rfcomm/tty.c | |||
@@ -278,8 +278,8 @@ out: | |||
278 | if (err < 0) | 278 | if (err < 0) |
279 | goto free; | 279 | goto free; |
280 | 280 | ||
281 | dev->tty_dev = tty_register_device(rfcomm_tty_driver, dev->id, NULL); | 281 | dev->tty_dev = tty_port_register_device(&dev->port, rfcomm_tty_driver, |
282 | 282 | dev->id, NULL); | |
283 | if (IS_ERR(dev->tty_dev)) { | 283 | if (IS_ERR(dev->tty_dev)) { |
284 | err = PTR_ERR(dev->tty_dev); | 284 | err = PTR_ERR(dev->tty_dev); |
285 | list_del(&dev->list); | 285 | list_del(&dev->list); |