Commit b596fd12 authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz Committed by Linus Torvalds

[PATCH] prevent module unloading for legacy IDE chipset drivers

It is unsafe thing to do (no locking, no reference counting etc).
Just remove module_exit() as it was done for IDE PCI drivers.
parent 9d8bbc62
......@@ -243,25 +243,7 @@ int __init ali14xx_init(void)
}
#ifdef MODULE
static void __exit ali14xx_release_hwif(ide_hwif_t *hwif)
{
if (hwif->chipset != ide_ali14xx)
return;
hwif->chipset = ide_unknown;
hwif->tuneproc = NULL;
hwif->mate = NULL;
hwif->channel = 0;
}
static void __exit ali14xx_exit(void)
{
ali14xx_release_hwif(&ide_hwifs[0]);
ali14xx_release_hwif(&ide_hwifs[1]);
}
module_init(ali14xx_init);
module_exit(ali14xx_exit);
#endif
MODULE_AUTHOR("see local file");
......
......@@ -155,27 +155,7 @@ int __init dtc2278_init(void)
}
#ifdef MODULE
static void __exit dtc2278_release_hwif(ide_hwif_t *hwif)
{
if (hwif->chipset != ide_dtc2278)
return;
hwif->serialized = 0;
hwif->chipset = ide_unknown;
hwif->tuneproc = NULL;
hwif->drives[0].no_unmask = 0;
hwif->drives[1].no_unmask = 0;
hwif->mate = NULL;
}
static void __exit dtc2278_exit(void)
{
dtc2278_release_hwif(&ide_hwifs[0]);
dtc2278_release_hwif(&ide_hwifs[1]);
}
module_init(dtc2278_init);
module_exit(dtc2278_exit);
#endif
MODULE_AUTHOR("See Local File");
......
......@@ -360,31 +360,7 @@ int __init ht6560b_init(void)
}
#ifdef MODULE
static void __exit ht6560b_release_hwif(ide_hwif_t *hwif)
{
if (hwif->chipset != ide_ht6560b)
return;
hwif->chipset = ide_unknown;
hwif->tuneproc = NULL;
hwif->selectproc = NULL;
hwif->serialized = 0;
hwif->mate = NULL;
hwif->channel = 0;
hwif->drives[0].drive_data = 0;
hwif->drives[1].drive_data = 0;
}
static void __exit ht6560b_exit(void)
{
ht6560b_release_hwif(&ide_hwifs[0]);
ht6560b_release_hwif(&ide_hwifs[1]);
release_region(HT_CONFIG_PORT, 1);
}
module_init(ht6560b_init);
module_exit(ht6560b_exit);
#endif
MODULE_AUTHOR("See Local File");
......
......@@ -311,29 +311,7 @@ int __init pdc4030_init(void)
}
#ifdef MODULE
static void __exit pdc4030_release_hwif(ide_hwif_t *hwif)
{
hwif->chipset = ide_unknown;
hwif->selectproc = NULL;
hwif->serialized = 0;
hwif->drives[0].io_32bit = 0;
hwif->drives[1].io_32bit = 0;
hwif->drives[0].keep_settings = 0;
hwif->drives[1].keep_settings = 0;
hwif->drives[0].noprobe = 0;
hwif->drives[1].noprobe = 0;
}
static void __exit pdc4030_exit(void)
{
unsigned int index;
for (index = 0; index < MAX_HWIFS; index++)
pdc4030_release_hwif(&ide_hwifs[index]);
}
module_init(pdc4030_init);
module_exit(pdc4030_exit);
#endif
MODULE_AUTHOR("Peter Denison");
......
......@@ -354,12 +354,12 @@ static void __init qd_setup(ide_hwif_t *hwif, int base, int config,
probe_hwif_init(hwif);
}
#ifdef MODULE
/*
* qd_unsetup:
*
* called to unsetup an ata channel : back to default values, unlinks tuning
*/
/*
static void __exit qd_unsetup(ide_hwif_t *hwif)
{
u8 config = hwif->config_data;
......@@ -389,7 +389,7 @@ static void __exit qd_unsetup(ide_hwif_t *hwif)
printk(KERN_WARNING "keeping settings !\n");
}
}
#endif
*/
/*
* qd_probe:
......@@ -496,14 +496,7 @@ int __init qd65xx_init(void)
}
#ifdef MODULE
static void __exit qd65xx_exit(void)
{
qd_unsetup(&ide_hwifs[0]);
qd_unsetup(&ide_hwifs[1]);
}
module_init(qd65xx_init);
module_exit(qd65xx_exit);
#endif
MODULE_AUTHOR("Samuel Thibault");
......
......@@ -173,33 +173,7 @@ int __init umc8672_init(void)
}
#ifdef MODULE
static void __exit umc8672_release_hwif(ide_hwif_t *hwif)
{
if (hwif->chipset != ide_umc8672)
return;
hwif->chipset = ide_unknown;
hwif->tuneproc = NULL;
hwif->mate = NULL;
hwif->channel = 0;
}
static void __exit umc8672_exit(void)
{
unsigned long flags;
umc8672_release_hwif(&ide_hwifs[0]);
umc8672_release_hwif(&ide_hwifs[1]);
local_irq_save(flags);
outb_p(0xa5, 0x108); /* disable umc */
local_irq_restore(flags);
release_region(0x108, 2);
}
module_init(umc8672_init);
module_exit(umc8672_exit);
#endif
MODULE_AUTHOR("Wolfram Podien");
......
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