diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-07-23 13:55:56 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-07-23 13:55:56 -0400 |
commit | 374e042c3e767ac2e5a40b78529220e0b3de793c (patch) | |
tree | 433d258f6da9783f0cb34234af9c359353f531fe /drivers/ide/ide-floppy.c | |
parent | d6276b5f5cc7508124de291f3ed59c6945c17ae7 (diff) |
ide: add struct ide_tp_ops (take 2)
* Add struct ide_tp_ops for transport methods.
* Add 'const struct ide_tp_ops *tp_ops' to struct ide_port_info
and ide_hwif_t.
* Set the default hwif->tp_ops in ide_init_port_data().
* Set host driver specific hwif->tp_ops in ide_init_port().
* Export ide_exec_command(), ide_read_status(), ide_read_altstatus(),
ide_read_sff_dma_status(), ide_set_irq(), ide_tf_{load,read}()
and ata_{in,out}put_data().
* Convert host drivers and core code to use struct ide_tp_ops.
* Remove no longer needed default_hwif_transport().
* Cleanup ide_hwif_t from methods that are now in struct ide_tp_ops.
While at it:
* Use struct ide_port_info in falconide.c and q40ide.c.
* Rename ata_{in,out}put_data() to ide_{in,out}put_data().
v2:
* Fix missing convertion in ns87415.c.
There should be no functional changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-floppy.c')
-rw-r--r-- | drivers/ide/ide-floppy.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c index 6f5294cfff23..62be2b27f236 100644 --- a/drivers/ide/ide-floppy.c +++ b/drivers/ide/ide-floppy.c | |||
@@ -247,9 +247,9 @@ static void ide_floppy_io_buffers(ide_drive_t *drive, struct ide_atapi_pc *pc, | |||
247 | 247 | ||
248 | data = bvec_kmap_irq(bvec, &flags); | 248 | data = bvec_kmap_irq(bvec, &flags); |
249 | if (direction) | 249 | if (direction) |
250 | hwif->output_data(drive, NULL, data, count); | 250 | hwif->tp_ops->output_data(drive, NULL, data, count); |
251 | else | 251 | else |
252 | hwif->input_data(drive, NULL, data, count); | 252 | hwif->tp_ops->input_data(drive, NULL, data, count); |
253 | bvec_kunmap_irq(data, &flags); | 253 | bvec_kunmap_irq(data, &flags); |
254 | 254 | ||
255 | bcount -= count; | 255 | bcount -= count; |
@@ -402,7 +402,7 @@ static int idefloppy_transfer_pc(ide_drive_t *drive) | |||
402 | idefloppy_floppy_t *floppy = drive->driver_data; | 402 | idefloppy_floppy_t *floppy = drive->driver_data; |
403 | 403 | ||
404 | /* Send the actual packet */ | 404 | /* Send the actual packet */ |
405 | drive->hwif->output_data(drive, NULL, floppy->pc->c, 12); | 405 | drive->hwif->tp_ops->output_data(drive, NULL, floppy->pc->c, 12); |
406 | 406 | ||
407 | /* Timeout for the packet command */ | 407 | /* Timeout for the packet command */ |
408 | return IDEFLOPPY_WAIT_CMD; | 408 | return IDEFLOPPY_WAIT_CMD; |
@@ -954,7 +954,7 @@ static int idefloppy_get_format_progress(ide_drive_t *drive, int __user *arg) | |||
954 | u8 stat; | 954 | u8 stat; |
955 | 955 | ||
956 | local_irq_save(flags); | 956 | local_irq_save(flags); |
957 | stat = hwif->read_status(hwif); | 957 | stat = hwif->tp_ops->read_status(hwif); |
958 | local_irq_restore(flags); | 958 | local_irq_restore(flags); |
959 | 959 | ||
960 | progress_indication = ((stat & SEEK_STAT) == 0) ? 0 : 0x10000; | 960 | progress_indication = ((stat & SEEK_STAT) == 0) ? 0 : 0x10000; |