diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-10-13 15:39:31 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-10-13 15:39:31 -0400 |
commit | 2b9efba48283f34083df6bc53f6752fba4e4d409 (patch) | |
tree | 215d86f1934c896f8ec609ab033b69bf5b99e217 /drivers/ide/ide-atapi.c | |
parent | b14c72127fbe8f97e49de7437520175673f7306a (diff) |
ide: add pointer to the current packet command to ide_drive_t
* Add pointer to the current packet command (struct ide_atapi_pc *pc)
to ide_drive_t and use it instead of the pointer in struct ide_*_obj.
* Use drive->pc in ide_{issue,transfer}_pc() and ide_pc_intr()
instead of 'pc' argument.
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/ide-atapi.c')
-rw-r--r-- | drivers/ide/ide-atapi.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/ide/ide-atapi.c b/drivers/ide/ide-atapi.c index fb27c94aeb0d..0069c4f08244 100644 --- a/drivers/ide/ide-atapi.c +++ b/drivers/ide/ide-atapi.c | |||
@@ -204,12 +204,13 @@ int ide_set_media_lock(ide_drive_t *drive, struct gendisk *disk, int on) | |||
204 | EXPORT_SYMBOL_GPL(ide_set_media_lock); | 204 | EXPORT_SYMBOL_GPL(ide_set_media_lock); |
205 | 205 | ||
206 | /* TODO: unify the code thus making some arguments go away */ | 206 | /* TODO: unify the code thus making some arguments go away */ |
207 | ide_startstop_t ide_pc_intr(ide_drive_t *drive, struct ide_atapi_pc *pc, | 207 | ide_startstop_t ide_pc_intr(ide_drive_t *drive, |
208 | ide_handler_t *handler, unsigned int timeout, ide_expiry_t *expiry, | 208 | ide_handler_t *handler, unsigned int timeout, ide_expiry_t *expiry, |
209 | void (*update_buffers)(ide_drive_t *, struct ide_atapi_pc *), | 209 | void (*update_buffers)(ide_drive_t *, struct ide_atapi_pc *), |
210 | void (*retry_pc)(ide_drive_t *), | 210 | void (*retry_pc)(ide_drive_t *), |
211 | int (*io_buffers)(ide_drive_t *, struct ide_atapi_pc *, unsigned, int)) | 211 | int (*io_buffers)(ide_drive_t *, struct ide_atapi_pc *, unsigned, int)) |
212 | { | 212 | { |
213 | struct ide_atapi_pc *pc = drive->pc; | ||
213 | ide_hwif_t *hwif = drive->hwif; | 214 | ide_hwif_t *hwif = drive->hwif; |
214 | struct request *rq = hwif->hwgroup->rq; | 215 | struct request *rq = hwif->hwgroup->rq; |
215 | const struct ide_tp_ops *tp_ops = hwif->tp_ops; | 216 | const struct ide_tp_ops *tp_ops = hwif->tp_ops; |
@@ -416,10 +417,11 @@ static u8 ide_wait_ireason(ide_drive_t *drive, u8 ireason) | |||
416 | return ireason; | 417 | return ireason; |
417 | } | 418 | } |
418 | 419 | ||
419 | ide_startstop_t ide_transfer_pc(ide_drive_t *drive, struct ide_atapi_pc *pc, | 420 | ide_startstop_t ide_transfer_pc(ide_drive_t *drive, |
420 | ide_handler_t *handler, unsigned int timeout, | 421 | ide_handler_t *handler, unsigned int timeout, |
421 | ide_expiry_t *expiry) | 422 | ide_expiry_t *expiry) |
422 | { | 423 | { |
424 | struct ide_atapi_pc *pc = drive->pc; | ||
423 | ide_hwif_t *hwif = drive->hwif; | 425 | ide_hwif_t *hwif = drive->hwif; |
424 | struct request *rq = hwif->hwgroup->rq; | 426 | struct request *rq = hwif->hwgroup->rq; |
425 | ide_startstop_t startstop; | 427 | ide_startstop_t startstop; |
@@ -458,10 +460,11 @@ ide_startstop_t ide_transfer_pc(ide_drive_t *drive, struct ide_atapi_pc *pc, | |||
458 | } | 460 | } |
459 | EXPORT_SYMBOL_GPL(ide_transfer_pc); | 461 | EXPORT_SYMBOL_GPL(ide_transfer_pc); |
460 | 462 | ||
461 | ide_startstop_t ide_issue_pc(ide_drive_t *drive, struct ide_atapi_pc *pc, | 463 | ide_startstop_t ide_issue_pc(ide_drive_t *drive, |
462 | ide_handler_t *handler, unsigned int timeout, | 464 | ide_handler_t *handler, unsigned int timeout, |
463 | ide_expiry_t *expiry) | 465 | ide_expiry_t *expiry) |
464 | { | 466 | { |
467 | struct ide_atapi_pc *pc = drive->pc; | ||
465 | ide_hwif_t *hwif = drive->hwif; | 468 | ide_hwif_t *hwif = drive->hwif; |
466 | u16 bcount; | 469 | u16 bcount; |
467 | u8 dma = 0; | 470 | u8 dma = 0; |