diff options
Diffstat (limited to 'drivers/ide/qd65xx.c')
-rw-r--r-- | drivers/ide/qd65xx.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/ide/qd65xx.c b/drivers/ide/qd65xx.c index c9a134986891..74696edc8d1d 100644 --- a/drivers/ide/qd65xx.c +++ b/drivers/ide/qd65xx.c | |||
@@ -180,8 +180,11 @@ static int qd_find_disk_type (ide_drive_t *drive, | |||
180 | 180 | ||
181 | static void qd_set_timing (ide_drive_t *drive, u8 timing) | 181 | static void qd_set_timing (ide_drive_t *drive, u8 timing) |
182 | { | 182 | { |
183 | drive->drive_data &= 0xff00; | 183 | unsigned long data = (unsigned long)ide_get_drivedata(drive); |
184 | drive->drive_data |= timing; | 184 | |
185 | data &= 0xff00; | ||
186 | data |= timing; | ||
187 | ide_set_drivedata(drive, (void *)data); | ||
185 | 188 | ||
186 | printk(KERN_DEBUG "%s: %#x\n", drive->name, timing); | 189 | printk(KERN_DEBUG "%s: %#x\n", drive->name, timing); |
187 | } | 190 | } |
@@ -292,7 +295,7 @@ static void __init qd6500_init_dev(ide_drive_t *drive) | |||
292 | u8 base = (hwif->config_data & 0xff00) >> 8; | 295 | u8 base = (hwif->config_data & 0xff00) >> 8; |
293 | u8 config = QD_CONFIG(hwif); | 296 | u8 config = QD_CONFIG(hwif); |
294 | 297 | ||
295 | drive->drive_data = QD6500_DEF_DATA; | 298 | ide_set_drivedata(drive, (void *)QD6500_DEF_DATA); |
296 | } | 299 | } |
297 | 300 | ||
298 | static void __init qd6580_init_dev(ide_drive_t *drive) | 301 | static void __init qd6580_init_dev(ide_drive_t *drive) |
@@ -308,7 +311,7 @@ static void __init qd6580_init_dev(ide_drive_t *drive) | |||
308 | } else | 311 | } else |
309 | t2 = t1 = hwif->channel ? QD6580_DEF_DATA2 : QD6580_DEF_DATA; | 312 | t2 = t1 = hwif->channel ? QD6580_DEF_DATA2 : QD6580_DEF_DATA; |
310 | 313 | ||
311 | drive->drive_data = (drive->dn & 1) ? t2 : t1; | 314 | ide_set_drivedata(drive, (void *)((drive->dn & 1) ? t2 : t1)); |
312 | } | 315 | } |
313 | 316 | ||
314 | static const struct ide_tp_ops qd65xx_tp_ops = { | 317 | static const struct ide_tp_ops qd65xx_tp_ops = { |