From: "Adam J. Richter" <adam@yggdrasil.com>
To: lnz@dandelion.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: PATCH: linux-2.4.9/drivers/block/DAC960.c to new module_{init,exit} interface
Date: Mon, 20 Aug 2001 15:12:17 -0700 [thread overview]
Message-ID: <20010820151217.A4863@baldur.yggdrasil.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 384 bytes --]
>I don't see any patch present as part of this message...
Oops! Sorry. Here is the patch.
--
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: DAC960.diffs --]
[-- Type: text/plain, Size: 2020 bytes --]
--- linux-2.4.9/drivers/block/DAC960.c Mon Aug 6 10:34:38 2001
+++ linux/drivers/block/DAC960.c Sun Aug 19 06:22:08 2001
@@ -41,6 +41,7 @@
#include <linux/spinlock.h>
#include <linux/timer.h>
#include <linux/pci.h>
+#include <linux/init.h>
#include <asm/io.h>
#include <asm/segment.h>
#include <asm/uaccess.h>
@@ -2534,7 +2535,7 @@
DAC960_Initialize initializes the DAC960 Driver.
*/
-void DAC960_Initialize(void)
+static int __init DAC960_Initialize(void)
{
int ControllerNumber;
DAC960_DetectControllers(DAC960_BA_Controller);
@@ -2543,7 +2544,7 @@
DAC960_DetectControllers(DAC960_PG_Controller);
DAC960_DetectControllers(DAC960_PD_Controller);
DAC960_SortControllers();
- if (DAC960_ActiveControllerCount == 0) return;
+ if (DAC960_ActiveControllerCount == 0) return -ENODEV;
for (ControllerNumber = 0;
ControllerNumber < DAC960_ControllerCount;
ControllerNumber++)
@@ -2559,6 +2560,7 @@
}
DAC960_CreateProcEntries();
register_reboot_notifier(&DAC960_NotifierBlock);
+ return (DAC960_ActiveControllerCount > 0 ? 0 : -ENODEV);
}
@@ -6609,24 +6611,10 @@
}
-/*
- Include Module support if requested.
-*/
-
-#ifdef MODULE
-
-
-int init_module(void)
-{
- DAC960_Initialize();
- return (DAC960_ActiveControllerCount > 0 ? 0 : -1);
-}
-
-
-void cleanup_module(void)
+void __exit DAC960_Exit(void)
{
DAC960_Finalize(&DAC960_NotifierBlock, SYS_RESTART, NULL);
}
-
-#endif
+module_init(DAC960_Initialize);
+module_exit(DAC960_Exit);
--- linux-2.4.9/drivers/block/genhd.c Thu Jul 19 17:48:15 2001
+++ linux/drivers/block/genhd.c Mon Aug 20 07:33:10 2001
@@ -18,9 +18,6 @@
#include <linux/init.h>
extern int blk_dev_init(void);
-#ifdef CONFIG_BLK_DEV_DAC960
-extern void DAC960_Initialize(void);
-#endif
#ifdef CONFIG_FUSION_BOOT
extern int fusion_init(void);
#endif
@@ -37,9 +34,6 @@
sti();
#ifdef CONFIG_I2O
i2o_init();
-#endif
-#ifdef CONFIG_BLK_DEV_DAC960
- DAC960_Initialize();
#endif
#ifdef CONFIG_FUSION_BOOT
fusion_init();
next reply other threads:[~2001-08-20 22:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-08-20 22:12 Adam J. Richter [this message]
-- strict thread matches above, loose matches on Subject: below --
2001-08-20 14:37 Adam J. Richter
2001-08-20 15:54 ` Leonard N. Zubkoff
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=20010820151217.A4863@baldur.yggdrasil.com \
--to=adam@yggdrasil.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lnz@dandelion.com \
/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
all inboxes | Powered by JetHome®