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().
};
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,