Register tty_devclass before use
PATCH 1/1 Register tty_devclass before use
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.
drivers/char/tty_io.c +7 -2
@@ -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,
Signature · 2 lines
Russell King ([email protected]) The developer of ARM Linux http://www.arm.linux.org.uk/personal/aboutme.html