Re: 2.6.7
On Thu, Jun 17, 2004 at 10:25:26AM +0200, Jens Schmalzing wrote:
> Hi,
>
> Christoph Hellwig writes:
>
> > http://verein.lst.de/~hch/debian-2.6.7.tgz
> >
> > has a crude forward port of the patches in the 2.6.6 package.
>
> Thanks. Unfortunately, 00_drivers-net-tg3-readd
This one can't. It readds drivers/net/tg3.[ch] after it was removed
from Debian's .orig.tar.gz
> and 00_modular-ide do
> not apply cleanly against vanilla 2.6.7.
Ah, sorry. Looks like that's still the old one, the current patch is
below:
--- 1.48/drivers/ide/Kconfig 2004-06-05 21:58:33 +02:00
+++ edited/drivers/ide/Kconfig 2004-06-16 15:44:16 +02:00
@@ -323,7 +323,7 @@
Otherwise say N.
config BLK_DEV_IDEPNP
- bool "PNP EIDE support"
+ tristate "PNP EIDE support"
depends on PNP
help
If you have a PnP (Plug and Play) compatible EIDE card and
--- 1.20/drivers/ide/Makefile 2004-05-20 19:41:35 +02:00
+++ edited/drivers/ide/Makefile 2004-06-16 15:44:16 +02:00
@@ -23,7 +23,6 @@
ide-core-$(CONFIG_BLK_DEV_IDEDMA) += ide-dma.o
ide-core-$(CONFIG_BLK_DEV_IDE_TCQ) += ide-tcq.o
ide-core-$(CONFIG_PROC_FS) += ide-proc.o
-ide-core-$(CONFIG_BLK_DEV_IDEPNP) += ide-pnp.o
# built-in only drivers from arm/
ide-core-$(CONFIG_IDE_ARM) += arm/ide_arm.o
@@ -50,6 +49,9 @@
obj-$(CONFIG_BLK_DEV_IDECD) += ide-cd.o
obj-$(CONFIG_BLK_DEV_IDETAPE) += ide-tape.o
obj-$(CONFIG_BLK_DEV_IDEFLOPPY) += ide-floppy.o
+obj-$(CONFIG_BLK_DEV_IDEPNP) += ide-pnp.o
obj-$(CONFIG_BLK_DEV_IDE) += legacy/ arm/
obj-$(CONFIG_BLK_DEV_HD) += legacy/
+
+EXTRA_CFLAGS := -Idrivers/ide
--- 1.3/drivers/ide/ide-generic.c 2004-02-22 18:36:17 +01:00
+++ edited/drivers/ide/ide-generic.c 2004-06-16 15:44:16 +02:00
@@ -11,9 +11,14 @@
#include <linux/init.h>
#include <linux/module.h>
#include <linux/ide.h>
+#include <linux/config.h>
static int __init ide_generic_init(void)
{
+#ifdef CONFIG_BLK_DEV_IDEPCI
+ ide_scan_pcibus();
+#endif
+
if (ide_hwifs[0].io_ports[IDE_DATA_OFFSET])
ide_get_lock(NULL, NULL); /* for atari only */
@@ -27,6 +32,11 @@
return 0;
}
+static void __exit ide_generic_exit(void)
+{
+}
+
module_init(ide_generic_init);
+module_exit(ide_generic_exit);
MODULE_LICENSE("GPL");
--- 1.9/drivers/ide/ide-pnp.c 2004-06-15 18:31:45 +02:00
+++ edited/drivers/ide/ide-pnp.c 2004-06-16 15:44:16 +02:00
@@ -73,3 +73,21 @@
{
pnp_register_driver(&idepnp_driver);
}
+
+static int pnpide_init_module(void)
+{
+ pnpide_init(1);
+ return 0;
+}
+
+static void pnpide_unload(void)
+{
+ pnpide_init(0);
+}
+
+module_init(pnpide_init_module);
+module_exit(pnpide_unload);
+
+MODULE_AUTHOR("Andrey Panin");
+MODULE_DESCRIPTION("Enabler for ISAPNP IDE devices");
+MODULE_LICENSE("GPL");
--- 1.150/drivers/ide/ide.c 2004-06-15 18:31:12 +02:00
+++ edited/drivers/ide/ide.c 2004-06-16 15:44:16 +02:00
@@ -175,10 +175,11 @@
static int initializing; /* set while initializing built-in drivers */
DECLARE_MUTEX(ide_cfg_sem);
+EXPORT_SYMBOL(ide_cfg_sem);
spinlock_t ide_lock __cacheline_aligned_in_smp = SPIN_LOCK_UNLOCKED;
#ifdef CONFIG_BLK_DEV_IDEPCI
-static int ide_scan_direction; /* THIS was formerly 2.2.x pci=reverse */
+int ide_scan_direction; /* THIS was formerly 2.2.x pci=reverse */
#endif
#ifdef CONFIG_IDEDMA_AUTO
@@ -1364,6 +1365,8 @@
EXPORT_SYMBOL(system_bus_clock);
+EXPORT_SYMBOL(ide_add_generic_settings);
+
/*
* Locking is badly broken here - since way back. That sucker is
* root-only, but that's not an excuse... The real question is what
@@ -2011,9 +2014,9 @@
*/
static void __init probe_for_hwifs (void)
{
-#ifdef CONFIG_BLK_DEV_IDEPCI
- ide_scan_pcibus(ide_scan_direction);
-#endif /* CONFIG_BLK_DEV_IDEPCI */
+#if defined(CONFIG_BLK_DEV_IDEPCI) && !defined(MODULE)
+ ide_scan_pcibus();
+#endif /* CONFIG_BLK_DEV_IDEPCI && !MODULE */
#ifdef CONFIG_ETRAX_IDE
{
--- 1.25/drivers/ide/setup-pci.c 2004-06-01 21:04:38 +02:00
+++ edited/drivers/ide/setup-pci.c 2004-06-16 15:44:18 +02:00
@@ -821,7 +821,7 @@
* boot up the pci layer takes over the job.
*/
-static int __init ide_scan_pcidev(struct pci_dev *dev)
+static int ide_scan_pcidev(struct pci_dev *dev)
{
struct list_head *l;
struct pci_driver *d;
@@ -847,21 +847,23 @@
/**
* ide_scan_pcibus - perform the initial IDE driver scan
- * @scan_direction: set for reverse order scanning
*
* Perform the initial bus rather than driver ordered scan of the
* PCI drivers. After this all IDE pci handling becomes standard
* module ordering not traditionally ordered.
*/
-void __init ide_scan_pcibus (int scan_direction)
+void ide_scan_pcibus(void)
{
struct pci_dev *dev = NULL;
struct pci_driver *d;
struct list_head *l, *n;
+ if (!pre_init)
+ return;
+
pre_init = 0;
- if (!scan_direction) {
+ if (!ide_scan_direction) {
while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
ide_scan_pcidev(dev);
}
@@ -883,3 +885,5 @@
pci_register_driver(d);
}
}
+
+EXPORT_SYMBOL_GPL(ide_scan_pcibus);
--- 1.16/drivers/ide/arm/icside.c 2004-02-28 12:38:08 +01:00
+++ edited/drivers/ide/arm/icside.c 2004-06-16 15:44:16 +02:00
@@ -861,10 +861,19 @@
break;
}
- if (ret == 0)
+ if (ret == 0) {
ecard_set_drvdata(ec, state);
- else
+
+ /*
+ * this locks the driver in-core - remove this
+ * comment and the line below when we can
+ * safely remove interfaces.
+ */
+ if (!try_module_get(THIS_MODULE))
+ ret = -ENODEV;
+ } else {
kfree(state);
+ }
out:
return ret;
}
@@ -947,8 +956,14 @@
return ecard_register_driver(&icside_driver);
}
+static void __exit icside_exit(void)
+{
+ ecard_remove_driver(&icside_driver);
+}
+
MODULE_AUTHOR("Russell King <rmk@arm.linux.org.uk>");
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("ICS IDE driver");
module_init(icside_init);
+module_exit(icside_exit);
--- 1.6/drivers/ide/arm/rapide.c 2004-02-07 20:44:16 +01:00
+++ edited/drivers/ide/arm/rapide.c 2004-06-16 15:44:16 +02:00
@@ -33,6 +33,14 @@
if (ret)
ecard_release(ec);
+ /*
+ * this locks the driver in-core - remove this
+ * comment and the two lines below when we can
+ * safely remove interfaces.
+ */
+ else if (!try_module_get(THIS_MODULE))
+ ret = -ENODEV;
+
return ret;
}
@@ -60,7 +68,13 @@
return ecard_register_driver(&rapide_driver);
}
+static void __exit rapide_exit(void)
+{
+ ecard_remove_driver(&rapide_driver);
+}
+
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("Yellowstone RAPIDE driver");
module_init(rapide_init);
+module_exit(rapide_exit);
--- 1.4/drivers/ide/pci/adma100.c 2003-02-18 19:06:19 +01:00
+++ edited/drivers/ide/pci/adma100.c 2004-06-16 15:44:16 +02:00
@@ -16,7 +16,7 @@
#include <linux/pci.h>
#include <asm/io.h>
-void __init ide_init_adma100 (ide_hwif_t *hwif)
+void __devinit ide_init_adma100 (ide_hwif_t *hwif)
{
unsigned long phy_admctl = pci_resource_start(hwif->pci_dev, 4) + 0x80 + (hwif->channel * 0x20);
void *v_admctl;
--- 1.22/drivers/ide/pci/aec62xx.c 2004-06-16 05:17:44 +02:00
+++ edited/drivers/ide/pci/aec62xx.c 2004-06-16 15:44:16 +02:00
@@ -525,6 +525,8 @@
{
ide_pci_device_t *d = &aec62xx_chipsets[id->driver_data];
+ if (!try_module_get(THIS_MODULE))
+ return -ENODEV;
d->init_setup(dev, d);
return 0;
}
@@ -550,7 +552,13 @@
return ide_pci_register_driver(&driver);
}
+static void __exit aec62xx_ide_exit(void)
+{
+ ide_pci_unregister_driver(&driver);
+}
+
module_init(aec62xx_ide_init);
+module_exit(aec62xx_ide_exit);
MODULE_AUTHOR("Andre Hedrick");
MODULE_DESCRIPTION("PCI driver module for ARTOP AEC62xx IDE");
--- 1.25/drivers/ide/pci/alim15x3.c 2004-06-15 18:29:40 +02:00
+++ edited/drivers/ide/pci/alim15x3.c 2004-06-16 15:45:33 +02:00
@@ -581,7 +581,7 @@
* appropriate also sets up the 1533 southbridge.
*/
-static unsigned int __init init_chipset_ali15x3 (struct pci_dev *dev, const char *name)
+static unsigned int __devinit init_chipset_ali15x3 (struct pci_dev *dev, const char *name)
{
unsigned long flags;
u8 tmpbyte;
@@ -675,7 +675,7 @@
* FIXME: frobs bits that are not defined on newer ALi devicea
*/
-static unsigned int __init ata66_ali15x3 (ide_hwif_t *hwif)
+static unsigned int __devinit ata66_ali15x3 (ide_hwif_t *hwif)
{
struct pci_dev *dev = hwif->pci_dev;
unsigned int ata66 = 0;
@@ -746,7 +746,7 @@
* Initialize the IDE structure side of the ALi 15x3 driver.
*/
-static void __init init_hwif_common_ali15x3 (ide_hwif_t *hwif)
+static void __devinit init_hwif_common_ali15x3 (ide_hwif_t *hwif)
{
hwif->autodma = 0;
hwif->tuneproc = &ali15x3_tune_drive;
@@ -792,7 +792,7 @@
* Sparc systems
*/
-static void __init init_hwif_ali15x3 (ide_hwif_t *hwif)
+static void __devinit init_hwif_ali15x3 (ide_hwif_t *hwif)
{
u8 ideic, inmir;
s8 irq_routing_table[] = { -1, 9, 3, 10, 4, 5, 7, 6,
@@ -844,7 +844,7 @@
* the actual work.
*/
-static void __init init_dma_ali15x3 (ide_hwif_t *hwif, unsigned long dmabase)
+static void __devinit init_dma_ali15x3 (ide_hwif_t *hwif, unsigned long dmabase)
{
if (m5229_revision < 0x20)
return;
@@ -875,6 +875,9 @@
{
ide_pci_device_t *d = &ali15x3_chipset;
+ if (!try_module_get(THIS_MODULE))
+ return -ENODEV;
+
if(pci_find_device(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS100, NULL))
printk(KERN_ERR "Warning: ATI Radeon IGP Northbridge is not yet fully tested.\n");
@@ -903,7 +906,13 @@
return ide_pci_register_driver(&driver);
}
+static void __exit ali15x3_ide_exit(void)
+{
+ ide_pci_unregister_driver(&driver);
+}
+
module_init(ali15x3_ide_init);
+module_exit(ali15x3_ide_exit);
MODULE_AUTHOR("Michael Aubry, Andrzej Krzysztofowicz, CJ, Andre Hedrick, Alan Cox");
MODULE_DESCRIPTION("PCI driver module for ALi 15x3 IDE");
--- 1.31/drivers/ide/pci/amd74xx.c 2004-06-01 19:55:04 +02:00
+++ edited/drivers/ide/pci/amd74xx.c 2004-06-16 15:44:16 +02:00
@@ -312,7 +312,7 @@
* and initialize its drive independent registers.
*/
-static unsigned int __init init_chipset_amd74xx(struct pci_dev *dev, const char *name)
+static unsigned int __devinit init_chipset_amd74xx(struct pci_dev *dev, const char *name)
{
unsigned char t;
unsigned int u;
@@ -416,7 +416,7 @@
return dev->irq;
}
-static void __init init_hwif_amd74xx(ide_hwif_t *hwif)
+static void __devinit init_hwif_amd74xx(ide_hwif_t *hwif)
{
int i;
@@ -496,6 +496,8 @@
static int __devinit amd74xx_probe(struct pci_dev *dev, const struct pci_device_id *id)
{
+ if (!try_module_get(THIS_MODULE))
+ return -ENODEV;
amd_chipset = amd74xx_chipsets + id->driver_data;
amd_config = amd_ide_chips + id->driver_data;
if (dev->device != amd_config->id) BUG();
@@ -538,7 +540,13 @@
return ide_pci_register_driver(&driver);
}
+static void __exit amd74xx_ide_exit(void)
+{
+ ide_pci_unregister_driver(&driver);
+}
+
module_init(amd74xx_ide_init);
+module_exit(amd74xx_ide_exit);
MODULE_AUTHOR("Vojtech Pavlik");
MODULE_DESCRIPTION("AMD PCI IDE driver");
--- 1.3/drivers/ide/pci/atiixp.c 2004-06-01 21:04:38 +02:00
+++ edited/drivers/ide/pci/atiixp.c 2004-06-16 15:46:09 +02:00
@@ -479,6 +479,8 @@
static int __devinit atiixp_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{
+ if (!try_module_get(THIS_MODULE))
+ return -ENODEV;
ide_setup_pci_device(dev, &atiixp_pci_info[id->driver_data]);
return 0;
}
@@ -500,7 +502,13 @@
return ide_pci_register_driver(&driver);
}
+static void __exit atiixp_ide_exit(void)
+{
+ ide_pci_unregister_driver(&driver);
+}
+
module_init(atiixp_ide_init);
+module_exit(atiixp_ide_exit);
MODULE_AUTHOR("HUI YU");
MODULE_DESCRIPTION("PCI driver module for ATI IXP IDE");
--- 1.9/drivers/ide/pci/cmd640.c 2004-02-01 19:06:55 +01:00
+++ edited/drivers/ide/pci/cmd640.c 2004-06-16 15:44:17 +02:00
@@ -276,7 +276,7 @@
spin_unlock_irqrestore(&ide_lock, flags);
}
-static int __init match_pci_cmd640_device (void)
+static int __devinit match_pci_cmd640_device (void)
{
const u8 ven_dev[4] = {0x95, 0x10, 0x40, 0x06};
unsigned int i;
@@ -296,7 +296,7 @@
/*
* Probe for CMD640x -- pci method 1
*/
-static int __init probe_for_cmd640_pci1 (void)
+static int __devinit probe_for_cmd640_pci1 (void)
{
__get_cmd640_reg = get_cmd640_reg_pci1;
__put_cmd640_reg = put_cmd640_reg_pci1;
@@ -312,7 +312,7 @@
/*
* Probe for CMD640x -- pci method 2
*/
-static int __init probe_for_cmd640_pci2 (void)
+static int __devinit probe_for_cmd640_pci2 (void)
{
__get_cmd640_reg = get_cmd640_reg_pci2;
__put_cmd640_reg = put_cmd640_reg_pci2;
@@ -326,7 +326,7 @@
/*
* Probe for CMD640x -- vlb
*/
-static int __init probe_for_cmd640_vlb (void)
+static int __devinit probe_for_cmd640_vlb (void)
{
u8 b;
@@ -347,7 +347,7 @@
* Returns 1 if an IDE interface/drive exists at 0x170,
* Returns 0 otherwise.
*/
-static int __init secondary_port_responding (void)
+static int __devinit secondary_port_responding (void)
{
unsigned long flags;
@@ -390,7 +390,7 @@
* Check whether prefetch is on for a drive,
* and initialize the unmask flags for safe operation.
*/
-static void __init check_prefetch (unsigned int index)
+static void __devinit check_prefetch (unsigned int index)
{
ide_drive_t *drive = cmd_drives[index];
u8 b = get_cmd640_reg(prefetch_regs[index]);
@@ -411,7 +411,7 @@
/*
* Figure out which devices we control
*/
-static void __init setup_device_ptrs (void)
+static void __devinit setup_device_ptrs (void)
{
unsigned int i;
@@ -493,7 +493,7 @@
/*
* This routine retrieves the initial drive timings from the chipset.
*/
-static void __init retrieve_drive_counts (unsigned int index)
+static void __devinit retrieve_drive_counts (unsigned int index)
{
u8 b;
@@ -714,7 +714,7 @@
/*
* Probe for a cmd640 chipset, and initialize it if found. Called from ide.c
*/
-int __init ide_probe_for_cmd640x (void)
+int __devinit ide_probe_for_cmd640x (void)
{
#ifdef CONFIG_BLK_DEV_CMD640_ENHANCED
int second_port_toggled = 0;
--- 1.23/drivers/ide/pci/cmd64x.c 2004-06-16 05:17:44 +02:00
+++ edited/drivers/ide/pci/cmd64x.c 2004-06-16 15:49:12 +02:00
@@ -746,6 +746,8 @@
static int __devinit cmd64x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{
+ if (!try_module_get(THIS_MODULE))
+ return -ENODEV;
ide_setup_pci_device(dev, &cmd64x_chipsets[id->driver_data]);
return 0;
}
@@ -770,7 +772,13 @@
return ide_pci_register_driver(&driver);
}
+static void __exit cmd64x_ide_exit(void)
+{
+ ide_pci_unregister_driver(&driver);
+}
+
module_init(cmd64x_ide_init);
+module_exit(cmd64x_ide_exit);
MODULE_AUTHOR("Eddie Dost, David Miller, Andre Hedrick");
MODULE_DESCRIPTION("PCI driver module for CMD64x IDE");
--- 1.11/drivers/ide/pci/cs5520.c 2004-06-15 18:29:40 +02:00
+++ edited/drivers/ide/pci/cs5520.c 2004-06-16 15:44:17 +02:00
@@ -289,6 +289,10 @@
printk(KERN_WARNING "%s: Unable to enable 55x0.\n", d->name);
return 1;
}
+
+ if (!try_module_get(THIS_MODULE))
+ return -ENODEV;
+
pci_set_master(dev);
pci_set_dma_mask(dev, 0xFFFFFFFF);
init_chipset_cs5520(dev, d->name);
@@ -329,7 +333,13 @@
return ide_pci_register_driver(&driver);
}
+static void __exit cs5520_ide_exit(void)
+{
+ return ide_pci_unregister_driver(&driver);
+}
+
module_init(cs5520_ide_init);
+module_exit(cs5520_ide_exit);
MODULE_AUTHOR("Alan Cox");
MODULE_DESCRIPTION("PCI driver module for Cyrix 5510/5520 IDE");
--- 1.22/drivers/ide/pci/cs5530.c 2004-06-15 18:29:40 +02:00
+++ edited/drivers/ide/pci/cs5530.c 2004-06-16 15:49:00 +02:00
@@ -267,7 +267,7 @@
* Initialize the cs5530 bridge for reliable IDE DMA operation.
*/
-static unsigned int __init init_chipset_cs5530 (struct pci_dev *dev, const char *name)
+static unsigned int __devinit init_chipset_cs5530 (struct pci_dev *dev, const char *name)
{
struct pci_dev *master_0 = NULL, *cs5530_0 = NULL;
unsigned long flags;
@@ -366,7 +366,7 @@
* performs channel-specific pre-initialization before drive probing.
*/
-static void __init init_hwif_cs5530 (ide_hwif_t *hwif)
+static void __devinit init_hwif_cs5530 (ide_hwif_t *hwif)
{
unsigned long basereg;
u32 d0_timings;
@@ -416,6 +416,8 @@
static int __devinit cs5530_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{
+ if (!try_module_get(THIS_MODULE))
+ return -ENODEV;
ide_setup_pci_device(dev, &cs5530_chipset);
return 0;
}
@@ -437,7 +439,13 @@
return ide_pci_register_driver(&driver);
}
+static void __exit cs5530_ide_exit(void)
+{
+ ide_pci_unregister_driver(&driver);
+}
+
module_init(cs5530_ide_init);
+module_exit(cs5530_ide_exit);
MODULE_AUTHOR("Mark Lord");
MODULE_DESCRIPTION("PCI driver module for Cyrix/NS 5530 IDE");
--- 1.17/drivers/ide/pci/cy82c693.c 2004-03-18 15:20:56 +01:00
+++ edited/drivers/ide/pci/cy82c693.c 2004-06-16 15:44:17 +02:00
@@ -334,7 +334,7 @@
/*
* this function is called during init and is used to setup the cy82c693 chip
*/
-static unsigned int __init init_chipset_cy82c693(struct pci_dev *dev, const char *name)
+static unsigned int __devinit init_chipset_cy82c693(struct pci_dev *dev, const char *name)
{
if (PCI_FUNC(dev->devfn) != 1)
return 0;
@@ -386,7 +386,7 @@
/*
* the init function - called for each ide channel once
*/
-static void __init init_hwif_cy82c693(ide_hwif_t *hwif)
+static void __devinit init_hwif_cy82c693(ide_hwif_t *hwif)
{
hwif->autodma = 0;
@@ -410,9 +410,9 @@
hwif->drives[1].autodma = hwif->autodma;
}
-static __initdata ide_hwif_t *primary;
+static __devinitdata ide_hwif_t *primary;
-void __init init_iops_cy82c693(ide_hwif_t *hwif)
+void __devinit init_iops_cy82c693(ide_hwif_t *hwif)
{
if (PCI_FUNC(hwif->pci_dev->devfn) == 1)
primary = hwif;
@@ -427,6 +427,9 @@
ide_pci_device_t *d = &cy82c693_chipsets[id->driver_data];
struct pci_dev *dev2;
+ if (!try_module_get(THIS_MODULE))
+ return -ENODEV;
+
/* CY82C693 is more than only a IDE controller.
Function 1 is primary IDE channel, function 2 - secondary. */
if ((dev->class >> 8) == PCI_CLASS_STORAGE_IDE &&
@@ -454,7 +457,13 @@
return ide_pci_register_driver(&driver);
}
+static void __exit cy82c693_ide_exit(void)
+{
+ ide_pci_unregister_driver(&driver);
+}
+
module_init(cy82c693_ide_init);
+module_exit(cy82c693_ide_exit);
MODULE_AUTHOR("Andreas Krebs, Andre Hedrick");
MODULE_DESCRIPTION("PCI driver module for the Cypress CY82C693 IDE");
--- 1.16/drivers/ide/pci/generic.c 2004-06-01 21:04:38 +02:00
+++ edited/drivers/ide/pci/generic.c 2004-06-16 15:44:17 +02:00
@@ -41,12 +41,12 @@
#include "generic.h"
-static unsigned int __init init_chipset_generic (struct pci_dev *dev, const char *name)
+static unsigned int __devinit init_chipset_generic (struct pci_dev *dev, const char *name)
{
return 0;
}
-static void __init init_hwif_generic (ide_hwif_t *hwif)
+static void __devinit init_hwif_generic (ide_hwif_t *hwif)
{
switch(hwif->pci_dev->device) {
case PCI_DEVICE_ID_UMC_UM8673F:
@@ -113,6 +113,8 @@
printk(KERN_INFO "Skipping disabled %s IDE controller.\n", d->name);
return 1;
}
+ if (!try_module_get(THIS_MODULE))
+ return -ENODEV;
ide_setup_pci_device(dev, d);
return 0;
}
@@ -146,7 +148,13 @@
return ide_pci_register_driver(&driver);
}
+static void __exit generic_ide_exit(void)
+{
+ ide_pci_unregister_driver(&driver);
+}
+
module_init(generic_ide_init);
+module_exit(generic_ide_exit);
MODULE_AUTHOR("Andre Hedrick");
MODULE_DESCRIPTION("PCI driver module for generic PCI IDE");
--- 1.23/drivers/ide/pci/hpt34x.c 2004-06-16 05:17:44 +02:00
+++ edited/drivers/ide/pci/hpt34x.c 2004-06-16 15:44:17 +02:00
@@ -323,6 +323,9 @@
static char *chipset_names[] = {"HPT343", "HPT345"};
u16 pcicmd = 0;
+ if (!try_module_get(THIS_MODULE))
+ return -ENODEV;
+
pci_read_config_word(dev, PCI_COMMAND, &pcicmd);
d->name = chipset_names[(pcicmd & PCI_COMMAND_MEMORY) ? 1 : 0];
@@ -349,7 +352,13 @@
return ide_pci_register_driver(&driver);
}
+static void __exit hpt34x_ide_exit(void)
+{
+ ide_pci_unregister_driver(&driver);
+}
+
module_init(hpt34x_ide_init);
+module_exit(hpt34x_ide_exit);
MODULE_AUTHOR("Andre Hedrick");
MODULE_DESCRIPTION("PCI driver module for Highpoint 34x IDE");
--- 1.34/drivers/ide/pci/hpt366.c 2004-06-16 05:17:44 +02:00
+++ edited/drivers/ide/pci/hpt366.c 2004-06-16 15:44:17 +02:00
@@ -1241,6 +1241,8 @@
{
ide_pci_device_t *d = &hpt366_chipsets[id->driver_data];
+ if (!try_module_get(THIS_MODULE))
+ return -ENODEV;
d->init_setup(dev, d);
return 0;
}
@@ -1266,7 +1268,13 @@
return ide_pci_register_driver(&driver);
}
+static void __exit hpt366_ide_exit(void)
+{
+ ide_pci_unregister_driver(&driver);
+}
+
module_init(hpt366_ide_init);
+module_exit(hpt366_ide_exit);
MODULE_AUTHOR("Andre Hedrick");
MODULE_DESCRIPTION("PCI driver module for Highpoint HPT366 IDE");
--- 1.18/drivers/ide/pci/it8172.c 2004-06-01 21:04:38 +02:00
+++ edited/drivers/ide/pci/it8172.c 2004-06-16 15:48:50 +02:00
@@ -238,7 +238,7 @@
return 0;
}
-static unsigned int __init init_chipset_it8172 (struct pci_dev *dev, const char *name)
+static unsigned int __devinit init_chipset_it8172 (struct pci_dev *dev, const char *name)
{
unsigned char progif;
@@ -252,7 +252,7 @@
}
-static void __init init_hwif_it8172 (ide_hwif_t *hwif)
+static void __devinit init_hwif_it8172 (ide_hwif_t *hwif)
{
struct pci_dev* dev = hwif->pci_dev;
unsigned long cmdBase, ctrlBase;
@@ -291,6 +291,8 @@
if ((!(PCI_FUNC(dev->devfn) & 1) ||
(!((dev->class >> 8) == PCI_CLASS_STORAGE_IDE))))
return 1; /* IT8172 is more than only a IDE controller */
+ if (!try_module_get(THIS_MODULE))
+ return -ENODEV;
ide_setup_pci_device(dev, &it8172_chipsets[id->driver_data]);
return 0;
}
@@ -312,7 +314,13 @@
return ide_pci_register_driver(&driver);
}
+static void __exit it8172_ide_exit(void)
+{
+ ide_pci_unregister_driver(&driver);
+}
+
module_init(it8172_ide_init);
+module_exit(it8172_ide_exit);
MODULE_AUTHOR("SteveL@mvista.com");
MODULE_DESCRIPTION("PCI driver module for ITE 8172 IDE");
--- 1.19/drivers/ide/pci/ns87415.c 2004-06-15 18:29:40 +02:00
+++ edited/drivers/ide/pci/ns87415.c 2004-06-16 15:48:42 +02:00
@@ -130,7 +130,7 @@
return __ide_dma_check(drive);
}
-static void __init init_hwif_ns87415 (ide_hwif_t *hwif)
+static void __devinit init_hwif_ns87415 (ide_hwif_t *hwif)
{
struct pci_dev *dev = hwif->pci_dev;
unsigned int ctrl, using_inta;
@@ -225,6 +225,8 @@
static int __devinit ns87415_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{
+ if (!try_module_get(THIS_MODULE))
+ return -ENODEV;
ide_setup_pci_device(dev, &ns87415_chipset);
return 0;
}
@@ -246,7 +248,13 @@
return ide_pci_register_driver(&driver);
}
+static void __exit ns87415_ide_exit(void)
+{
+ ide_pci_unregister_driver(&driver);
+}
+
module_init(ns87415_ide_init);
+module_exit(ns87415_ide_exit);
MODULE_AUTHOR("Mark Lord, Eddie Dost, Andre Hedrick");
MODULE_DESCRIPTION("PCI driver module for NS87415 IDE");
--- 1.18/drivers/ide/pci/opti621.c 2004-06-01 21:04:38 +02:00
+++ edited/drivers/ide/pci/opti621.c 2004-06-16 15:48:02 +02:00
@@ -328,7 +328,7 @@
/*
* init_hwif_opti621() is called once for each hwif found at boot.
*/
-static void __init init_hwif_opti621 (ide_hwif_t *hwif)
+static void __devinit init_hwif_opti621 (ide_hwif_t *hwif)
{
hwif->autodma = 0;
hwif->drives[0].drive_data = PIO_DONT_KNOW;
@@ -348,13 +348,15 @@
hwif->drives[1].autodma = hwif->autodma;
}
-static void __init init_setup_opti621 (struct pci_dev *dev, ide_pci_device_t *d)
+static void __devinit init_setup_opti621 (struct pci_dev *dev, ide_pci_device_t *d)
{
ide_setup_pci_device(dev, d);
}
static int __devinit opti621_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{
+ if (!try_module_get(THIS_MODULE))
+ return -ENODEV;
ide_setup_pci_device(dev, &opti621_chipsets[id->driver_data]);
return 0;
}
@@ -377,7 +379,13 @@
return ide_pci_register_driver(&driver);
}
+static void __exit opti621_ide_exit(void)
+{
+ ide_pci_unregister_driver(&driver);
+}
+
module_init(opti621_ide_init);
+module_exit(opti621_ide_exit);
MODULE_AUTHOR("Jaromir Koutek, Jan Harkes, Mark Lord");
MODULE_DESCRIPTION("PCI driver module for Opti621 IDE");
--- 1.30/drivers/ide/pci/pdc202xx_new.c 2004-06-16 05:17:44 +02:00
+++ edited/drivers/ide/pci/pdc202xx_new.c 2004-06-16 15:44:17 +02:00
@@ -514,6 +514,8 @@
{
ide_pci_device_t *d = &pdcnew_chipsets[id->driver_data];
+ if (!try_module_get(THIS_MODULE))
+ return -ENODEV;
d->init_setup(dev, d);
return 0;
}
@@ -541,7 +543,13 @@
return ide_pci_register_driver(&driver);
}
+static void __exit pdc202new_ide_exit(void)
+{
+ ide_pci_unregister_driver(&driver);
+}
+
module_init(pdc202new_ide_init);
+module_exit(pdc202new_ide_exit);
MODULE_AUTHOR("Andre Hedrick, Frank Tiernan");
MODULE_DESCRIPTION("PCI driver module for Promise PDC20268 and higher");
--- 1.32/drivers/ide/pci/pdc202xx_old.c 2004-06-16 05:17:44 +02:00
+++ edited/drivers/ide/pci/pdc202xx_old.c 2004-06-16 15:44:17 +02:00
@@ -884,6 +884,8 @@
{
ide_pci_device_t *d = &pdc202xx_chipsets[id->driver_data];
+ if (!try_module_get(THIS_MODULE))
+ return -ENODEV;
d->init_setup(dev, d);
return 0;
}
@@ -909,7 +911,13 @@
return ide_pci_register_driver(&driver);
}
+static void __exit pdc202xx_ide_exit(void)
+{
+ ide_pci_unregister_driver(&driver);
+}
+
module_init(pdc202xx_ide_init);
+module_exit(pdc202xx_ide_exit);
MODULE_AUTHOR("Andre Hedrick, Frank Tiernan");
MODULE_DESCRIPTION("PCI driver module for older Promise IDE");
--- 1.32/drivers/ide/pci/piix.c 2004-06-15 18:29:18 +02:00
+++ edited/drivers/ide/pci/piix.c 2004-06-16 15:44:17 +02:00
@@ -739,6 +739,8 @@
{
ide_pci_device_t *d = &piix_pci_info[id->driver_data];
+ if (!try_module_get(THIS_MODULE))
+ return -ENODEV;
d->init_setup(dev, d);
return 0;
}
@@ -814,7 +816,13 @@
return ide_pci_register_driver(&driver);
}
+static void __exit piix_ide_exit(void)
+{
+ ide_pci_unregister_driver(&driver);
+}
+
module_init(piix_ide_init);
+module_exit(piix_ide_exit);
MODULE_AUTHOR("Andre Hedrick, Andrzej Krzysztofowicz");
MODULE_DESCRIPTION("PCI driver module for Intel PIIX IDE");
--- 1.15/drivers/ide/pci/rz1000.c 2004-06-15 18:29:40 +02:00
+++ edited/drivers/ide/pci/rz1000.c 2004-06-16 15:47:44 +02:00
@@ -33,7 +33,7 @@
#include <asm/io.h>
-static void __init init_hwif_rz1000 (ide_hwif_t *hwif)
+static void __devinit init_hwif_rz1000 (ide_hwif_t *hwif)
{
u16 reg;
struct pci_dev *dev = hwif->pci_dev;
@@ -62,6 +62,8 @@
static int __devinit rz1000_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{
+ if (!try_module_get(THIS_MODULE))
+ return -ENODEV;
ide_setup_pci_device(dev, &rz1000_chipset);
return 0;
}
@@ -84,7 +86,13 @@
return ide_pci_register_driver(&driver);
}
+static void __exit rz1000_ide_exit(void)
+{
+ ide_pci_unregister_driver(&driver);
+}
+
module_init(rz1000_ide_init);
+module_exit(rz1000_ide_exit);
MODULE_AUTHOR("Andre Hedrick");
MODULE_DESCRIPTION("PCI driver module for RZ1000 IDE");
--- 1.19/drivers/ide/pci/sc1200.c 2004-06-15 18:29:40 +02:00
+++ edited/drivers/ide/pci/sc1200.c 2004-06-16 15:47:38 +02:00
@@ -507,7 +507,7 @@
/*
* Initialize the sc1200 bridge for reliable IDE DMA operation.
*/
-static unsigned int __init init_chipset_sc1200 (struct pci_dev *dev, const char *name)
+static unsigned int __devinit init_chipset_sc1200 (struct pci_dev *dev, const char *name)
{
#if defined(DISPLAY_SC1200_TIMINGS) && defined(CONFIG_PROC_FS)
if (!bmide_dev) {
@@ -523,7 +523,7 @@
* This gets invoked by the IDE driver once for each channel,
* and performs channel-specific pre-initialization before drive probing.
*/
-static void __init init_hwif_sc1200 (ide_hwif_t *hwif)
+static void __devinit init_hwif_sc1200 (ide_hwif_t *hwif)
{
if (hwif->mate)
hwif->serialized = hwif->mate->serialized = 1;
@@ -554,6 +554,8 @@
static int __devinit sc1200_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{
+ if (!try_module_get(THIS_MODULE))
+ return -ENODEV;
ide_setup_pci_device(dev, &sc1200_chipset);
return 0;
}
@@ -577,7 +579,13 @@
return ide_pci_register_driver(&driver);
}
+static void __exit sc1200_ide_exit(void)
+{
+ ide_pci_unregister_driver(&driver);
+}
+
module_init(sc1200_ide_init);
+module_exit(sc1200_ide_exit);
MODULE_AUTHOR("Mark Lord");
MODULE_DESCRIPTION("PCI driver module for NS SC1200 IDE");
--- 1.29/drivers/ide/pci/serverworks.c 2004-06-01 21:04:38 +02:00
+++ edited/drivers/ide/pci/serverworks.c 2004-06-16 15:44:17 +02:00
@@ -510,7 +510,7 @@
return __ide_dma_end(drive);
}
-static unsigned int __init init_chipset_svwks (struct pci_dev *dev, const char *name)
+static unsigned int __devinit init_chipset_svwks (struct pci_dev *dev, const char *name)
{
unsigned int reg;
u8 btr;
@@ -630,7 +630,7 @@
return (dev->irq) ? dev->irq : 0;
}
-static unsigned int __init ata66_svwks_svwks (ide_hwif_t *hwif)
+static unsigned int __devinit ata66_svwks_svwks (ide_hwif_t *hwif)
{
return 1;
}
@@ -642,7 +642,7 @@
* Bit 14 clear = primary IDE channel does not have 80-pin cable.
* Bit 14 set = primary IDE channel has 80-pin cable.
*/
-static unsigned int __init ata66_svwks_dell (ide_hwif_t *hwif)
+static unsigned int __devinit ata66_svwks_dell (ide_hwif_t *hwif)
{
struct pci_dev *dev = hwif->pci_dev;
if (dev->subsystem_vendor == PCI_VENDOR_ID_DELL &&
@@ -660,7 +660,7 @@
*
* WARNING: this only works on Alpine hardware!
*/
-static unsigned int __init ata66_svwks_cobalt (ide_hwif_t *hwif)
+static unsigned int __devinit ata66_svwks_cobalt (ide_hwif_t *hwif)
{
struct pci_dev *dev = hwif->pci_dev;
if (dev->subsystem_vendor == PCI_VENDOR_ID_SUN &&
@@ -671,7 +671,7 @@
return 0;
}
-static unsigned int __init ata66_svwks (ide_hwif_t *hwif)
+static unsigned int __devinit ata66_svwks (ide_hwif_t *hwif)
{
struct pci_dev *dev = hwif->pci_dev;
@@ -696,7 +696,7 @@
}
#undef CAN_SW_DMA
-static void __init init_hwif_svwks (ide_hwif_t *hwif)
+static void __devinit init_hwif_svwks (ide_hwif_t *hwif)
{
u8 dma_stat = 0;
@@ -744,7 +744,7 @@
/*
* We allow the BM-DMA driver to only work on enabled interfaces.
*/
-static void __init init_dma_svwks (ide_hwif_t *hwif, unsigned long dmabase)
+static void __devinit init_dma_svwks (ide_hwif_t *hwif, unsigned long dmabase)
{
struct pci_dev *dev = hwif->pci_dev;
@@ -756,12 +756,12 @@
ide_setup_dma(hwif, dmabase, 8);
}
-static void __init init_setup_svwks (struct pci_dev *dev, ide_pci_device_t *d)
+static void __devinit init_setup_svwks (struct pci_dev *dev, ide_pci_device_t *d)
{
ide_setup_pci_device(dev, d);
}
-static void __init init_setup_csb6 (struct pci_dev *dev, ide_pci_device_t *d)
+static void __devinit init_setup_csb6 (struct pci_dev *dev, ide_pci_device_t *d)
{
if (!(PCI_FUNC(dev->devfn) & 1)) {
d->bootable = NEVER_BOARD;
@@ -798,6 +798,8 @@
{
ide_pci_device_t *d = &serverworks_chipsets[id->driver_data];
+ if (!try_module_get(THIS_MODULE))
+ return -ENODEV;
d->init_setup(dev, d);
return 0;
}
@@ -826,7 +828,13 @@
return ide_pci_register_driver(&driver);
}
+static void __exit svwks_ide_exit(void)
+{
+ ide_pci_unregister_driver(&driver);
+}
+
module_init(svwks_ide_init);
+module_exit(svwks_ide_exit);
MODULE_AUTHOR("Michael Aubry. Andrzej Krzysztofowicz, Andre Hedrick");
MODULE_DESCRIPTION("PCI driver module for Serverworks OSB4/CSB5/CSB6 IDE");
--- 1.9/drivers/ide/pci/sgiioc4.c 2004-06-01 21:04:38 +02:00
+++ edited/drivers/ide/pci/sgiioc4.c 2004-06-16 15:49:46 +02:00
@@ -382,7 +382,7 @@
}
/* Creates a dma map for the scatter-gather list entries */
-static void __init
+static void __devinit
ide_dma_sgiioc4(ide_hwif_t * hwif, unsigned long dma_base)
{
int num_ports = sizeof (ioc4_dma_regs_t);
@@ -608,7 +608,7 @@
return 0;
}
-static void __init
+static void __devinit
ide_init_sgiioc4(ide_hwif_t * hwif)
{
hwif->mmio = 2;
@@ -646,7 +646,7 @@
hwif->INB = &sgiioc4_INB;
}
-static int __init
+static int __devinit
sgiioc4_ide_setup_pci_device(struct pci_dev *dev, ide_pci_device_t * d)
{
unsigned long base, ctl, dma_base, irqport;
@@ -716,7 +716,7 @@
*pci_dev, pciio_endian_t device_end,
pciio_endian_t desired_end);
-static unsigned int __init
+static unsigned int __devinit
pci_init_sgiioc4(struct pci_dev *dev, ide_pci_device_t * d)
{
unsigned int class_rev;
@@ -751,6 +751,9 @@
return -ENODEV;
}
+ if (!try_module_get(THIS_MODULE))
+ return -ENODEV;
+
return sgiioc4_ide_setup_pci_device(dev, d);
}
@@ -793,7 +796,14 @@
return ide_pci_register_driver(&driver);
}
+static void
+sgiioc4_ide_exit(void)
+{
+ ide_pci_unregister_driver(&driver);
+}
+
module_init(sgiioc4_ide_init);
+module_exit(sgiioc4_ide_exit);
MODULE_AUTHOR("Aniket Malatpure - Silicon Graphics Inc. (SGI)");
MODULE_DESCRIPTION("PCI driver module for SGI IOC4 Base-IO Card");
--- 1.30/drivers/ide/pci/siimage.c 2004-06-15 18:29:40 +02:00
+++ edited/drivers/ide/pci/siimage.c 2004-06-16 15:47:24 +02:00
@@ -1121,6 +1121,8 @@
static int __devinit siimage_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{
+ if (!try_module_get(THIS_MODULE))
+ return -ENODEV;
ide_setup_pci_device(dev, &siimage_chipsets[id->driver_data]);
return 0;
}
@@ -1144,7 +1146,13 @@
return ide_pci_register_driver(&driver);
}
+static void __exit siimage_ide_exit(void)
+{
+ ide_pci_unregister_driver(&driver);
+}
+
module_init(siimage_ide_init);
+module_exit(siimage_ide_exit);
MODULE_AUTHOR("Andre Hedrick, Alan Cox");
MODULE_DESCRIPTION("PCI driver module for SiI IDE");
--- 1.27/drivers/ide/pci/sis5513.c 2004-06-15 18:29:40 +02:00
+++ edited/drivers/ide/pci/sis5513.c 2004-06-16 15:47:18 +02:00
@@ -746,7 +746,7 @@
*/
/* Chip detection and general config */
-static unsigned int __init init_chipset_sis5513 (struct pci_dev *dev, const char *name)
+static unsigned int __devinit init_chipset_sis5513 (struct pci_dev *dev, const char *name)
{
struct pci_dev *host;
int i = 0;
@@ -890,7 +890,7 @@
return 0;
}
-static unsigned int __init ata66_sis5513 (ide_hwif_t *hwif)
+static unsigned int __devinit ata66_sis5513 (ide_hwif_t *hwif)
{
u8 ata66 = 0;
@@ -908,7 +908,7 @@
return ata66;
}
-static void __init init_hwif_sis5513 (ide_hwif_t *hwif)
+static void __devinit init_hwif_sis5513 (ide_hwif_t *hwif)
{
hwif->autodma = 0;
@@ -957,6 +957,8 @@
static int __devinit sis5513_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{
+ if (!try_module_get(THIS_MODULE))
+ return -ENODEV;
ide_setup_pci_device(dev, &sis5513_chipset);
return 0;
}
@@ -978,7 +980,13 @@
return ide_pci_register_driver(&driver);
}
+static void __exit sis5513_ide_exit(void)
+{
+ ide_pci_unregister_driver(&driver);
+}
+
module_init(sis5513_ide_init);
+module_exit(sis5513_ide_exit);
MODULE_AUTHOR("Lionel Bouton, L C Chang, Andre Hedrick, Vojtech Pavlik");
MODULE_DESCRIPTION("PCI driver module for SIS IDE");
--- 1.20/drivers/ide/pci/sl82c105.c 2004-06-15 18:29:40 +02:00
+++ edited/drivers/ide/pci/sl82c105.c 2004-06-16 15:47:12 +02:00
@@ -388,7 +388,7 @@
* channel 0 here at least, but channel 1 has to be enabled by
* firmware or arch code. We still set both to 16 bits mode.
*/
-static unsigned int __init init_chipset_sl82c105(struct pci_dev *dev, const char *msg)
+static unsigned int __devinit init_chipset_sl82c105(struct pci_dev *dev, const char *msg)
{
u32 val;
@@ -401,7 +401,7 @@
return dev->irq;
}
-static void __init init_dma_sl82c105(ide_hwif_t *hwif, unsigned long dma_base)
+static void __devinit init_dma_sl82c105(ide_hwif_t *hwif, unsigned long dma_base)
{
unsigned int rev;
u8 dma_state;
@@ -433,7 +433,7 @@
* Initialise the chip
*/
-static void __init init_hwif_sl82c105(ide_hwif_t *hwif)
+static void __devinit init_hwif_sl82c105(ide_hwif_t *hwif)
{
struct pci_dev *dev = hwif->pci_dev;
u32 val;
@@ -492,6 +492,8 @@
static int __devinit sl82c105_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{
+ if (!try_module_get(THIS_MODULE))
+ return -ENODEV;
ide_setup_pci_device(dev, &sl82c105_chipset);
return 0;
}
@@ -513,7 +515,13 @@
return ide_pci_register_driver(&driver);
}
+static void __exit sl82c105_ide_exit(void)
+{
+ ide_pci_unregister_driver(&driver);
+}
+
module_init(sl82c105_ide_init);
+module_exit(sl82c105_ide_exit);
MODULE_DESCRIPTION("PCI driver module for W82C105 IDE");
MODULE_LICENSE("GPL");
--- 1.22/drivers/ide/pci/slc90e66.c 2004-06-15 18:29:40 +02:00
+++ edited/drivers/ide/pci/slc90e66.c 2004-06-16 15:47:02 +02:00
@@ -313,7 +313,7 @@
}
#endif /* CONFIG_BLK_DEV_IDEDMA */
-static unsigned int __init init_chipset_slc90e66 (struct pci_dev *dev, const char *name)
+static unsigned int __devinit init_chipset_slc90e66 (struct pci_dev *dev, const char *name)
{
#if defined(DISPLAY_SLC90E66_TIMINGS) && defined(CONFIG_PROC_FS)
if (!slc90e66_proc) {
@@ -325,7 +325,7 @@
return 0;
}
-static void __init init_hwif_slc90e66 (ide_hwif_t *hwif)
+static void __devinit init_hwif_slc90e66 (ide_hwif_t *hwif)
{
u8 reg47 = 0;
u8 mask = hwif->channel ? 0x01 : 0x02; /* bit0:Primary */
@@ -376,6 +376,8 @@
static int __devinit slc90e66_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{
+ if (!try_module_get(THIS_MODULE))
+ return -ENODEV;
ide_setup_pci_device(dev, &slc90e66_chipset);
return 0;
}
@@ -397,7 +399,13 @@
return ide_pci_register_driver(&driver);
}
+static void __exit slc90e66_ide_exit(void)
+{
+ ide_pci_unregister_driver(&driver);
+}
+
module_init(slc90e66_ide_init);
+module_exit(slc90e66_ide_exit);
MODULE_AUTHOR("Andre Hedrick");
MODULE_DESCRIPTION("PCI driver module for SLC90E66 IDE");
--- 1.9/drivers/ide/pci/triflex.c 2004-06-15 18:29:40 +02:00
+++ edited/drivers/ide/pci/triflex.c 2004-06-16 15:46:54 +02:00
@@ -190,7 +190,7 @@
return hwif->ide_dma_on(drive);
}
-static void __init init_hwif_triflex(ide_hwif_t *hwif)
+static void __devinit init_hwif_triflex(ide_hwif_t *hwif)
{
hwif->tuneproc = &triflex_tune_drive;
hwif->speedproc = &triflex_tune_chipset;
@@ -206,7 +206,7 @@
hwif->drives[1].autodma = hwif->autodma;
}
-static unsigned int __init init_chipset_triflex(struct pci_dev *dev,
+static unsigned int __devinit init_chipset_triflex(struct pci_dev *dev,
const char *name)
{
#ifdef CONFIG_PROC_FS
@@ -228,6 +228,8 @@
static int __devinit triflex_init_one(struct pci_dev *dev,
const struct pci_device_id *id)
{
+ if (!try_module_get(THIS_MODULE))
+ return -ENODEV;
ide_setup_pci_device(dev, &triflex_device);
triflex_dev = dev;
@@ -252,7 +254,13 @@
return ide_pci_register_driver(&driver);
}
+static void __exit triflex_ide_exit(void)
+{
+ ide_pci_unregister_driver(&driver);
+}
+
module_init(triflex_ide_init);
+module_exit(triflex_ide_exit);
MODULE_AUTHOR("Torben Mathiasen");
MODULE_DESCRIPTION("PCI driver module for Compaq Triflex IDE");
--- 1.21/drivers/ide/pci/trm290.c 2004-06-15 18:29:40 +02:00
+++ edited/drivers/ide/pci/trm290.c 2004-06-16 15:46:45 +02:00
@@ -403,6 +403,8 @@
static int __devinit trm290_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{
+ if (!try_module_get(THIS_MODULE))
+ return -ENODEV;
ide_setup_pci_device(dev, &trm290_chipset);
return 0;
}
@@ -424,7 +426,13 @@
return ide_pci_register_driver(&driver);
}
+static void __exit trm290_ide_exit(void)
+{
+ ide_pci_unregister_driver(&driver);
+}
+
module_init(trm290_ide_init);
+module_exit(trm290_ide_exit);
MODULE_AUTHOR("Mark Lord");
MODULE_DESCRIPTION("PCI driver module for Tekram TRM290 IDE");
--- 1.23/drivers/ide/pci/via82cxxx.c 2004-06-15 18:29:40 +02:00
+++ edited/drivers/ide/pci/via82cxxx.c 2004-06-16 15:46:29 +02:00
@@ -414,7 +414,7 @@
* and initialize its drive independent registers.
*/
-static unsigned int __init init_chipset_via82cxxx(struct pci_dev *dev, const char *name)
+static unsigned int __devinit init_chipset_via82cxxx(struct pci_dev *dev, const char *name)
{
struct pci_dev *isa = NULL;
u8 t, v;
@@ -575,7 +575,7 @@
return 0;
}
-static void __init init_hwif_via82cxxx(ide_hwif_t *hwif)
+static void __devinit init_hwif_via82cxxx(ide_hwif_t *hwif)
{
int i;
@@ -621,6 +621,8 @@
static int __devinit via_init_one(struct pci_dev *dev, const struct pci_device_id *id)
{
ide_setup_pci_device(dev, &via82cxxx_chipset);
+ if (!try_module_get(THIS_MODULE))
+ return -ENODEV;
return 0;
}
@@ -642,7 +644,13 @@
return ide_pci_register_driver(&driver);
}
+static void __exit via_ide_exit(void)
+{
+ ide_pci_unregister_driver(&driver);
+}
+
module_init(via_ide_init);
+module_exit(via_ide_exit);
MODULE_AUTHOR("Vojtech Pavlik, Michel Aubry, Jeff Garzik, Andre Hedrick");
MODULE_DESCRIPTION("PCI driver module for VIA IDE");
--- 1.124/include/linux/ide.h 2004-06-05 21:58:33 +02:00
+++ edited/include/linux/ide.h 2004-06-16 15:44:18 +02:00
@@ -1224,6 +1224,7 @@
extern ide_hwif_t ide_hwifs[]; /* master data repository */
#endif
extern int noautodma;
+extern int ide_scan_direction;
extern int ide_end_request (ide_drive_t *drive, int uptodate, int nrsecs);
@@ -1524,7 +1525,7 @@
extern int ideprobe_init(void);
-extern void ide_scan_pcibus(int scan_direction) __init;
+extern void ide_scan_pcibus(void);
extern int ide_pci_register_driver(struct pci_driver *driver);
extern void ide_pci_unregister_driver(struct pci_driver *driver);
extern void ide_pci_setup_ports(struct pci_dev *dev, struct ide_pci_device_s *d, int autodma, int pciirq, ata_index_t *index);
Reply to:
- References:
- 2.6.7
- From: Jens Schmalzing <j.s@lmu.de>
- Re: 2.6.7
- From: Christoph Hellwig <hch@lst.de>
- Re: 2.6.7
- From: Jens Schmalzing <j.s@lmu.de>