1 drivers/block/ll_rw_blk.c | 2 ++
2 drivers/ide/Makefile | 14 +++++++-------
3 drivers/ide/ide-probe-mini.c | 23 +++++++++++++++++++++++
4 drivers/ide/ide-probe.c | 20 +++++++++++++-------
5 drivers/ide/ide.c | 32 ++++++--------------------------
6 include/linux/ide.h | 1 -
7 6 files changed, 51 insertions(+), 41 deletions(-)
9 diff -puN drivers/block/ll_rw_blk.c~ide-modules drivers/block/ll_rw_blk.c
10 --- linux-2.6.0-test11-bart1/drivers/block/ll_rw_blk.c~ide-modules 2003-12-12 14:10:29.605600968 +0100
11 +++ linux-2.6.0-test11-bart1-root/drivers/block/ll_rw_blk.c 2003-12-12 14:10:50.736388600 +0100
12 @@ -145,6 +145,8 @@ void blk_queue_activity_fn(request_queue
13 q->activity_data = data;
16 +EXPORT_SYMBOL(blk_queue_activity_fn);
19 * blk_queue_prep_rq - set a prepare_request function for queue
21 diff -puN drivers/ide/ide.c~ide-modules drivers/ide/ide.c
22 --- linux-2.6.0-test11-bart1/drivers/ide/ide.c~ide-modules 2003-12-12 14:10:13.949980984 +0100
23 +++ linux-2.6.0-test11-bart1-root/drivers/ide/ide.c 2003-12-12 14:10:13.968978096 +0100
24 @@ -189,9 +189,6 @@ int noautodma = 1;
27 EXPORT_SYMBOL(noautodma);
28 -EXPORT_SYMBOL(ide_bus_type);
30 -int (*ide_probe)(void);
33 * This is declared extern in ide.h, for access by other IDE modules:
34 @@ -443,21 +440,6 @@ u8 ide_dump_status (ide_drive_t *drive,
36 EXPORT_SYMBOL(ide_dump_status);
40 -void ide_probe_module (void)
43 -#if defined(CONFIG_KMOD) && defined(CONFIG_BLK_DEV_IDE_MODULE)
44 - (void) request_module("ide-probe-mod");
45 -#endif /* (CONFIG_KMOD) && (CONFIG_BLK_DEV_IDE_MODULE) */
51 -EXPORT_SYMBOL(ide_probe_module);
53 static int ide_open (struct inode * inode, struct file * filp)
56 @@ -585,8 +567,6 @@ control_region_busy:
60 -EXPORT_SYMBOL(ide_hwif_request_regions);
63 * ide_hwif_release_regions - free IDE resources
65 @@ -622,8 +602,6 @@ void ide_hwif_release_regions(ide_hwif_t
69 -EXPORT_SYMBOL(ide_hwif_release_regions);
71 extern void init_hwif_data(unsigned int index);
74 @@ -992,6 +970,8 @@ void ide_setup_ports ( hw_regs_t *hw,
76 EXPORT_SYMBOL(ide_setup_ports);
78 +extern int ideprobe_init_module(void);
81 * Register an IDE interface, specifying exactly the registers etc
82 * Set init=1 iff calling before probes have taken place.
83 @@ -1033,7 +1013,10 @@ found:
84 hwif->chipset = hw->chipset;
89 + if (ideprobe_init_module() == -EBUSY)
93 create_proc_ide_interfaces();
95 @@ -1517,8 +1500,6 @@ int ata_attach(ide_drive_t *drive)
99 -EXPORT_SYMBOL(ata_attach);
101 static int generic_ide_suspend(struct device *dev, u32 state)
103 ide_drive_t *drive = dev->driver_data;
104 @@ -2564,7 +2545,6 @@ EXPORT_SYMBOL(ide_fops);
107 EXPORT_SYMBOL(ide_lock);
108 -EXPORT_SYMBOL(ide_probe);
110 struct bus_type ide_bus_type = {
112 diff -puN drivers/ide/ide-probe.c~ide-modules drivers/ide/ide-probe.c
113 --- linux-2.6.0-test11-bart1/drivers/ide/ide-probe.c~ide-modules 2003-12-12 14:10:13.943981896 +0100
114 +++ linux-2.6.0-test11-bart1-root/drivers/ide/ide-probe.c 2003-12-12 14:10:13.964978704 +0100
115 @@ -1348,27 +1348,33 @@ int ideprobe_init (void)
116 ata_attach(&hwif->drives[unit]);
120 - ide_probe = &ideprobe_init;
126 -int init_module (void)
127 +static int ideprobe_done;
129 +int ideprobe_init_module(void)
137 for (index = 0; index < MAX_HWIFS; ++index)
138 ide_unregister(index);
140 create_proc_ide_interfaces();
145 -void cleanup_module (void)
146 +EXPORT_SYMBOL_GPL(ideprobe_init_module);
148 +void ideprobe_cleanup_module(void)
152 -MODULE_LICENSE("GPL");
154 +EXPORT_SYMBOL_GPL(ideprobe_cleanup_module);
156 diff -puN /dev/null drivers/ide/ide-probe-mini.c
157 --- /dev/null 2003-01-30 11:24:37.000000000 +0100
158 +++ linux-2.6.0-test11-bart1-root/drivers/ide/ide-probe-mini.c 2003-12-12 14:10:13.965978552 +0100
161 + * linux/drivers/ide/ide-probe-mini.c Version 1
163 + * Copyright (C) 1994-1998 Linus Torvalds & authors (see below)
166 +#include <linux/config.h>
167 +#include <linux/init.h>
168 +#include <linux/module.h>
169 +#include <linux/types.h>
170 +#include <linux/string.h>
171 +#include <linux/kernel.h>
172 +#include <linux/kmod.h>
175 +extern int ideprobe_init_module(void);
176 +extern void ideprobe_cleanup_module(void);
178 +module_init(ideprobe_init_module);
179 +module_exit(ideprobe_cleanup_module);
181 +MODULE_LICENSE("GPL");
183 diff -puN drivers/ide/Makefile~ide-modules drivers/ide/Makefile
184 --- linux-2.6.0-test11-bart1/drivers/ide/Makefile~ide-modules 2003-12-12 14:10:13.946981440 +0100
185 +++ linux-2.6.0-test11-bart1-root/drivers/ide/Makefile 2003-12-12 14:24:35.073070376 +0100
187 # First come modules that register themselves with the core
188 obj-$(CONFIG_BLK_DEV_IDE) += pci/
190 +ide-core-objs := ide-io.o ide-probe.o ide-iops.o ide-taskfile.o ide.o ide-lib.o ide-default.o
192 # Core IDE code - must come before legacy
193 +ide-core-$(CONFIG_BLK_DEV_IDEPCI) += setup-pci.o
194 +ide-core-$(CONFIG_BLK_DEV_IDEDMA_PCI) += ide-dma.o
195 +ide-core-$(CONFIG_BLK_DEV_IDE_TCQ) += ide-tcq.o
196 +ide-core-$(CONFIG_PROC_FS) += ide-proc.o
198 -obj-$(CONFIG_BLK_DEV_IDE) += ide-io.o ide-probe.o ide-iops.o ide-taskfile.o ide.o ide-lib.o ide-default.o
199 obj-$(CONFIG_BLK_DEV_IDEDISK) += ide-disk.o
200 obj-$(CONFIG_BLK_DEV_IDECD) += ide-cd.o
201 obj-$(CONFIG_BLK_DEV_IDETAPE) += ide-tape.o
202 obj-$(CONFIG_BLK_DEV_IDEFLOPPY) += ide-floppy.o
204 -obj-$(CONFIG_BLK_DEV_IDEPCI) += setup-pci.o
205 -obj-$(CONFIG_BLK_DEV_IDEDMA_PCI) += ide-dma.o
206 -obj-$(CONFIG_BLK_DEV_IDE_TCQ) += ide-tcq.o
207 obj-$(CONFIG_BLK_DEV_IDEPNP) += ide-pnp.o
209 -ifeq ($(CONFIG_BLK_DEV_IDE),y)
210 -obj-$(CONFIG_PROC_FS) += ide-proc.o
212 +obj-$(CONFIG_BLK_DEV_IDE) += ide-core.o ide-probe-mini.o
214 obj-$(CONFIG_BLK_DEV_IDE) += legacy/ ppc/ arm/
215 obj-$(CONFIG_BLK_DEV_HD) += legacy/
216 diff -puN include/linux/ide.h~ide-modules include/linux/ide.h
217 --- linux-2.6.0-test11-bart1/include/linux/ide.h~ide-modules 2003-12-12 14:10:13.960979312 +0100
218 +++ linux-2.6.0-test11-bart1-root/include/linux/ide.h 2003-12-12 14:10:13.969977944 +0100
219 @@ -1238,7 +1238,6 @@ typedef struct ide_devices_s {
222 extern ide_hwif_t ide_hwifs[]; /* master data repository */
223 -extern int (*ide_probe)(void);
225 extern ide_devices_t *idedisk;
226 extern ide_devices_t *idecd;