Linux-USB Archive mirror
 help / color / mirror / Atom feed
From: Mans Rullgard <mans@mansr.com>
To: Johan Hovold <johan@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-usb@vger.kernel.org
Subject: [PATCH] USB: serial: use tty_port_register_device_serdev
Date: Thu,  2 May 2024 11:07:28 +0100	[thread overview]
Message-ID: <20240502100728.7914-1-mans@mansr.com> (raw)

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


             reply	other threads:[~2024-05-02 10:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-02 10:07 Mans Rullgard [this message]
2024-05-02 10:18 ` [PATCH] USB: serial: use tty_port_register_device_serdev 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240502100728.7914-1-mans@mansr.com \
    --to=mans@mansr.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=johan@kernel.org \
    --cc=linux-usb@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).