Commit a97bdbb8 authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds

[PATCH] remove unused crap from ide

parent d42ea696
...@@ -1893,78 +1893,6 @@ static int idedisk_init (void) ...@@ -1893,78 +1893,6 @@ static int idedisk_init (void)
return 0; return 0;
} }
ide_startstop_t panic_box(ide_drive_t *drive)
{
#if 0
panic("%s: Attempted to corrupt something: ide operation "
#else
printk(KERN_ERR "%s: Attempted to corrupt something: ide operation "
#endif
"was pending accross suspend/resume.\n", drive->name);
return ide_stopped;
}
int ide_disks_busy(void)
{
int i;
for (i=0; i<MAX_HWIFS; i++) {
struct hwgroup_s *hwgroup = ide_hwifs[i].hwgroup;
if (!hwgroup) continue;
if ((hwgroup->handler) && (hwgroup->handler != panic_box))
return 1;
}
return 0;
}
void ide_disk_suspend(void)
{
int i;
while (ide_disks_busy()) {
printk("*");
schedule();
}
for (i=0; i<MAX_HWIFS; i++) {
struct hwgroup_s *hwgroup = ide_hwifs[i].hwgroup;
if (!hwgroup) continue;
hwgroup->handler_save = hwgroup->handler;
hwgroup->handler = panic_box;
}
driver_blocked = 1;
if (ide_disks_busy())
panic("How did you get that request through?!");
}
/* unsuspend and resume should be equal in the ideal world */
void ide_disk_unsuspend(void)
{
int i;
for (i=0; i<MAX_HWIFS; i++) {
struct hwgroup_s *hwgroup = ide_hwifs[i].hwgroup;
if (!hwgroup) continue;
hwgroup->handler = NULL; /* hwgroup->handler_save; */
hwgroup->handler_save = NULL;
}
driver_blocked = 0;
}
void ide_disk_resume(void)
{
int i;
for (i=0; i<MAX_HWIFS; i++) {
struct hwgroup_s *hwgroup = ide_hwifs[i].hwgroup;
if (!hwgroup) continue;
if (hwgroup->handler != panic_box)
panic("Handler was not set to panic?");
hwgroup->handler_save = NULL;
hwgroup->handler = NULL;
}
driver_blocked = 0;
}
module_init(idedisk_init); module_init(idedisk_init);
module_exit(idedisk_exit); module_exit(idedisk_exit);
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
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