Commit c4ab9d78 authored by Russell King's avatar Russell King Committed by Linus Torvalds

[TTY] Register tty devclass before use.

Register the tty devclass with sysfs before tty drivers initialise -
sysfs requires structures to be registered before use.  This is
required for the previous serial csets, as well as any drivers which
are initialising using __initcall() or module_init().
parent 0ba2db65
......@@ -2235,14 +2235,19 @@ struct device_class tty_devclass = {
};
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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment