@@ -60,8 +60,9 @@ static int usb_serial_device_probe(struct device *dev)
}
minor = port->minor;
- tty_dev = tty_port_register_device(&port->port, usb_serial_tty_driver,
- minor, dev);
+ tty_dev = tty_port_register_device_serdev(&port->port,
+ usb_serial_tty_driver,
+ minor, dev);
if (IS_ERR(tty_dev)) {
retval = PTR_ERR(tty_dev);
goto err_port_remove;
@@ -105,7 +106,7 @@ static int usb_serial_device_remove(struct device *dev)
autopm_err = usb_autopm_get_interface(port->serial->interface);
minor = port->minor;
- tty_unregister_device(usb_serial_tty_driver, minor);
+ tty_port_unregister_device(&port->port, usb_serial_tty_driver, minor);
driver = port->serial->type;
if (driver->port_remove)