aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-probe.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-01-26 14:13:08 -0500
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-01-26 14:13:08 -0500
commit81ca691981da718727281238b435dcf1528d2fda (patch)
tree4c4845a77d94fe91bd7d1345bf9d992852b8d572 /drivers/ide/ide-probe.c
parent4f52a32994f9e05fb8ae1a9ba3f20cd0b55145b7 (diff)
ide: add ide_set_irq() inline helper
There should be no functionality changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-probe.c')
-rw-r--r--drivers/ide/ide-probe.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index 18e9b82e132c..9d9f1c6d602a 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -350,22 +350,19 @@ static int try_to_identify (ide_drive_t *drive, u8 cmd)
350 * the irq handler isn't expecting. 350 * the irq handler isn't expecting.
351 */ 351 */
352 if (IDE_CONTROL_REG) { 352 if (IDE_CONTROL_REG) {
353 u8 ctl = drive->ctl | 2;
354 if (!hwif->irq) { 353 if (!hwif->irq) {
355 autoprobe = 1; 354 autoprobe = 1;
356 cookie = probe_irq_on(); 355 cookie = probe_irq_on();
357 /* enable device irq */
358 ctl &= ~2;
359 } 356 }
360 hwif->OUTB(ctl, IDE_CONTROL_REG); 357 ide_set_irq(drive, autoprobe);
361 } 358 }
362 359
363 retval = actual_try_to_identify(drive, cmd); 360 retval = actual_try_to_identify(drive, cmd);
364 361
365 if (autoprobe) { 362 if (autoprobe) {
366 int irq; 363 int irq;
367 /* mask device irq */ 364
368 hwif->OUTB(drive->ctl|2, IDE_CONTROL_REG); 365 ide_set_irq(drive, 0);
369 /* clear drive IRQ */ 366 /* clear drive IRQ */
370 (void) hwif->INB(IDE_STATUS_REG); 367 (void) hwif->INB(IDE_STATUS_REG);
371 udelay(5); 368 udelay(5);
@@ -653,8 +650,7 @@ static int wait_hwif_ready(ide_hwif_t *hwif)
653 /* Ignore disks that we will not probe for later. */ 650 /* Ignore disks that we will not probe for later. */
654 if (!drive->noprobe || drive->present) { 651 if (!drive->noprobe || drive->present) {
655 SELECT_DRIVE(drive); 652 SELECT_DRIVE(drive);
656 if (IDE_CONTROL_REG) 653 ide_set_irq(drive, 1);
657 hwif->OUTB(drive->ctl, IDE_CONTROL_REG);
658 mdelay(2); 654 mdelay(2);
659 rc = ide_wait_not_busy(hwif, 35000); 655 rc = ide_wait_not_busy(hwif, 35000);
660 if (rc) 656 if (rc)