aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-io.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-12-29 14:27:29 -0500
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-12-29 14:27:29 -0500
commit3e0e29f7373ec96a1bd972790649524af7353f42 (patch)
tree322c10f8c3c8bc9a67b3d79601df827c5901f6b0 /drivers/ide/ide-io.c
parent0e63a588fc3d6a5e6bb66bacaeb11cd9093141f8 (diff)
ide: unify ide_intr()'s exit points
Just a preparation for future changes. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-io.c')
-rw-r--r--drivers/ide/ide-io.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c
index cc35d6dbd410..35b625882803 100644
--- a/drivers/ide/ide-io.c
+++ b/drivers/ide/ide-io.c
@@ -1363,14 +1363,13 @@ irqreturn_t ide_intr (int irq, void *dev_id)
1363 ide_drive_t *drive; 1363 ide_drive_t *drive;
1364 ide_handler_t *handler; 1364 ide_handler_t *handler;
1365 ide_startstop_t startstop; 1365 ide_startstop_t startstop;
1366 irqreturn_t irq_ret = IRQ_NONE;
1366 1367
1367 spin_lock_irqsave(&ide_lock, flags); 1368 spin_lock_irqsave(&ide_lock, flags);
1368 hwif = hwgroup->hwif; 1369 hwif = hwgroup->hwif;
1369 1370
1370 if (!ide_ack_intr(hwif)) { 1371 if (!ide_ack_intr(hwif))
1371 spin_unlock_irqrestore(&ide_lock, flags); 1372 goto out;
1372 return IRQ_NONE;
1373 }
1374 1373
1375 if ((handler = hwgroup->handler) == NULL || hwgroup->polling) { 1374 if ((handler = hwgroup->handler) == NULL || hwgroup->polling) {
1376 /* 1375 /*
@@ -1406,9 +1405,9 @@ irqreturn_t ide_intr (int irq, void *dev_id)
1406 (void)hwif->tp_ops->read_status(hwif); 1405 (void)hwif->tp_ops->read_status(hwif);
1407#endif /* CONFIG_BLK_DEV_IDEPCI */ 1406#endif /* CONFIG_BLK_DEV_IDEPCI */
1408 } 1407 }
1409 spin_unlock_irqrestore(&ide_lock, flags); 1408 goto out;
1410 return IRQ_NONE;
1411 } 1409 }
1410
1412 drive = hwgroup->drive; 1411 drive = hwgroup->drive;
1413 if (!drive) { 1412 if (!drive) {
1414 /* 1413 /*
@@ -1417,10 +1416,10 @@ irqreturn_t ide_intr (int irq, void *dev_id)
1417 * 1416 *
1418 * [Note - this can occur if the drive is hot unplugged] 1417 * [Note - this can occur if the drive is hot unplugged]
1419 */ 1418 */
1420 spin_unlock_irqrestore(&ide_lock, flags); 1419 goto out_handled;
1421 return IRQ_HANDLED;
1422 } 1420 }
1423 if (!drive_is_ready(drive)) { 1421
1422 if (!drive_is_ready(drive))
1424 /* 1423 /*
1425 * This happens regularly when we share a PCI IRQ with 1424 * This happens regularly when we share a PCI IRQ with
1426 * another device. Unfortunately, it can also happen 1425 * another device. Unfortunately, it can also happen
@@ -1428,9 +1427,8 @@ irqreturn_t ide_intr (int irq, void *dev_id)
1428 * their status register is up to date. Hopefully we have 1427 * their status register is up to date. Hopefully we have
1429 * enough advance overhead that the latter isn't a problem. 1428 * enough advance overhead that the latter isn't a problem.
1430 */ 1429 */
1431 spin_unlock_irqrestore(&ide_lock, flags); 1430 goto out;
1432 return IRQ_NONE; 1431
1433 }
1434 if (!hwgroup->busy) { 1432 if (!hwgroup->busy) {
1435 hwgroup->busy = 1; /* paranoia */ 1433 hwgroup->busy = 1; /* paranoia */
1436 printk(KERN_ERR "%s: ide_intr: hwgroup->busy was 0 ??\n", drive->name); 1434 printk(KERN_ERR "%s: ide_intr: hwgroup->busy was 0 ??\n", drive->name);
@@ -1467,8 +1465,11 @@ irqreturn_t ide_intr (int irq, void *dev_id)
1467 "on exit\n", drive->name); 1465 "on exit\n", drive->name);
1468 } 1466 }
1469 } 1467 }
1468out_handled:
1469 irq_ret = IRQ_HANDLED;
1470out:
1470 spin_unlock_irqrestore(&ide_lock, flags); 1471 spin_unlock_irqrestore(&ide_lock, flags);
1471 return IRQ_HANDLED; 1472 return irq_ret;
1472} 1473}
1473 1474
1474/** 1475/**