From: Greg KH <gregkh@suse.de>
To: Andrew Morton <akpm@osdl.org>
Cc: Tilman Schmidt <tilman@imap.cc>,
linux-kernel@vger.kernel.org, hjlipp@web.de
Subject: Re: [PATCH 2.6.17-rc2 1/2] return class device pointer from tty_register_device()
Date: Fri, 21 Apr 2006 21:16:55 -0700 [thread overview]
Message-ID: <20060422041655.GA15892@suse.de> (raw)
In-Reply-To: <20060421181429.5ea9d777.akpm@osdl.org>
On Fri, Apr 21, 2006 at 06:14:29PM -0700, Andrew Morton wrote:
> Tilman Schmidt <tilman@imap.cc> wrote:
> >
> > + * Returns a pointer to the class device (or NULL on error).
> > + *
> > * This call is required to be made to register an individual tty device if
> > * the tty driver's flags have the TTY_DRIVER_NO_DEVFS bit set. If that
> > * bit is not set, this function should not be called.
> > */
> > -void tty_register_device(struct tty_driver *driver, unsigned index,
> > - struct device *device)
> > +struct class_device *tty_register_device(struct tty_driver *driver,
> > + unsigned index, struct device *device)
> > {
>
> It would be better to make this return ERR_PTR(-Efoo) on error, rather than
> NULL.
>
> That way, tty_register_device() ends with
>
> - class_device_create(tty_class, NULL, dev, device, "%s", name);
> + return class_device_create(tty_class, NULL, dev, device, "%s", name);
> }
>
> which is neat.
I agree, that would be nicer.
thanks,
greg k-h
next prev parent reply other threads:[~2006-04-22 19:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-22 0:59 [PATCH 2.6.17-rc2 1/2] return class device pointer from tty_register_device() Tilman Schmidt
2006-04-22 1:14 ` Andrew Morton
2006-04-22 4:16 ` Greg KH [this message]
2006-04-22 16:36 ` Tilman Schmidt
2006-04-22 18:07 ` [PATCH 2.6.17-rc2 2/2] i4l gigaset: move sysfs entry to tty class device Tilman Schmidt
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=20060422041655.GA15892@suse.de \
--to=gregkh@suse.de \
--cc=akpm@osdl.org \
--cc=hjlipp@web.de \
--cc=linux-kernel@vger.kernel.org \
--cc=tilman@imap.cc \
/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