Commit 812f98ac authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz Committed by Len Brown

[PATCH] remove MOD_INC_USE_COUNT from drivers/ide/

From: Christoph Hellwig <hch@lst.de>

Instead of using the old MOD_INC_USE_COUNT and getting warnings all the
time preventing module unload can be much easier achived by just not
implementing a module_exit handler.
parent fdfec545
......@@ -954,18 +954,10 @@ icside_probe(struct expansion_card *ec, const struct ecard_id *id)
break;
}
if (ret == 0) {
if (ret == 0)
ecard_set_drvdata(ec, state);
/*
* this locks the driver in-core - remove this
* comment and the line below when we can
* safely remove interfaces.
*/
MOD_INC_USE_COUNT;
} else {
else
kfree(state);
}
out:
return ret;
}
......@@ -1048,14 +1040,8 @@ static int __init icside_init(void)
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);
......@@ -33,14 +33,6 @@ rapide_probe(struct expansion_card *ec, const struct ecard_id *id)
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
MOD_INC_USE_COUNT;
return ret;
}
......@@ -68,13 +60,7 @@ static int __init rapide_init(void)
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);
......@@ -14,7 +14,6 @@
static int __init ide_generic_init(void)
{
MOD_INC_USE_COUNT;
if (ide_hwifs[0].io_ports[IDE_DATA_OFFSET])
ide_get_lock(NULL, NULL); /* for atari only */
......
......@@ -530,7 +530,6 @@ static int __devinit aec62xx_init_one(struct pci_dev *dev, const struct pci_devi
if (dev->device != d->device)
BUG();
d->init_setup(dev, d);
MOD_INC_USE_COUNT;
return 0;
}
......@@ -554,13 +553,7 @@ static int aec62xx_ide_init(void)
return ide_pci_register_driver(&driver);
}
static void 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");
......
......@@ -868,7 +868,6 @@ static int __devinit alim15x3_init_one(struct pci_dev *dev, const struct pci_dev
d->init_hwif = init_hwif_common_ali15x3;
#endif /* CONFIG_SPARC64 */
ide_setup_pci_device(dev, d);
MOD_INC_USE_COUNT;
return 0;
}
......@@ -889,13 +888,7 @@ static int ali15x3_ide_init(void)
return ide_pci_register_driver(&driver);
}
static void 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");
......
......@@ -448,7 +448,6 @@ static int __devinit amd74xx_probe(struct pci_dev *dev, const struct pci_device_
if (dev->device != amd_chipset->device) BUG();
if (dev->device != amd_config->id) BUG();
ide_setup_pci_device(dev, amd_chipset);
MOD_INC_USE_COUNT;
return 0;
}
......@@ -480,13 +479,7 @@ static int amd74xx_ide_init(void)
return ide_pci_register_driver(&driver);
}
static void 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");
......
......@@ -752,7 +752,6 @@ static int __devinit cmd64x_init_one(struct pci_dev *dev, const struct pci_devic
if (dev->device != d->device)
BUG();
ide_setup_pci_device(dev, d);
MOD_INC_USE_COUNT;
return 0;
}
......@@ -775,13 +774,7 @@ static int cmd64x_ide_init(void)
return ide_pci_register_driver(&driver);
}
static void 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");
......
......@@ -291,7 +291,6 @@ static int __devinit cs5520_init_one(struct pci_dev *dev, const struct pci_devic
probe_hwif_init(&ide_hwifs[index.b.low]);
if((index.b.high & 0xf0) != 0xf0)
probe_hwif_init(&ide_hwifs[index.b.high]);
MOD_INC_USE_COUNT;
return 0;
}
......@@ -312,13 +311,7 @@ static int cs5520_ide_init(void)
return ide_pci_register_driver(&driver);
}
static void 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");
......
......@@ -413,7 +413,6 @@ static int __devinit cs5530_init_one(struct pci_dev *dev, const struct pci_devic
if (dev->device != d->device)
BUG();
ide_setup_pci_device(dev, d);
MOD_INC_USE_COUNT;
return 0;
}
......@@ -433,13 +432,7 @@ static int cs5530_ide_init(void)
return ide_pci_register_driver(&driver);
}
static void 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");
......
......@@ -434,7 +434,6 @@ static int __devinit cy82c693_init_one(struct pci_dev *dev, const struct pci_dev
dev2 = pci_find_slot(dev->bus->number, dev->devfn + 1);
ide_setup_pci_devices(dev, dev2, d);
}
MOD_INC_USE_COUNT;
return 0;
}
......@@ -454,13 +453,7 @@ static int cy82c693_ide_init(void)
return ide_pci_register_driver(&driver);
}
static void 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");
......
......@@ -121,7 +121,6 @@ static int __devinit generic_init_one(struct pci_dev *dev, const struct pci_devi
return 1;
}
ide_setup_pci_device(dev, d);
MOD_INC_USE_COUNT;
return 0;
}
......@@ -150,13 +149,7 @@ static int generic_ide_init(void)
return ide_pci_register_driver(&driver);
}
static void 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");
......
......@@ -331,7 +331,6 @@ static int __devinit hpt34x_init_one(struct pci_dev *dev, const struct pci_devic
d->bootable = (pcicmd & PCI_COMMAND_MEMORY) ? OFF_BOARD : NEVER_BOARD;
ide_setup_pci_device(dev, d);
MOD_INC_USE_COUNT;
return 0;
}
......@@ -351,13 +350,7 @@ static int hpt34x_ide_init(void)
return ide_pci_register_driver(&driver);
}
static void 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");
......
......@@ -1220,7 +1220,6 @@ static int __devinit hpt366_init_one(struct pci_dev *dev, const struct pci_devic
if (dev->device != d->device)
BUG();
d->init_setup(dev, d);
MOD_INC_USE_COUNT;
return 0;
}
......@@ -1244,13 +1243,7 @@ static int hpt366_ide_init(void)
return ide_pci_register_driver(&driver);
}
static void 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");
......
......@@ -295,7 +295,6 @@ static int __devinit it8172_init_one(struct pci_dev *dev, const struct pci_devic
(!((dev->class >> 8) == PCI_CLASS_STORAGE_IDE))))
return 1; /* IT8172 is more than only a IDE controller */
ide_setup_pci_device(dev, d);
MOD_INC_USE_COUNT;
return 0;
}
......@@ -315,13 +314,7 @@ static int it8172_ide_init(void)
return ide_pci_register_driver(&driver);
}
static void 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");
......
......@@ -225,7 +225,6 @@ static int __devinit ns87415_init_one(struct pci_dev *dev, const struct pci_devi
if (dev->device != d->device)
BUG();
ide_setup_pci_device(dev, d);
MOD_INC_USE_COUNT;
return 0;
}
......@@ -245,13 +244,7 @@ static int ns87415_ide_init(void)
return ide_pci_register_driver(&driver);
}
static void 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");
......
......@@ -361,7 +361,6 @@ static int __devinit opti621_init_one(struct pci_dev *dev, const struct pci_devi
if (dev->device != d->device)
BUG();
ide_setup_pci_device(dev, d);
MOD_INC_USE_COUNT;
return 0;
}
......@@ -382,13 +381,7 @@ static int opti621_ide_init(void)
return ide_pci_register_driver(&driver);
}
static void 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");
......
......@@ -675,7 +675,6 @@ static int __devinit pdc202new_init_one(struct pci_dev *dev, const struct pci_de
if (dev->device != d->device)
BUG();
d->init_setup(dev, d);
MOD_INC_USE_COUNT;
return 0;
}
......@@ -701,13 +700,7 @@ static int pdc202new_ide_init(void)
return ide_pci_register_driver(&driver);
}
static void 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");
......
......@@ -913,7 +913,6 @@ static int __devinit pdc202xx_init_one(struct pci_dev *dev, const struct pci_dev
if (dev->device != d->device)
BUG();
d->init_setup(dev, d);
MOD_INC_USE_COUNT;
return 0;
}
......@@ -937,13 +936,7 @@ static int pdc202xx_ide_init(void)
return ide_pci_register_driver(&driver);
}
static void 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");
......
......@@ -743,7 +743,6 @@ static int __devinit piix_init_one(struct pci_dev *dev, const struct pci_device_
if (dev->device != d->device)
BUG();
d->init_setup(dev, d);
MOD_INC_USE_COUNT;
return 0;
}
......@@ -815,13 +814,7 @@ static int piix_ide_init(void)
return ide_pci_register_driver(&driver);
}
static void 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");
......
......@@ -62,7 +62,6 @@ static int __devinit rz1000_init_one(struct pci_dev *dev, const struct pci_devic
if (dev->device != d->device)
BUG();
ide_setup_pci_device(dev, d);
MOD_INC_USE_COUNT;
return 0;
}
......@@ -83,13 +82,7 @@ static int rz1000_ide_init(void)
return ide_pci_register_driver(&driver);
}
static void 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");
......
......@@ -554,7 +554,6 @@ static int __devinit sc1200_init_one(struct pci_dev *dev, const struct pci_devic
if (dev->device != d->device)
BUG();
ide_setup_pci_device(dev, d);
MOD_INC_USE_COUNT;
return 0;
}
......@@ -576,13 +575,7 @@ static int sc1200_ide_init(void)
return ide_pci_register_driver(&driver);
}
static void 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");
......
......@@ -801,7 +801,6 @@ static int __devinit svwks_init_one(struct pci_dev *dev, const struct pci_device
if (dev->device != d->device)
BUG();
d->init_setup(dev, d);
MOD_INC_USE_COUNT;
return 0;
}
......@@ -828,13 +827,7 @@ static int svwks_ide_init(void)
return ide_pci_register_driver(&driver);
}
static void 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");
......
......@@ -794,8 +794,6 @@ sgiioc4_init_one(struct pci_dev *dev, const struct pci_device_id *id)
if (pci_init_sgiioc4(dev, d))
return 0;
MOD_INC_USE_COUNT;
return 0;
}
......@@ -817,14 +815,7 @@ sgiioc4_ide_init(void)
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");
......
......@@ -1168,7 +1168,6 @@ static int __devinit siimage_init_one(struct pci_dev *dev, const struct pci_devi
if (dev->device != d->device)
BUG();
ide_setup_pci_device(dev, d);
MOD_INC_USE_COUNT;
return 0;
}
......@@ -1190,13 +1189,7 @@ static int siimage_ide_init(void)
return ide_pci_register_driver(&driver);
}
static void 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");
......
......@@ -953,7 +953,6 @@ static int __devinit sis5513_init_one(struct pci_dev *dev, const struct pci_devi
if (dev->device != d->device)
BUG();
ide_setup_pci_device(dev, d);
MOD_INC_USE_COUNT;
return 0;
}
......@@ -973,13 +972,7 @@ static int sis5513_ide_init(void)
return ide_pci_register_driver(&driver);
}
static void 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");
......
......@@ -506,7 +506,6 @@ static int __devinit sl82c105_init_one(struct pci_dev *dev, const struct pci_dev
if (dev->device != d->device)
BUG();
ide_setup_pci_device(dev, d);
MOD_INC_USE_COUNT;
return 0;
}
......@@ -526,13 +525,7 @@ static int sl82c105_ide_init(void)
return ide_pci_register_driver(&driver);
}
static void 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");
......@@ -373,7 +373,6 @@ static int __devinit slc90e66_init_one(struct pci_dev *dev, const struct pci_dev
if (dev->device != d->device)
BUG();
ide_setup_pci_device(dev, d);
MOD_INC_USE_COUNT;
return 0;
}
......@@ -393,13 +392,7 @@ static int slc90e66_ide_init(void)
return ide_pci_register_driver(&driver);
}
static void 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");
......
......@@ -226,7 +226,6 @@ static int __devinit triflex_init_one(struct pci_dev *dev,
ide_setup_pci_device(dev, d);
triflex_dev = dev;
MOD_INC_USE_COUNT;
return 0;
}
......@@ -242,13 +241,7 @@ static int triflex_ide_init(void)
return ide_pci_register_driver(&driver);
}
static void 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");
......
......@@ -403,7 +403,6 @@ static int __devinit trm290_init_one(struct pci_dev *dev, const struct pci_devic
if (dev->device != d->device)
BUG();
ide_setup_pci_device(dev, d);
MOD_INC_USE_COUNT;
return 0;
}
......@@ -423,13 +422,7 @@ static int trm290_ide_init(void)
return ide_pci_register_driver(&driver);
}
static void 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");
......
......@@ -615,7 +615,6 @@ static int __devinit via_init_one(struct pci_dev *dev, const struct pci_device_i
if (dev->device != d->device)
BUG();
ide_setup_pci_device(dev, d);
MOD_INC_USE_COUNT;
return 0;
}
......@@ -636,13 +635,7 @@ static int via_ide_init(void)
return ide_pci_register_driver(&driver);
}
static void 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");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment