From: "Randy.Dunlap" <rddunlap@osdl.org>
To: Miles Bader <miles@gnu.org>
Cc: miles@lsi.nec.co.jp, linux-kernel@vger.kernel.org
Subject: Re: initcall ordering of driver w/respect to tty_init?
Date: Fri, 10 Oct 2003 08:02:12 -0700 [thread overview]
Message-ID: <20031010080212.6ddb02ff.rddunlap@osdl.org> (raw)
In-Reply-To: <buo65j0f9vi.fsf@mcspd15.ucom.lsi.nec.co.jp>
On 08 Oct 2003 16:48:17 +0900 Miles Bader <miles@lsi.nec.co.jp> wrote:
| I have a tty driver, arch/v850/kernel/simcons.c, who's init function is
| called via __initcall:
|
| int __init simcons_tty_init (void)
| {
| struct tty_driver *driver = alloc_tty_driver(1);
| ...
| err = tty_register_driver(driver);
| }
| __initcall (simcons_tty_init);
|
| I'm getting errors because this init function is being called _before_
| tty_init, and tty_kobj (which is the `parent' kobj of simcon's kobj) is
| apparently not setup correctly yet when the simcons_tty_init calls
| tty_register_driver.
|
| Since there seems to be no way of ordering basic initcalls, I can see
| why it's happening. But what's the proper way to avoid this? Other
| tty drivers that call tty_register_driver also seem to get initialized
| via initcalls (usually declared with module_init), so maybe this
| problem exists for other drivers too.
Does it help/work to change it to a console_initcall() ?
--
~Randy
next prev parent reply other threads:[~2003-10-10 15:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-08 7:48 initcall ordering of driver w/respect to tty_init? Miles Bader
2003-10-10 15:02 ` Randy.Dunlap [this message]
2003-10-10 18:12 ` Miles Bader
2003-10-14 2:12 ` Miles Bader
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=20031010080212.6ddb02ff.rddunlap@osdl.org \
--to=rddunlap@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miles@gnu.org \
--cc=miles@lsi.nec.co.jp \
/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