]> git.pld-linux.org Git - packages/kernel.git/blame - linux-2.4.23-modular-ide.patch
- updated again (correct module init order)
[packages/kernel.git] / linux-2.4.23-modular-ide.patch
CommitLineData
d33356ab
AM
1diff -urN linux-2.4.22.org/drivers/ide/ide.c linux-2.4.22/drivers/ide/ide.c
2--- linux-2.4.22.org/drivers/ide/ide.c 2003-11-22 22:11:12.000000000 +0100
e5f8ff20 3+++ linux-2.4.22/drivers/ide/ide.c 2003-11-23 02:00:54.000000000 +0100
acf5886d
AM
4@@ -3040,6 +3040,8 @@
5 return 0;
6 }
8168f3ce 7
d33356ab 8+#include "ide-probe.c"
8168f3ce 9+
acf5886d
AM
10 #ifdef MODULE
11 char *options = NULL;
12 MODULE_PARM(options,"s");
e5f8ff20 13@@ -3061,14 +3063,30 @@
8168f3ce 14
d33356ab
AM
15 int init_module (void)
16 {
e5f8ff20
AM
17+ unsigned int index;
18+ int ret;
19+
20 parse_options(options);
21- return ide_init();
22+ ret = ide_init();
23+
24+ if (ret)
25+ return ret;
8168f3ce 26+
d33356ab
AM
27+ for (index = 0; index < MAX_HWIFS; ++index)
28+ ide_unregister(index);
29+ ideprobe_init();
30+ create_proc_ide_interfaces();
31+ ide_xlate_1024_hook = ide_xlate_1024;
e5f8ff20 32+ return 0;
8168f3ce 33 }
e5f8ff20
AM
34
35 void cleanup_module (void)
d33356ab
AM
36 {
37 int index;
8168f3ce 38
d33356ab
AM
39+ ide_probe = NULL;
40+ ide_xlate_1024_hook = 0;
8168f3ce 41+
d33356ab
AM
42 unregister_reboot_notifier(&ide_notifier);
43 for (index = 0; index < MAX_HWIFS; ++index) {
44 ide_unregister(index);
0f12bb43
AM
45diff -urN linux-2.4.22.org/drivers/ide/ide-probe.c linux-2.4.22/drivers/ide/ide-probe.c
46--- linux-2.4.22.org/drivers/ide/ide-probe.c 2003-11-22 22:08:09.000000000 +0100
e5f8ff20 47+++ linux-2.4.22/drivers/ide/ide-probe.c 2003-11-23 02:01:08.000000000 +0100
0f12bb43
AM
48@@ -1423,23 +1423,4 @@
49
50 #ifdef MODULE
51 extern int (*ide_xlate_1024_hook)(kdev_t, int, int, const char *);
52-
53-int init_module (void)
54-{
55- unsigned int index;
56-
57- for (index = 0; index < MAX_HWIFS; ++index)
58- ide_unregister(index);
59- ideprobe_init();
60- create_proc_ide_interfaces();
61- ide_xlate_1024_hook = ide_xlate_1024;
62- return 0;
63-}
64-
65-void cleanup_module (void)
66-{
67- ide_probe = NULL;
68- ide_xlate_1024_hook = 0;
69-}
70-MODULE_LICENSE("GPL");
71 #endif /* MODULE */
d33356ab
AM
72diff -urN linux-2.4.22.org/drivers/ide/Makefile linux-2.4.22/drivers/ide/Makefile
73--- linux-2.4.22.org/drivers/ide/Makefile 2003-11-22 22:11:09.000000000 +0100
e5f8ff20 74+++ linux-2.4.22/drivers/ide/Makefile 2003-11-23 01:58:26.000000000 +0100
d33356ab
AM
75@@ -9,7 +9,7 @@
76 #
77
78
79-export-objs := ide-iops.o ide-taskfile.o ide-proc.o ide.o ide-probe.o ide-dma.o ide-lib.o setup-pci.o ide-io.o ide-disk.o
80+export-objs := ide-iops.o ide-taskfile.o ide-proc.o ide.o ide-dma.o ide-lib.o setup-pci.o ide-io.o ide-disk.o
81
82 all-subdirs := arm legacy pci ppc raid
83 mod-subdirs := arm legacy pci ppc raid
84@@ -28,8 +28,7 @@
85
86 # Core IDE code - must come before legacy
87
88-ide-core-objs := ide-iops.o ide-taskfile.o ide.o ide-lib.o ide-io.o ide-default.o ide-proc.o
89-ide-detect-objs := ide-probe.o ide-geometry.o
90+ide-core-objs := ide-iops.o ide-taskfile.o ide.o ide-lib.o ide-io.o ide-default.o ide-proc.o ide-geometry.o
91
8168f3ce 92
d33356ab 93 ifeq ($(CONFIG_BLK_DEV_IDEPCI),y)
acf5886d
AM
94@@ -66,8 +65,6 @@
95 obj-$(CONFIG_BLK_DEV_IDETAPE) += ide-tape.o
96 obj-$(CONFIG_BLK_DEV_IDEFLOPPY) += ide-floppy.o
97
98-obj-$(CONFIG_BLK_DEV_IDE) += ide-detect.o
99-
100 ifeq ($(CONFIG_BLK_DEV_IDE),y)
101 # RAID must be last of all
102 obj-y += raid/idedriver-raid.o
103@@ -81,6 +78,3 @@
104 ide-core.o: $(ide-core-objs)
105 $(LD) -r -o $@ $(ide-core-objs)
106
107-ide-detect.o: $(ide-detect-objs)
108- $(LD) -r -o $@ $(ide-detect-objs)
109-
This page took 0.044466 seconds and 4 git commands to generate.