diff options
Diffstat (limited to 'drivers/ide/ide.c')
-rw-r--r-- | drivers/ide/ide.c | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c index 59fe358048b..9c8468de1a7 100644 --- a/drivers/ide/ide.c +++ b/drivers/ide/ide.c | |||
@@ -130,7 +130,6 @@ | |||
130 | 130 | ||
131 | #define _IDE_C /* Tell ide.h it's really us */ | 131 | #define _IDE_C /* Tell ide.h it's really us */ |
132 | 132 | ||
133 | #include <linux/config.h> | ||
134 | #include <linux/module.h> | 133 | #include <linux/module.h> |
135 | #include <linux/types.h> | 134 | #include <linux/types.h> |
136 | #include <linux/string.h> | 135 | #include <linux/string.h> |
@@ -147,7 +146,6 @@ | |||
147 | #include <linux/pci.h> | 146 | #include <linux/pci.h> |
148 | #include <linux/delay.h> | 147 | #include <linux/delay.h> |
149 | #include <linux/ide.h> | 148 | #include <linux/ide.h> |
150 | #include <linux/devfs_fs_kernel.h> | ||
151 | #include <linux/completion.h> | 149 | #include <linux/completion.h> |
152 | #include <linux/reboot.h> | 150 | #include <linux/reboot.h> |
153 | #include <linux/cdrom.h> | 151 | #include <linux/cdrom.h> |
@@ -592,13 +590,8 @@ void ide_unregister(unsigned int index) | |||
592 | goto abort; | 590 | goto abort; |
593 | for (unit = 0; unit < MAX_DRIVES; ++unit) { | 591 | for (unit = 0; unit < MAX_DRIVES; ++unit) { |
594 | drive = &hwif->drives[unit]; | 592 | drive = &hwif->drives[unit]; |
595 | if (!drive->present) { | 593 | if (!drive->present) |
596 | if (drive->devfs_name[0] != '\0') { | ||
597 | devfs_remove(drive->devfs_name); | ||
598 | drive->devfs_name[0] = '\0'; | ||
599 | } | ||
600 | continue; | 594 | continue; |
601 | } | ||
602 | spin_unlock_irq(&ide_lock); | 595 | spin_unlock_irq(&ide_lock); |
603 | device_unregister(&drive->gendev); | 596 | device_unregister(&drive->gendev); |
604 | wait_for_completion(&drive->gendev_rel_comp); | 597 | wait_for_completion(&drive->gendev_rel_comp); |
@@ -1214,7 +1207,7 @@ int system_bus_clock (void) | |||
1214 | 1207 | ||
1215 | EXPORT_SYMBOL(system_bus_clock); | 1208 | EXPORT_SYMBOL(system_bus_clock); |
1216 | 1209 | ||
1217 | static int generic_ide_suspend(struct device *dev, pm_message_t state) | 1210 | static int generic_ide_suspend(struct device *dev, pm_message_t mesg) |
1218 | { | 1211 | { |
1219 | ide_drive_t *drive = dev->driver_data; | 1212 | ide_drive_t *drive = dev->driver_data; |
1220 | struct request rq; | 1213 | struct request rq; |
@@ -1228,7 +1221,9 @@ static int generic_ide_suspend(struct device *dev, pm_message_t state) | |||
1228 | rq.special = &args; | 1221 | rq.special = &args; |
1229 | rq.end_io_data = &rqpm; | 1222 | rq.end_io_data = &rqpm; |
1230 | rqpm.pm_step = ide_pm_state_start_suspend; | 1223 | rqpm.pm_step = ide_pm_state_start_suspend; |
1231 | rqpm.pm_state = state.event; | 1224 | if (mesg.event == PM_EVENT_PRETHAW) |
1225 | mesg.event = PM_EVENT_FREEZE; | ||
1226 | rqpm.pm_state = mesg.event; | ||
1232 | 1227 | ||
1233 | return ide_do_drive_cmd(drive, &rq, ide_wait); | 1228 | return ide_do_drive_cmd(drive, &rq, ide_wait); |
1234 | } | 1229 | } |
@@ -1546,7 +1541,7 @@ static int __init ide_setup(char *s) | |||
1546 | const char *hd_words[] = { | 1541 | const char *hd_words[] = { |
1547 | "none", "noprobe", "nowerr", "cdrom", "serialize", | 1542 | "none", "noprobe", "nowerr", "cdrom", "serialize", |
1548 | "autotune", "noautotune", "minus8", "swapdata", "bswap", | 1543 | "autotune", "noautotune", "minus8", "swapdata", "bswap", |
1549 | "minus11", "remap", "remap63", "scsi", NULL }; | 1544 | "noflush", "remap", "remap63", "scsi", NULL }; |
1550 | unit = s[2] - 'a'; | 1545 | unit = s[2] - 'a'; |
1551 | hw = unit / MAX_DRIVES; | 1546 | hw = unit / MAX_DRIVES; |
1552 | unit = unit % MAX_DRIVES; | 1547 | unit = unit % MAX_DRIVES; |
@@ -1585,6 +1580,9 @@ static int __init ide_setup(char *s) | |||
1585 | case -10: /* "bswap" */ | 1580 | case -10: /* "bswap" */ |
1586 | drive->bswap = 1; | 1581 | drive->bswap = 1; |
1587 | goto done; | 1582 | goto done; |
1583 | case -11: /* noflush */ | ||
1584 | drive->noflush = 1; | ||
1585 | goto done; | ||
1588 | case -12: /* "remap" */ | 1586 | case -12: /* "remap" */ |
1589 | drive->remap_0_to_1 = 1; | 1587 | drive->remap_0_to_1 = 1; |
1590 | goto done; | 1588 | goto done; |
@@ -1996,7 +1994,6 @@ EXPORT_SYMBOL_GPL(ide_bus_type); | |||
1996 | static int __init ide_init(void) | 1994 | static int __init ide_init(void) |
1997 | { | 1995 | { |
1998 | printk(KERN_INFO "Uniform Multi-Platform E-IDE driver " REVISION "\n"); | 1996 | printk(KERN_INFO "Uniform Multi-Platform E-IDE driver " REVISION "\n"); |
1999 | devfs_mk_dir("ide"); | ||
2000 | system_bus_speed = ide_system_bus_speed(); | 1997 | system_bus_speed = ide_system_bus_speed(); |
2001 | 1998 | ||
2002 | bus_register(&ide_bus_type); | 1999 | bus_register(&ide_bus_type); |
@@ -2074,7 +2071,6 @@ void cleanup_module (void) | |||
2074 | #ifdef CONFIG_PROC_FS | 2071 | #ifdef CONFIG_PROC_FS |
2075 | proc_ide_destroy(); | 2072 | proc_ide_destroy(); |
2076 | #endif | 2073 | #endif |
2077 | devfs_remove("ide"); | ||
2078 | 2074 | ||
2079 | bus_unregister(&ide_bus_type); | 2075 | bus_unregister(&ide_bus_type); |
2080 | } | 2076 | } |