diff options
Diffstat (limited to 'drivers/ide/cs5536.c')
-rw-r--r-- | drivers/ide/cs5536.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/ide/cs5536.c b/drivers/ide/cs5536.c index 9623b852c616..b518ef0e9a35 100644 --- a/drivers/ide/cs5536.c +++ b/drivers/ide/cs5536.c | |||
@@ -125,11 +125,11 @@ static u8 cs5536_cable_detect(ide_hwif_t *hwif) | |||
125 | 125 | ||
126 | /** | 126 | /** |
127 | * cs5536_set_pio_mode - PIO timing setup | 127 | * cs5536_set_pio_mode - PIO timing setup |
128 | * @hwif: ATA port | ||
128 | * @drive: ATA device | 129 | * @drive: ATA device |
129 | * @pio: PIO mode number | ||
130 | */ | 130 | */ |
131 | 131 | ||
132 | static void cs5536_set_pio_mode(ide_drive_t *drive, const u8 pio) | 132 | static void cs5536_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive) |
133 | { | 133 | { |
134 | static const u8 drv_timings[5] = { | 134 | static const u8 drv_timings[5] = { |
135 | 0x98, 0x55, 0x32, 0x21, 0x20, | 135 | 0x98, 0x55, 0x32, 0x21, 0x20, |
@@ -143,11 +143,12 @@ static void cs5536_set_pio_mode(ide_drive_t *drive, const u8 pio) | |||
143 | 0x99, 0x92, 0x90, 0x22, 0x20, | 143 | 0x99, 0x92, 0x90, 0x22, 0x20, |
144 | }; | 144 | }; |
145 | 145 | ||
146 | struct pci_dev *pdev = to_pci_dev(drive->hwif->dev); | 146 | struct pci_dev *pdev = to_pci_dev(hwif->dev); |
147 | ide_drive_t *pair = ide_get_pair_dev(drive); | 147 | ide_drive_t *pair = ide_get_pair_dev(drive); |
148 | int cshift = (drive->dn & 1) ? IDE_CAST_D1_SHIFT : IDE_CAST_D0_SHIFT; | 148 | int cshift = (drive->dn & 1) ? IDE_CAST_D1_SHIFT : IDE_CAST_D0_SHIFT; |
149 | unsigned long timings = (unsigned long)ide_get_drivedata(drive); | 149 | unsigned long timings = (unsigned long)ide_get_drivedata(drive); |
150 | u32 cast; | 150 | u32 cast; |
151 | const u8 pio = drive->pio_mode - XFER_PIO_0; | ||
151 | u8 cmd_pio = pio; | 152 | u8 cmd_pio = pio; |
152 | 153 | ||
153 | if (pair) | 154 | if (pair) |