ide-h8300: add ->{in,out}put_data methods (take 2)
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Mon, 28 Apr 2008 21:44:37 +0000 (23:44 +0200)
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Mon, 28 Apr 2008 21:44:37 +0000 (23:44 +0200)
v2:

* Update ->{in,out}_data methods to take 'struct request *rq' argument.

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
drivers/ide/h8300/ide-h8300.c

index fd23f12e17aa9642e34bfa8f05efd2395487bcfa..90702f79d5606154c2c69fc7d82591c66ca51620 100644 (file)
@@ -56,6 +56,18 @@ static void mm_insw(unsigned long addr, void *buf, u32 len)
                *bp = bswap(*(volatile u16 *)addr);
 }
 
+static void h8300_input_data(ide_drive_t *drive, struct request *rq,
+                            void *buf, unsigned int len)
+{
+       mm_insw(drive->hwif->io_ports.data_addr, buf, (len + 1) / 2);
+}
+
+static void h8300_output_data(ide_drive_t *drive, struct request *rq,
+                             void *buf, unsigned int len)
+{
+       mm_outsw(drive->hwif->io_ports.data_addr, buf, (len + 1) / 2);
+}
+
 #define H8300_IDE_GAP (2)
 
 static inline void hw_setup(hw_regs_t *hw)
@@ -74,6 +86,9 @@ static inline void hwif_setup(ide_hwif_t *hwif)
 {
        default_hwif_iops(hwif);
 
+       hwif->input_data  = h8300_input_data;
+       hwif->output_data = h8300_output_data;
+
        hwif->OUTW  = mm_outw;
        hwif->OUTSW = mm_outsw;
        hwif->INW   = mm_inw;
This page took 0.026264 seconds and 5 git commands to generate.