Skip to contentSkip to conversation

Kill dead code in ide

PATCH Pavel Machek 1 participant 1 message Oct 10, 2002

lore
Share & tools
lore
#0 lore raw

Hi!

Old swsusp code somehow creeped into 2.5.X IDE. It is not used by anything. Here's patch to kill it (we have better replacement in there ;-).

Please apply,
Pavel

drivers/ide/ide-disk.c +0 -72
@@ -1795,78 +1795,6 @@
 	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_exit(idedisk_exit);
 MODULE_LICENSE("GPL");
Signature · 2 lines
Worst form of spam? Adding advertisment signatures ala sourceforge.net.
What goes next? Inserting advertisment *into* email?