aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-disk.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/ide-disk.c')
-rw-r--r--drivers/ide/ide-disk.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c
index cab362ea0336..245b508208df 100644
--- a/drivers/ide/ide-disk.c
+++ b/drivers/ide/ide-disk.c
@@ -997,9 +997,8 @@ static void ide_cacheflush_p(ide_drive_t *drive)
997 printk(KERN_INFO "%s: wcache flush failed!\n", drive->name); 997 printk(KERN_INFO "%s: wcache flush failed!\n", drive->name);
998} 998}
999 999
1000static int ide_disk_remove(struct device *dev) 1000static void ide_disk_remove(ide_drive_t *drive)
1001{ 1001{
1002 ide_drive_t *drive = to_ide_device(dev);
1003 struct ide_disk_obj *idkp = drive->driver_data; 1002 struct ide_disk_obj *idkp = drive->driver_data;
1004 struct gendisk *g = idkp->disk; 1003 struct gendisk *g = idkp->disk;
1005 1004
@@ -1010,8 +1009,6 @@ static int ide_disk_remove(struct device *dev)
1010 ide_cacheflush_p(drive); 1009 ide_cacheflush_p(drive);
1011 1010
1012 ide_disk_put(idkp); 1011 ide_disk_put(idkp);
1013
1014 return 0;
1015} 1012}
1016 1013
1017static void ide_disk_release(struct kref *kref) 1014static void ide_disk_release(struct kref *kref)
@@ -1027,12 +1024,10 @@ static void ide_disk_release(struct kref *kref)
1027 kfree(idkp); 1024 kfree(idkp);
1028} 1025}
1029 1026
1030static int ide_disk_probe(struct device *dev); 1027static int ide_disk_probe(ide_drive_t *drive);
1031 1028
1032static void ide_device_shutdown(struct device *dev) 1029static void ide_device_shutdown(ide_drive_t *drive)
1033{ 1030{
1034 ide_drive_t *drive = container_of(dev, ide_drive_t, gendev);
1035
1036#ifdef CONFIG_ALPHA 1031#ifdef CONFIG_ALPHA
1037 /* On Alpha, halt(8) doesn't actually turn the machine off, 1032 /* On Alpha, halt(8) doesn't actually turn the machine off,
1038 it puts you into the sort of firmware monitor. Typically, 1033 it puts you into the sort of firmware monitor. Typically,
@@ -1054,7 +1049,7 @@ static void ide_device_shutdown(struct device *dev)
1054 } 1049 }
1055 1050
1056 printk("Shutdown: %s\n", drive->name); 1051 printk("Shutdown: %s\n", drive->name);
1057 dev->bus->suspend(dev, PMSG_SUSPEND); 1052 drive->gendev.bus->suspend(&drive->gendev, PMSG_SUSPEND);
1058} 1053}
1059 1054
1060static ide_driver_t idedisk_driver = { 1055static ide_driver_t idedisk_driver = {
@@ -1062,10 +1057,10 @@ static ide_driver_t idedisk_driver = {
1062 .owner = THIS_MODULE, 1057 .owner = THIS_MODULE,
1063 .name = "ide-disk", 1058 .name = "ide-disk",
1064 .bus = &ide_bus_type, 1059 .bus = &ide_bus_type,
1065 .probe = ide_disk_probe,
1066 .remove = ide_disk_remove,
1067 .shutdown = ide_device_shutdown,
1068 }, 1060 },
1061 .probe = ide_disk_probe,
1062 .remove = ide_disk_remove,
1063 .shutdown = ide_device_shutdown,
1069 .version = IDEDISK_VERSION, 1064 .version = IDEDISK_VERSION,
1070 .media = ide_disk, 1065 .media = ide_disk,
1071 .supports_dsc_overlap = 0, 1066 .supports_dsc_overlap = 0,
@@ -1182,9 +1177,8 @@ static struct block_device_operations idedisk_ops = {
1182 1177
1183MODULE_DESCRIPTION("ATA DISK Driver"); 1178MODULE_DESCRIPTION("ATA DISK Driver");
1184 1179
1185static int ide_disk_probe(struct device *dev) 1180static int ide_disk_probe(ide_drive_t *drive)
1186{ 1181{
1187 ide_drive_t *drive = to_ide_device(dev);
1188 struct ide_disk_obj *idkp; 1182 struct ide_disk_obj *idkp;
1189 struct gendisk *g; 1183 struct gendisk *g;
1190 1184