prevent swsusp from eating disks

Pavel Machek (pavel@ucw.cz)
Wed, 30 Oct 2002 00:14:02 +0100


Hi!

Patrick broke IDE so it wanted to eat data, again. Fixed, please
apply,
Pavel

--- clean/drivers/ide/ide-disk.c 2002-10-18 23:41:15.000000000 +0200
+++ linux-swsusp/drivers/ide/ide-disk.c 2002-10-21 14:36:36.000000000 +0200
@@ -1891,8 +1891,10 @@

static int idedisk_init (void)
{
- ide_register_driver(&idedisk_driver);
- return 0;
+ int status = ide_register_driver(&idedisk_driver);
+ idedisk_driver.gen_driver.suspend = idedisk_suspend;
+ idedisk_driver.gen_driver.resume = idedisk_resume;
+ return status;
}

module_init(idedisk_init);
--- clean/drivers/ide/ide-probe.c 2002-10-20 16:22:39.000000000 +0200
+++ linux-swsusp/drivers/ide/ide-probe.c 2002-10-21 14:45:41.000000000 +0200
@@ -1059,6 +1059,7 @@
"%s","IDE Drive");
drive->gendev.parent = &hwif->gendev;
drive->gendev.bus = &ide_bus_type;
+ drive->gendev.driver_data = drive;
if (drive->present)
device_register(&drive->gendev);
}

-- 
Worst form of spam? Adding advertisment signatures ala sourceforge.net.
What goes next? Inserting advertisment *into* email?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/