From: Paul Fulghum <paulkf@microgate.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] synclink_gt use dynamic tty device registration
Date: Thu, 03 May 2007 10:00:55 -0500 [thread overview]
Message-ID: <1178204455.3516.8.camel@amdx2.microgate.com> (raw)
In-Reply-To: <20070503000528.7d841ecc.akpm@linux-foundation.org>
On Thu, 2007-05-03 at 00:05 -0700, Andrew Morton wrote:
> On Wed, 02 May 2007 11:17:33 -0500 Paul Fulghum <paulkf@microgate.com> wrote:
>
> > Change synclink_gt driver to use dynamic tty device registration.
> >
> > ...
> >
> > + for (i=0; i < port_count; ++i)
> > + tty_register_device(serial_driver, port_array[i]->line, &(port_array[i]->pdev->dev));
> > ...
> > + for (info=slgt_device_list ; info != NULL ; info=info->next_device)
> > + tty_unregister_device(serial_driver, info->line);
> > ...
> > + if ((rc = pci_register_driver(&pci_driver)) < 0) {
>
> hm, not a big fan of kernel coding style, I see.
It varies. If this idiom bothers you, I can split it into 2 lines.
> What's going to happen here if tty_register_device() fails?
Then the device will not be accessible as a tty device.
It may still be accessible as a network device.
On driver unload, tty_unregister_device() does nothing because
the device was never created.
In this case, tracking the return value does not change anything.
I could add a printk on error to better inform the user that the
kernel's plumbing went south.
--
Paul Fulghum
Microgate Systems, Ltd
prev parent reply other threads:[~2007-05-03 15:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-02 16:17 [PATCH] synclink_gt use dynamic tty device registration Paul Fulghum
2007-05-03 7:05 ` Andrew Morton
2007-05-03 15:00 ` Paul Fulghum [this message]
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=1178204455.3516.8.camel@amdx2.microgate.com \
--to=paulkf@microgate.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@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