public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] ide.c as a module
@ 2003-12-11 20:25 Daniel Tram Lux
  2003-12-11 21:25 ` Bartlomiej Zolnierkiewicz
  0 siblings, 1 reply; 14+ messages in thread
From: Daniel Tram Lux @ 2003-12-11 20:25 UTC (permalink / raw)
  To: linux-kernel

Hi,

I needed the ide-subsytem as a module on 2.4.23 and noticed (due to the missing modprobe on the embedded linux system)
that ide.c tries to load the module ide-probe-mod which is called ide-detect now.
The patch also get's rid of the need for ide-probe-mini alias ide-detect, but I don't know if that is desired? (it was in my case).

Regards

Daniel Lux

P.S.
please c/c me for comments. 

--- linux-2.4.23.org/drivers/ide/ide.c  2003-11-28 19:26:20.000000000 +0100
+++ linux-2.4.23/drivers/ide/ide.c      2004-03-11 20:31:51.000000000 +0100
@@ -514,11 +514,7 @@

 void ide_probe_module (int revaldiate)
 {
-       if (!ide_probe) {
-#if  defined(CONFIG_BLK_DEV_IDE_MODULE)
-               (void) request_module("ide-probe-mod");
-#endif
-       } else {
+       if (ide_probe) {
                (void) ide_probe->init();
        }
        revalidate_drives(revaldiate);
@@ -3018,13 +3014,13 @@
                banner_printed = 1;
        }

+       initializing = 1;
        init_ide_data();

 #ifndef CLASSIC_BUILTINS_METHOD
        ide_init_builtin_subdrivers();
 #endif /* CLASSIC_BUILTINS_METHOD */

-       initializing = 1;
        ide_init_builtin_drivers();
        initializing = 0;

@@ -3043,6 +3039,9 @@
 MODULE_PARM(options,"s");
 MODULE_LICENSE("GPL");

+extern int ideprobe_init_module();
+extern void ideprobe_cleanup_module (void);
+
 static void __init parse_options (char *line)
 {
        char *next = line;
@@ -3059,14 +3058,19 @@

 int init_module (void)
 {
+        int res;
+
        parse_options(options);
-       return ide_init();
+       res = ide_init();
+       ideprobe_init_module();
+       return(res);
 }

 void cleanup_module (void)
 {
        int index;
-
+
+       ideprobe_cleanup_module();
        unregister_reboot_notifier(&ide_notifier);
        for (index = 0; index < MAX_HWIFS; ++index) {
                ide_unregister(index);


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

end of thread, other threads:[~2003-12-20  3:07 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-11 20:25 [patch] ide.c as a module Daniel Tram Lux
2003-12-11 21:25 ` Bartlomiej Zolnierkiewicz
2003-12-11 21:50   ` Bartlomiej Zolnierkiewicz
2003-12-12  9:20   ` Daniel Tram Lux
2003-12-12 13:30     ` Bartlomiej Zolnierkiewicz
2003-12-12 14:42       ` Daniel Tram Lux
2003-12-12 15:46         ` Bartlomiej Zolnierkiewicz
2003-12-12 17:17           ` Daniel Tram Lux
2003-12-12 17:37             ` Bartlomiej Zolnierkiewicz
2003-12-18  0:29               ` Krzysztof Halasa
2003-12-19 16:26                 ` Bartlomiej Zolnierkiewicz
2003-12-19 17:05                   ` Randy.Dunlap
2003-12-19 20:10                     ` Bartlomiej Zolnierkiewicz
2003-12-20  2:59                     ` Andre Hedrick

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox