From: Andrew Morton <akpm@osdl.org>
To: Tilman Schmidt <tilman@imap.cc>
Cc: linux-kernel@vger.kernel.org, gregkh@suse.de, 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 18:14:29 -0700 [thread overview]
Message-ID: <20060421181429.5ea9d777.akpm@osdl.org> (raw)
In-Reply-To: <44497FFE.6050508@imap.cc>
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.
next prev parent reply other threads:[~2006-04-22 1:15 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 [this message]
2006-04-22 4:16 ` Greg KH
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=20060421181429.5ea9d777.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=gregkh@suse.de \
--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