linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Tabi Timur-B04825 <B04825@freescale.com>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	ppc-dev <linuxppc-dev@lists.ozlabs.org>
Subject: Re: warnings from drivers/tty/ehv_bytechan.c
Date: Mon, 20 Feb 2012 13:24:22 +0000	[thread overview]
Message-ID: <4F424985.2020706@freescale.com> (raw)
In-Reply-To: <20120220072352.4c8131bbcea69afc007a4297@canb.auug.org.au>

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=20
makes sense for the driver to support modules at all.  I have this in the=20
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=20
it as a module.

The problem stems from the fact that it's a console driver *and* a tty=20
driver.  It makes sense that a tty driver can be compiled as a module, but=
=20
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

--=20
Timur Tabi
Linux kernel developer at Freescale=

  reply	other threads:[~2012-02-20 13:24 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 [this message]
2012-02-24 21:50   ` gregkh
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=4F424985.2020706@freescale.com \
    --to=b04825@freescale.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=sfr@canb.auug.org.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).