diff options
| author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-03-24 18:22:53 -0400 |
|---|---|---|
| committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-03-24 18:22:53 -0400 |
| commit | a182807a89946bd531122bb2da60fa9ceee90343 (patch) | |
| tree | 11fa649fcb8c1b344970e1183c918ba918144361 | |
| parent | f77e03c68f11f54509cd660ddb5a0badfdfc61cb (diff) | |
ide: remove try_to_identify() wrapper
There should be no functional changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| -rw-r--r-- | drivers/ide/ide-probe.c | 34 |
1 files changed, 9 insertions, 25 deletions
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index c63c07807583..5e0c3fb3b43a 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c | |||
| @@ -250,7 +250,7 @@ err_misc: | |||
| 250 | } | 250 | } |
| 251 | 251 | ||
| 252 | /** | 252 | /** |
| 253 | * actual_try_to_identify - send ata/atapi identify | 253 | * try_to_identify - send ATA/ATAPI identify |
| 254 | * @drive: drive to identify | 254 | * @drive: drive to identify |
| 255 | * @cmd: command to use | 255 | * @cmd: command to use |
| 256 | * | 256 | * |
| @@ -262,7 +262,7 @@ err_misc: | |||
| 262 | * 2 device aborted the command (refused to identify itself) | 262 | * 2 device aborted the command (refused to identify itself) |
| 263 | */ | 263 | */ |
| 264 | 264 | ||
| 265 | static int actual_try_to_identify (ide_drive_t *drive, u8 cmd) | 265 | static int try_to_identify(ide_drive_t *drive, u8 cmd) |
| 266 | { | 266 | { |
| 267 | ide_hwif_t *hwif = drive->hwif; | 267 | ide_hwif_t *hwif = drive->hwif; |
| 268 | struct ide_io_ports *io_ports = &hwif->io_ports; | 268 | struct ide_io_ports *io_ports = &hwif->io_ports; |
| @@ -271,6 +271,13 @@ static int actual_try_to_identify (ide_drive_t *drive, u8 cmd) | |||
| 271 | unsigned long timeout; | 271 | unsigned long timeout; |
| 272 | u8 s = 0, a = 0; | 272 | u8 s = 0, a = 0; |
| 273 | 273 | ||
| 274 | /* | ||
| 275 | * Disable device IRQ. Otherwise we'll get spurious interrupts | ||
| 276 | * during the identify phase that the IRQ handler isn't expecting. | ||
| 277 | */ | ||
| 278 | if (io_ports->ctl_addr) | ||
| 279 | tp_ops->set_irq(hwif, 0); | ||
| 280 | |||
| 274 | /* take a deep breath */ | 281 | /* take a deep breath */ |
| 275 | msleep(50); | 282 | msleep(50); |
| 276 | 283 | ||
| @@ -327,29 +334,6 @@ static int actual_try_to_identify (ide_drive_t *drive, u8 cmd) | |||
| 327 | return rc; | 334 | return rc; |
| 328 | } | 335 | } |
| 329 | 336 | ||
| 330 | /** | ||
| 331 | * try_to_identify - try to identify a drive | ||
| 332 | * @drive: drive to probe | ||
| 333 | * @cmd: command to use | ||
| 334 | * | ||
| 335 | * Issue the identify command. | ||
| 336 | */ | ||
| 337 | |||
| 338 | static int try_to_identify (ide_drive_t *drive, u8 cmd) | ||
| 339 | { | ||
| 340 | ide_hwif_t *hwif = drive->hwif; | ||
| 341 | const struct ide_tp_ops *tp_ops = hwif->tp_ops; | ||
| 342 | |||
| 343 | /* | ||
| 344 | * Disable device IRQ. Otherwise we'll get spurious interrupts | ||
| 345 | * during the identify phase that the IRQ handler isn't expecting. | ||
| 346 | */ | ||
| 347 | if (hwif->io_ports.ctl_addr) | ||
| 348 | tp_ops->set_irq(hwif, 0); | ||
| 349 | |||
| 350 | return actual_try_to_identify(drive, cmd); | ||
| 351 | } | ||
| 352 | |||
| 353 | int ide_busy_sleep(ide_hwif_t *hwif, unsigned long timeout, int altstatus) | 337 | int ide_busy_sleep(ide_hwif_t *hwif, unsigned long timeout, int altstatus) |
| 354 | { | 338 | { |
| 355 | u8 stat; | 339 | u8 stat; |
