From: Miles Bader <miles@lsi.nec.co.jp>
To: "Randy.Dunlap" <rddunlap@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: initcall ordering of driver w/respect to tty_init?
Date: 14 Oct 2003 11:12:01 +0900 [thread overview]
Message-ID: <buohe2ctvny.fsf@mcspd15.ucom.lsi.nec.co.jp> (raw)
In-Reply-To: <20031010181251.GA32720@fencepost>
Miles Bader <miles@gnu.org> writes:
> I think that would solve the problem, but is it the right solution? How
> about all those other drivers that call tty_register_driver? module_init
> becomes __initcall when driver is statically linked into the kernel...
I've looked more at <linux/init.h>, and I think for my driver, which is
always statically linked, I can use `late_initcall' instead of
`__initcall' (it makes me slightly nervous to use the last init slot,
but whatever).
But what about all those tty drivers that are suppose to work as
modules? They use `module_init' to do their initialization, which will
work fine when they _are_ a module, but if they get statically linked,
the module_init will turn into `__initcall', and run into the same
problem I'm having. Presumably they _could_ use `late_initcall', since
<linux/init.h> contains code that makes it work in modules too, but the
comment in the code says you shouldn't do that.
[To recap: tty drivers that use module_init to initialize themselves,
which turns into __initcall if statically linked, will only work if they
happen to be initialized _after_ tty_io.c (because of the kobj stuff) --
and there seems to be nothing enforcing this ordering.]
-Miles
--
97% of everything is grunge
prev parent reply other threads:[~2003-10-14 2:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-08 7:48 Miles Bader
2003-10-10 15:02 ` Randy.Dunlap
2003-10-10 18:12 ` Miles Bader
2003-10-14 2:12 ` Miles Bader [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=buohe2ctvny.fsf@mcspd15.ucom.lsi.nec.co.jp \
--to=miles@lsi.nec.co.jp \
--cc=linux-kernel@vger.kernel.org \
--cc=miles@gnu.org \
--cc=rddunlap@osdl.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
all inboxes | Powered by JetHome®