From: Alexander Viro <viro@math.psu.edu>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] turn device_init() into an initcall
Date: Tue, 15 May 2001 13:06:30 -0400 (EDT) [thread overview]
Message-ID: <Pine.GSO.4.21.0105151254020.21081-100000@weyl.math.psu.edu> (raw)
In-Reply-To: <Pine.GSO.4.21.0105151231250.21081-100000@weyl.math.psu.edu>
On Tue, 15 May 2001, Alexander Viro wrote:
>
>
> On Tue, 15 May 2001, Alexander Viro wrote:
>
> > ramdisks, etc.). Besides, it allows to start turning functions called
> > from device_init() into initcalls, thus getting rid of ifdef dungpiles
> > in them.
>
> ... and here's the next part. Takes parport_init() out of device_init().
> Since we have no initcalls in parport/* we don't break the ordering.
> Please, apply - it's incremental to previous.
One more - chr_dev_init() becomes initcall. However, I'd really like
to see this one reviewed from the ordering POV. It may break things -
we might need to move some stuff around. FWIW it works for me, but I don't
have a lot of hardware, so that doesn't say much.
Folks, please look into that - previous patches allow to turn device
initialization into initcalls and it's a Good Thing(tm). Just look
at device_init(), chr_dev_init() and blk_dev_init() - each of them is
a hive of ifdefs.
Linus, your comments?
Al
diff -urN S5-pre2-init-1/drivers/Makefile S5-pre2-init/drivers/Makefile
--- S5-pre2-init-1/drivers/Makefile Tue May 15 12:36:34 2001
+++ S5-pre2-init/drivers/Makefile Tue May 15 12:51:55 2001
@@ -9,7 +9,7 @@
mod-subdirs := dio mtd sbus video macintosh usb input telephony sgi i2o ide \
scsi md ieee1394 pnp isdn atm fc4 net/hamradio i2c acpi
-subdir-y := parport block char net sound misc media cdrom
+subdir-y := parport char block net sound misc media cdrom
subdir-m := $(subdir-y)
diff -urN S5-pre2-init-1/drivers/block/genhd.c S5-pre2-init/drivers/block/genhd.c
--- S5-pre2-init-1/drivers/block/genhd.c Tue May 15 12:36:34 2001
+++ S5-pre2-init/drivers/block/genhd.c Tue May 15 12:52:21 2001
@@ -17,7 +17,6 @@
#include <linux/blk.h>
#include <linux/init.h>
-extern int chr_dev_init(void);
extern int blk_dev_init(void);
#ifdef CONFIG_BLK_DEV_DAC960
extern void DAC960_Initialize(void);
@@ -32,7 +31,6 @@
int __init device_init(void)
{
- chr_dev_init();
blk_dev_init();
sti();
#ifdef CONFIG_I2O
diff -urN S5-pre2-init-1/drivers/char/Makefile S5-pre2-init/drivers/char/Makefile
--- S5-pre2-init-1/drivers/char/Makefile Sat Apr 28 02:12:49 2001
+++ S5-pre2-init/drivers/char/Makefile Tue May 15 12:52:48 2001
@@ -16,7 +16,7 @@
O_TARGET := char.o
-obj-y += tty_io.o n_tty.o tty_ioctl.o mem.o raw.o pty.o misc.o random.o
+obj-y += mem.o tty_io.o n_tty.o tty_ioctl.o raw.o pty.o misc.o random.o
# All of the (potential) objects that export symbols.
# This list comes from 'grep -l EXPORT_SYMBOL *.[hc]'.
diff -urN S5-pre2-init-1/drivers/char/mem.c S5-pre2-init/drivers/char/mem.c
--- S5-pre2-init-1/drivers/char/mem.c Sat Apr 28 02:12:50 2001
+++ S5-pre2-init/drivers/char/mem.c Tue May 15 12:53:17 2001
@@ -653,3 +653,5 @@
#endif
return 0;
}
+
+__initcall(chr_dev_init);
next prev parent reply other threads:[~2001-05-15 17:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-05-15 15:56 [PATCH] turn device_init() into an initcall Alexander Viro
2001-05-15 16:36 ` Alexander Viro
2001-05-15 17:06 ` Alexander Viro [this message]
2001-05-16 11:47 ` Alexander Viro
-- strict thread matches above, loose matches on Subject: below --
2001-05-03 1:21 Alexander Viro
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=Pine.GSO.4.21.0105151254020.21081-100000@weyl.math.psu.edu \
--to=viro@math.psu.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
/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;
as well as URLs for NNTP newsgroup(s).