linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Kill dead code in ide
@ 2002-10-10  8:22 Pavel Machek
  0 siblings, 0 replies; only message in thread
From: Pavel Machek @ 2002-10-10  8:22 UTC (permalink / raw)
  To: alan, kernel list

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

--- clean/drivers/ide/ide-disk.c	2002-10-08 21:25:24.000000000 +0200
+++ linux-swsusp/drivers/ide/ide-disk.c	2002-10-08 12:12:39.000000000 +0200
@@ -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");

-- 
Worst form of spam? Adding advertisment signatures ala sourceforge.net.
What goes next? Inserting advertisment *into* email?

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-10-10  8:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-10  8:22 Kill dead code in ide Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).