* [PATCH] tty: nozomi: change tty_unregister_device to tty_port_unregister_device
@ 2021-07-20 8:38 Dongliang Mu
2021-07-21 10:58 ` Greg Kroah-Hartman
0 siblings, 1 reply; 3+ messages in thread
From: Dongliang Mu @ 2021-07-20 8:38 UTC (permalink / raw)
To: Greg Kroah-Hartman, Jiri Slaby; +Cc: Dongliang Mu, linux-kernel
The pairwise api invocation of tty_port_register_device should be
tty_port_unregister_device, other than tty_unregister_device.
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] tty: nozomi: change tty_unregister_device to tty_port_unregister_device
2021-07-20 8:38 [PATCH] tty: nozomi: change tty_unregister_device to tty_port_unregister_device Dongliang Mu
@ 2021-07-21 10:58 ` Greg Kroah-Hartman
2021-07-21 11:37 ` Dongliang Mu
0 siblings, 1 reply; 3+ messages in thread
From: Greg Kroah-Hartman @ 2021-07-21 10:58 UTC (permalink / raw)
To: Dongliang Mu; +Cc: Jiri Slaby, linux-kernel
On Tue, Jul 20, 2021 at 04:38:05PM +0800, Dongliang Mu wrote:
> The pairwise api invocation of tty_port_register_device should be
> tty_port_unregister_device, other than tty_unregister_device.
>
> 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
>
What commit does this fix? Should it go to stable kernels? Can you
please resend it with that information?
And how did you find this?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] tty: nozomi: change tty_unregister_device to tty_port_unregister_device
2021-07-21 10:58 ` Greg Kroah-Hartman
@ 2021-07-21 11:37 ` Dongliang Mu
0 siblings, 0 replies; 3+ messages in thread
From: Dongliang Mu @ 2021-07-21 11:37 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: Jiri Slaby, linux-kernel
On Wed, Jul 21, 2021 at 6:58 PM Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
>
> On Tue, Jul 20, 2021 at 04:38:05PM +0800, Dongliang Mu wrote:
> > The pairwise api invocation of tty_port_register_device should be
> > tty_port_unregister_device, other than tty_unregister_device.
> >
> > 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
> >
>
> What commit does this fix? Should it go to stable kernels? Can you
> please resend it with that information?
I have sent a v2 patch.
>
> And how did you find this?
Just by manual code review when checking a fix commit.
>
> thanks,
>
> greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-07-21 11:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-20 8:38 [PATCH] tty: nozomi: change tty_unregister_device to tty_port_unregister_device Dongliang Mu
2021-07-21 10:58 ` Greg Kroah-Hartman
2021-07-21 11:37 ` Dongliang Mu
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).