* [PATCH] Register tty_devclass before use
@ 2003-03-08 12:11 Russell King
0 siblings, 0 replies; only message in thread
From: Russell King @ 2003-03-08 12:11 UTC (permalink / raw)
To: Linus Torvalds, Linux Kernel List
Hi,
The following patch (against vanilla 2.5.64) registers the tty devclass
with sysfs before any drivers can use it - sysfs requires structures to
be registered before use.
The patch applies to bk-curr with offset.
--- orig/drivers/char/tty_io.c Wed Mar 5 19:45:15 2003
+++ linux/drivers/char/tty_io.c Sat Mar 8 12:01:41 2003
@@ -2307,14 +2307,19 @@
};
EXPORT_SYMBOL(tty_devclass);
+static int __init tty_devclass_init(void)
+{
+ return devclass_register(&tty_devclass);
+}
+
+postcore_initcall(tty_devclass_init);
+
/*
* Ok, now we can initialize the rest of the tty devices and can count
* on memory allocations, interrupts etc..
*/
void __init tty_init(void)
{
- devclass_register(&tty_devclass);
-
/*
* dev_tty_driver and dev_console_driver are actually magic
* devices which get redirected at open time. Nevertheless,
--
Russell King (rmk@arm.linux.org.uk) The developer of ARM Linux
http://www.arm.linux.org.uk/personal/aboutme.html
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-03-08 19:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-08 12:11 [PATCH] Register tty_devclass before use Russell King
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox