linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* PATCH: linux-2.4.9/drivers/block/DAC960.c to new module_{init,exit} interface
@ 2001-08-20 14:37 Adam J. Richter
  2001-08-20 15:54 ` Leonard N. Zubkoff
  0 siblings, 1 reply; 3+ messages in thread
From: Adam J. Richter @ 2001-08-20 14:37 UTC (permalink / raw)
  To: lnz; +Cc: linux-kernel

	The following patch moves linux-2.4.9/drivers/block/DAC960.c
to the new module_{init,exit} interface, simplifying it slightly and
removing the DAC960_init reference from drivers/block/genhd.c
(part of my effort to eliminate genhd.c).

	Leonard, does this look OK to you?  If so, do you want to
submit this to Alan and Linus or do you want me to?

-- 
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."

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: PATCH: linux-2.4.9/drivers/block/DAC960.c to new module_{init,exit} interface
  2001-08-20 14:37 PATCH: linux-2.4.9/drivers/block/DAC960.c to new module_{init,exit} interface Adam J. Richter
@ 2001-08-20 15:54 ` Leonard N. Zubkoff
  0 siblings, 0 replies; 3+ messages in thread
From: Leonard N. Zubkoff @ 2001-08-20 15:54 UTC (permalink / raw)
  To: adam; +Cc: linux-kernel

  Date: Mon, 20 Aug 2001 07:37:16 -0700
  From: "Adam J. Richter" <adam@yggdrasil.com>

	  The following patch moves linux-2.4.9/drivers/block/DAC960.c
  to the new module_{init,exit} interface, simplifying it slightly and
  removing the DAC960_init reference from drivers/block/genhd.c
  (part of my effort to eliminate genhd.c).

I don't see any patch present as part of this message...

	  Leonard, does this look OK to you?  If so, do you want to
  submit this to Alan and Linus or do you want me to?

I have a new driver release alsmost ready, so I'll look your patch over and
merge it with my working copy, and then I'll send that update in.

		Leonard

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: PATCH: linux-2.4.9/drivers/block/DAC960.c to new module_{init,exit} interface
@ 2001-08-20 22:12 Adam J. Richter
  0 siblings, 0 replies; 3+ messages in thread
From: Adam J. Richter @ 2001-08-20 22:12 UTC (permalink / raw)
  To: lnz; +Cc: linux-kernel

[-- 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();

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-08-20 22:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-20 14:37 PATCH: linux-2.4.9/drivers/block/DAC960.c to new module_{init,exit} interface Adam J. Richter
2001-08-20 15:54 ` Leonard N. Zubkoff
2001-08-20 22:12 Adam J. Richter

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).