From: "gregkh@linuxfoundation•org" <gregkh@linuxfoundation•org>
To: Tabi Timur-B04825 <B04825@freescale•com>
Cc: Stephen Rothwell <sfr@canb•auug.org.au>,
ppc-dev <linuxppc-dev@lists•ozlabs.org>
Subject: Re: warnings from drivers/tty/ehv_bytechan.c
Date: Fri, 24 Feb 2012 13:50:08 -0800 [thread overview]
Message-ID: <20120224215008.GB25330@kroah.com> (raw)
In-Reply-To: <4F424985.2020706@freescale.com>
On Mon, Feb 20, 2012 at 01:24:22PM +0000, Tabi Timur-B04825 wrote:
> 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
Sure, something like that is fine, but if the code really can't be a
module, why not just fix the Kconfig file to enforce this properly
instead?
thanks,
greg k-h
next prev parent reply other threads:[~2012-02-24 21:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-19 20:23 warnings from drivers/tty/ehv_bytechan.c Stephen Rothwell
2012-02-20 13:24 ` Tabi Timur-B04825
2012-02-24 21:50 ` gregkh [this message]
2012-02-24 22:00 ` Timur Tabi
2012-02-24 22:06 ` gregkh
2012-02-24 22:15 ` Timur Tabi
2012-02-24 22:19 ` gregkh
2012-02-24 23:25 ` Scott Wood
-- strict thread matches above, loose matches on Subject: below --
2012-02-19 20:07 Stephen Rothwell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120224215008.GB25330@kroah.com \
--to=gregkh@linuxfoundation$(echo .)org \
--cc=B04825@freescale$(echo .)com \
--cc=linuxppc-dev@lists$(echo .)ozlabs.org \
--cc=sfr@canb$(echo .)auug.org.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox