warnings from drivers/tty/ehv_bytechan.c

Tabi Timur-B04825 B04825 at freescale.com
Tue Feb 21 00:24:22 EST 2012


Stephen Rothwell wrote:
> console_initcall() is not defined for modules.

Hmmm... the patch you posted is a good short-term fix, but I wonder if 
makes sense for the driver to support modules at all.  I have this in the 
driver:

#include <linux/module.h>
...
module_init(ehv_bc_init);
module_exit(ehv_bc_exit);

although to be honest, I can't remember the last time I tried to compile 
it as a module.

The problem stems from the fact that it's a console driver *and* a tty 
driver.  It makes sense that a tty driver can be compiled as a module, but 
not a console driver.

So Greg, can I do something like this:

#ifdef MODULE
module_initcall(ehv_bc_console_init)
#else
console_initcall(ehv_bc_console_init);
#endif

-- 
Timur Tabi
Linux kernel developer at Freescale


More information about the Linuxppc-dev mailing list