diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-10-13 15:39:32 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-10-13 15:39:32 -0400 |
commit | aa5d2de7b080873f6d9ac3aede423c9713bf0caa (patch) | |
tree | babf0dbf6a7d7e545053736e5ae6976faddabfd7 /drivers/ide | |
parent | 85e39035ca381846b031690f4d1ac1f0660da0a2 (diff) |
ide: make ide_pc_intr() static
* Always use ide_pc_intr as a handler in ide_pc_intr().
* Remove no longer used ide*_pc_intr() and 'handler'
argument from ide_{transfer_pc,pc_intr}().
* Make ide_pc_intr() static.
There should be no functional changes caused by this patch.
Cc: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide')
-rw-r--r-- | drivers/ide/ide-atapi.c | 15 | ||||
-rw-r--r-- | drivers/ide/ide-floppy.c | 10 | ||||
-rw-r--r-- | drivers/ide/ide-tape.c | 18 |
3 files changed, 14 insertions, 29 deletions
diff --git a/drivers/ide/ide-atapi.c b/drivers/ide/ide-atapi.c index f46bc5124e00..b558663418d8 100644 --- a/drivers/ide/ide-atapi.c +++ b/drivers/ide/ide-atapi.c | |||
@@ -246,7 +246,12 @@ int ide_scsi_expiry(ide_drive_t *drive) | |||
246 | } | 246 | } |
247 | EXPORT_SYMBOL_GPL(ide_scsi_expiry); | 247 | EXPORT_SYMBOL_GPL(ide_scsi_expiry); |
248 | 248 | ||
249 | ide_startstop_t ide_pc_intr(ide_drive_t *drive, ide_handler_t *handler) | 249 | /* |
250 | * This is the usual interrupt handler which will be called during a packet | ||
251 | * command. We will transfer some of the data (as requested by the drive) | ||
252 | * and will re-point interrupt handler to us. | ||
253 | */ | ||
254 | static ide_startstop_t ide_pc_intr(ide_drive_t *drive) | ||
250 | { | 255 | { |
251 | struct ide_atapi_pc *pc = drive->pc; | 256 | struct ide_atapi_pc *pc = drive->pc; |
252 | ide_hwif_t *hwif = drive->hwif; | 257 | ide_hwif_t *hwif = drive->hwif; |
@@ -425,10 +430,9 @@ cmd_finished: | |||
425 | rq->cmd[0], bcount); | 430 | rq->cmd[0], bcount); |
426 | next_irq: | 431 | next_irq: |
427 | /* And set the interrupt handler again */ | 432 | /* And set the interrupt handler again */ |
428 | ide_set_handler(drive, handler, timeout, expiry); | 433 | ide_set_handler(drive, ide_pc_intr, timeout, expiry); |
429 | return ide_started; | 434 | return ide_started; |
430 | } | 435 | } |
431 | EXPORT_SYMBOL_GPL(ide_pc_intr); | ||
432 | 436 | ||
433 | static u8 ide_read_ireason(ide_drive_t *drive) | 437 | static u8 ide_read_ireason(ide_drive_t *drive) |
434 | { | 438 | { |
@@ -464,8 +468,7 @@ static u8 ide_wait_ireason(ide_drive_t *drive, u8 ireason) | |||
464 | return ireason; | 468 | return ireason; |
465 | } | 469 | } |
466 | 470 | ||
467 | ide_startstop_t ide_transfer_pc(ide_drive_t *drive, | 471 | ide_startstop_t ide_transfer_pc(ide_drive_t *drive, unsigned int timeout, |
468 | ide_handler_t *handler, unsigned int timeout, | ||
469 | ide_expiry_t *expiry) | 472 | ide_expiry_t *expiry) |
470 | { | 473 | { |
471 | struct ide_atapi_pc *pc = drive->pc; | 474 | struct ide_atapi_pc *pc = drive->pc; |
@@ -491,7 +494,7 @@ ide_startstop_t ide_transfer_pc(ide_drive_t *drive, | |||
491 | } | 494 | } |
492 | 495 | ||
493 | /* Set the interrupt routine */ | 496 | /* Set the interrupt routine */ |
494 | ide_set_handler(drive, handler, timeout, expiry); | 497 | ide_set_handler(drive, ide_pc_intr, timeout, expiry); |
495 | 498 | ||
496 | /* Begin DMA, if necessary */ | 499 | /* Begin DMA, if necessary */ |
497 | if (pc->flags & PC_FLAG_DMA_OK) { | 500 | if (pc->flags & PC_FLAG_DMA_OK) { |
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c index 378a22ca55c1..7be3cd5daa9d 100644 --- a/drivers/ide/ide-floppy.c +++ b/drivers/ide/ide-floppy.c | |||
@@ -193,12 +193,6 @@ static void ide_floppy_callback(ide_drive_t *drive, int dsc) | |||
193 | idefloppy_end_request(drive, uptodate, 0); | 193 | idefloppy_end_request(drive, uptodate, 0); |
194 | } | 194 | } |
195 | 195 | ||
196 | /* The usual interrupt handler called during a packet command. */ | ||
197 | static ide_startstop_t idefloppy_pc_intr(ide_drive_t *drive) | ||
198 | { | ||
199 | return ide_pc_intr(drive, idefloppy_pc_intr); | ||
200 | } | ||
201 | |||
202 | /* | 196 | /* |
203 | * What we have here is a classic case of a top half / bottom half interrupt | 197 | * What we have here is a classic case of a top half / bottom half interrupt |
204 | * service routine. In interrupt mode, the device sends an interrupt to signal | 198 | * service routine. In interrupt mode, the device sends an interrupt to signal |
@@ -230,7 +224,7 @@ static ide_startstop_t idefloppy_start_pc_transfer(ide_drive_t *drive) | |||
230 | * where the Busy flag was apparently being deasserted before the | 224 | * where the Busy flag was apparently being deasserted before the |
231 | * unit was ready to receive data. This was happening on a | 225 | * unit was ready to receive data. This was happening on a |
232 | * 1200 MHz Athlon system. 10/26/01 25msec is too short, | 226 | * 1200 MHz Athlon system. 10/26/01 25msec is too short, |
233 | * 40 and 50msec work well. idefloppy_pc_intr will not be actually | 227 | * 40 and 50msec work well. ide_pc_intr will not be actually |
234 | * used until after the packet is moved in about 50 msec. | 228 | * used until after the packet is moved in about 50 msec. |
235 | */ | 229 | */ |
236 | if (drive->atapi_flags & IDE_AFLAG_ZIP_DRIVE) { | 230 | if (drive->atapi_flags & IDE_AFLAG_ZIP_DRIVE) { |
@@ -241,7 +235,7 @@ static ide_startstop_t idefloppy_start_pc_transfer(ide_drive_t *drive) | |||
241 | expiry = NULL; | 235 | expiry = NULL; |
242 | } | 236 | } |
243 | 237 | ||
244 | return ide_transfer_pc(drive, idefloppy_pc_intr, timeout, expiry); | 238 | return ide_transfer_pc(drive, timeout, expiry); |
245 | } | 239 | } |
246 | 240 | ||
247 | static void ide_floppy_report_error(idefloppy_floppy_t *floppy, | 241 | static void ide_floppy_report_error(idefloppy_floppy_t *floppy, |
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c index 5c26e98e2e39..a148de623af0 100644 --- a/drivers/ide/ide-tape.c +++ b/drivers/ide/ide-tape.c | |||
@@ -619,18 +619,6 @@ static int ide_tape_io_buffers(ide_drive_t *drive, struct ide_atapi_pc *pc, | |||
619 | } | 619 | } |
620 | 620 | ||
621 | /* | 621 | /* |
622 | * This is the usual interrupt handler which will be called during a packet | ||
623 | * command. We will transfer some of the data (as requested by the drive) and | ||
624 | * will re-point interrupt handler to us. When data transfer is finished, we | ||
625 | * will act according to the algorithm described before | ||
626 | * idetape_issue_pc. | ||
627 | */ | ||
628 | static ide_startstop_t idetape_pc_intr(ide_drive_t *drive) | ||
629 | { | ||
630 | return ide_pc_intr(drive, idetape_pc_intr); | ||
631 | } | ||
632 | |||
633 | /* | ||
634 | * Packet Command Interface | 622 | * Packet Command Interface |
635 | * | 623 | * |
636 | * The current Packet Command is available in drive->pc, and will not change | 624 | * The current Packet Command is available in drive->pc, and will not change |
@@ -640,9 +628,9 @@ static ide_startstop_t idetape_pc_intr(ide_drive_t *drive) | |||
640 | * The handling will be done in three stages: | 628 | * The handling will be done in three stages: |
641 | * | 629 | * |
642 | * 1. idetape_issue_pc will send the packet command to the drive, and will set | 630 | * 1. idetape_issue_pc will send the packet command to the drive, and will set |
643 | * the interrupt handler to idetape_pc_intr. | 631 | * the interrupt handler to ide_pc_intr. |
644 | * | 632 | * |
645 | * 2. On each interrupt, idetape_pc_intr will be called. This step will be | 633 | * 2. On each interrupt, ide_pc_intr will be called. This step will be |
646 | * repeated until the device signals us that no more interrupts will be issued. | 634 | * repeated until the device signals us that no more interrupts will be issued. |
647 | * | 635 | * |
648 | * 3. ATAPI Tape media access commands have immediate status with a delayed | 636 | * 3. ATAPI Tape media access commands have immediate status with a delayed |
@@ -668,7 +656,7 @@ static ide_startstop_t idetape_pc_intr(ide_drive_t *drive) | |||
668 | */ | 656 | */ |
669 | static ide_startstop_t idetape_transfer_pc(ide_drive_t *drive) | 657 | static ide_startstop_t idetape_transfer_pc(ide_drive_t *drive) |
670 | { | 658 | { |
671 | return ide_transfer_pc(drive, idetape_pc_intr, WAIT_TAPE_CMD, NULL); | 659 | return ide_transfer_pc(drive, WAIT_TAPE_CMD, NULL); |
672 | } | 660 | } |
673 | 661 | ||
674 | static ide_startstop_t idetape_issue_pc(ide_drive_t *drive, | 662 | static ide_startstop_t idetape_issue_pc(ide_drive_t *drive, |