summaryrefslogtreecommitdiff
path: root/drivers/ide/cy82c693.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-11-19 04:04:12 +0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-11-19 04:04:12 +0400
commitddddefa99db4ae54a63dcd737d224bc3cc0f2d8a (patch)
tree2223e34469b7d70a2c740b55379fd09ff95257b6 /drivers/ide/cy82c693.c
parente27fc7e476077c724f313a3ddec44ad26c49f678 (diff)
parent0ab3d8b3213c8bb55370b11fcc5321ee4f2c5e92 (diff)
downloadlinux-ddddefa99db4ae54a63dcd737d224bc3cc0f2d8a.tar.xz
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide: cy82c693: fix PCI device selection icside: DMA support fix IDE: Don't powerdown Compaq Triflex IDE device on suspend piix: ICH7 MWDMA1 errata
Diffstat (limited to 'drivers/ide/cy82c693.c')
-rw-r--r--drivers/ide/cy82c693.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/ide/cy82c693.c b/drivers/ide/cy82c693.c
index 67cbcfa35122..847553fd8b96 100644
--- a/drivers/ide/cy82c693.c
+++ b/drivers/ide/cy82c693.c
@@ -1,7 +1,7 @@
/*
* Copyright (C) 1998-2000 Andreas S. Krebs (akrebs@altavista.net), Maintainer
* Copyright (C) 1998-2002 Andre Hedrick <andre@linux-ide.org>, Integrator
- * Copyright (C) 2007-2010 Bartlomiej Zolnierkiewicz
+ * Copyright (C) 2007-2011 Bartlomiej Zolnierkiewicz
*
* CYPRESS CY82C693 chipset IDE controller
*
@@ -90,7 +90,7 @@ static void cy82c693_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive)
u8 time_16, time_8;
/* select primary or secondary channel */
- if (hwif->index > 0) { /* drive is on the secondary channel */
+ if (drive->dn > 1) { /* drive is on the secondary channel */
dev = pci_get_slot(dev->bus, dev->devfn+1);
if (!dev) {
printk(KERN_ERR "%s: tune_drive: "
@@ -141,7 +141,7 @@ static void cy82c693_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive)
pci_write_config_byte(dev, CY82_IDE_SLAVE_IOW, time_16);
pci_write_config_byte(dev, CY82_IDE_SLAVE_8BIT, time_8);
}
- if (hwif->index > 0)
+ if (drive->dn > 1)
pci_dev_put(dev);
}