linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dongliang Mu <mudongliangabcd@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Slaby <jirislaby@kernel.org>
Cc: Dongliang Mu <mudongliangabcd@gmail.com>,
	stable@vger.kernel.org, Greg Kroah-Hartman <gregkh@suse.de>,
	linux-kernel@vger.kernel.org
Subject: [PATCH v2] tty: nozomi: tty_unregister_device -> tty_port_unregister_device
Date: Wed, 21 Jul 2021 19:33:04 +0800	[thread overview]
Message-ID: <20210721113305.1524059-1-mudongliangabcd@gmail.com> (raw)

The pairwise api invocation of tty_port_register_device should be
tty_port_unregister_device, other than tty_unregister_device.

Fixes: a6afd9f3e819 ("tty: move a number of tty drivers from drivers/char/ to drivers/tty/")
Cc: stable@vger.kernel.org
Signed-off-by: Dongliang Mu <mudongliangabcd@gmail.com>
---
 drivers/tty/nozomi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/tty/nozomi.c b/drivers/tty/nozomi.c
index 0c80f25c8c3d..08bdd82f60b5 100644
--- a/drivers/tty/nozomi.c
+++ b/drivers/tty/nozomi.c
@@ -1417,7 +1417,8 @@ static int nozomi_card_init(struct pci_dev *pdev,
 
 err_free_tty:
 	for (i--; i >= 0; i--) {
-		tty_unregister_device(ntty_driver, dc->index_start + i);
+		tty_port_unregister_device(&dc->port[i].port, ntty_driver,
+				dc->index_start + i);
 		tty_port_destroy(&dc->port[i].port);
 	}
 	free_irq(pdev->irq, dc);
-- 
2.25.1


             reply	other threads:[~2021-07-21 11:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-21 11:33 Dongliang Mu [this message]
2021-07-21 12:00 ` [PATCH v2] tty: nozomi: tty_unregister_device -> tty_port_unregister_device Johan Hovold
2021-07-21 12:53   ` Dongliang Mu
2021-07-21 13:09     ` Johan Hovold
2021-07-21 13:35       ` Dongliang Mu

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=20210721113305.1524059-1-mudongliangabcd@gmail.com \
    --to=mudongliangabcd@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=gregkh@suse.de \
    --cc=jirislaby@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@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 NNTP newsgroup(s).