public inbox for linux-usb@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] USB: serial: use tty_port_register_device_serdev
@ 2024-05-02 10:07 Mans Rullgard
  2024-05-02 10:18 ` Johan Hovold
  2024-05-02 23:04 ` kernel test robot
  0 siblings, 2 replies; 8+ messages in thread
From: Mans Rullgard @ 2024-05-02 10:07 UTC (permalink / raw)
  To: Johan Hovold; +Cc: Greg Kroah-Hartman, linux-usb

Use tty_port_register_device_serdev() so that usb-serial devices
can be used as serdev controllers.

Signed-off-by: Mans Rullgard <mans@mansr.com>
---
 drivers/usb/serial/bus.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/serial/bus.c b/drivers/usb/serial/bus.c
index 6c812d01b37d..34a1f355f17f 100644
--- a/drivers/usb/serial/bus.c
+++ b/drivers/usb/serial/bus.c
@@ -50,8 +50,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;
-- 
2.45.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-05-02 23:05 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-02 10:07 [PATCH] USB: serial: use tty_port_register_device_serdev Mans Rullgard
2024-05-02 10:18 ` Johan Hovold
2024-05-02 10:45   ` Måns Rullgård
2024-05-02 10:54     ` Greg Kroah-Hartman
2024-05-02 13:24       ` Måns Rullgård
2024-05-02 13:57         ` Greg Kroah-Hartman
2024-05-02 14:32           ` Måns Rullgård
2024-05-02 23:04 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox