linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Adam J. Richter" <adam@yggdrasil.com>
To: langa2@kph.uni-mainz.de
Cc: linux-kernel@vger.kernel.org
Subject: PATCH: linux-2.4.0-prerelease/drivers/scsi/ibmmca.c module fixes
Date: Sun, 31 Dec 2000 21:44:01 -0800	[thread overview]
Message-ID: <20001231214401.A17659@baldur.yggdrasil.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 973 bytes --]

	linux-2.4.0-prerelease/drivers/scsi/ibmmca.c does not link
as a module because some necessary code is bracketed in 
"#ifdef CONFIG_SCSI_IBMMCA", when it should be brakceted in
"#if defined(CONFIG_SCSI_IBMMCA) || defined(CONFIG_SCSI_IBMMCA_MODULE)".

	The driver also had a symbol versioning problem a while ago,
which was somehow related to the fact that it included <linux/module.h>
pretty late in the source code.  I am not sure if that problem still
exists, but putting "#include <linux/module.h>" in the initial block of
includes without any ifdefs seems to be the standard, so this change
should be regarded as a stylistic cleanup even if we are not forced
to make the change.

-- 
Adam J. Richter     __     ______________   4880 Stevens Creek Blvd, Suite 104
adam@yggdrasil.com     \ /                  San Jose, California 95129-1034
+1 408 261-6630         | g g d r a s i l   United States of America
fax +1 408 261-6631      "Free Software For The Rest Of Us."

[-- Attachment #2: ibmmca.diffs --]
[-- Type: text/plain, Size: 905 bytes --]

--- linux-2.4.0-prerelease/drivers/scsi/ibmmca.c	Sun Dec 31 09:36:15 2000
+++ linux/drivers/scsi/ibmmca.c	Sun Dec 31 21:21:20 2000
@@ -16,6 +16,8 @@
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0)
 #error "This driver works only with kernel 2.4.0 or higher!"
 #endif
+
+#include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/types.h>
 #include <linux/ctype.h>
@@ -443,7 +445,6 @@
    (that is kernel version 2.1.x) */
 #if defined(MODULE)
 static char *boot_options = NULL;
-#include <linux/module.h>
 MODULE_PARM(boot_options, "s");
 MODULE_PARM(io_port, "1-" __MODULE_STRING(IM_MAX_HOSTS) "i");
 MODULE_PARM(scsi_id, "1-" __MODULE_STRING(IM_MAX_HOSTS) "i");
@@ -1399,7 +1400,7 @@
    return 0;
 }
 
-#ifdef CONFIG_SCSI_IBMMCA
+#if defined(CONFIG_SCSI_IBMMCA) || defined(CONFIG_SCSI_IBMMCA_MODULE)
 void internal_ibmmca_scsi_setup (char *str, int *ints)
 {
    int i, j, io_base, id_base;

                 reply	other threads:[~2001-01-01  6:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20001231214401.A17659@baldur.yggdrasil.com \
    --to=adam@yggdrasil.com \
    --cc=langa2@kph.uni-mainz.de \
    --cc=linux-kernel@vger.kernel.org \
    /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).