diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-20 13:11:11 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-20 13:11:11 -0400 |
commit | e6423407d01168f7760cdee7270d9f51d1240301 (patch) | |
tree | 979795cfa8f6946238ab31f544159142f3e7df93 /drivers/ide/qd65xx.c | |
parent | 7f8189068726492950bf1a2dcfd9b51314560abf (diff) | |
parent | 39c58f37a10198054c656c28202fb1e6d22fd505 (diff) |
Merge branch 'for-2.6.31' of git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6
* 'for-2.6.31' of git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: (34 commits)
ide-cd: prevent null pointer deref via cdrom_newpc_intr
ide: BUG() on unknown requests
ide: filter out invalid DMA xfer mode changes in HDIO_DRIVE_CMD ioctl handler
ide: do not access ide_drive_t 'drive_data' field directly
sl82c105: implement test_irq() method
siimage: implement test_irq() method
pdc202xx_old: implement test_irq() method (take 2)
cmd64x: implement test_irq() method
cmd640: implement test_irq() method
ide: move ack_intr() method into 'struct ide_port_ops' (take 2)
ide: move IRQ clearing from ack_intr() method to clear_irq() method (take 2)
siimage: use ide_dma_test_irq() (take 2)
cmd64x: implement clear_irq() method (take 2)
ide: call clear_irq() method in ide_timer_expiry()
sgiioc4: coding style cleanup
ide: don't enable IORDY at a probe time
ide: IORDY handling fixes
ata: add ata_id_pio_need_iordy() helper (v2)
ide-tape: fix build issue
ide: unify interrupt reason checking
...
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 c9a13498689..74696edc8d1 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 = { |