summaryrefslogtreecommitdiff
path: root/include/asm-i386
diff options
context:
space:
mode:
authorAlan Cox <alan@lxorguk.ukuu.org.uk>2006-12-08 02:39:58 -0800
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-08 08:29:03 -0800
commitb1489009963b8c5132f2ffe23483e811d9ae5607 (patch)
tree66f8ada358e6e42dc7a65e3f7ed662d5bfc0d32a /include/asm-i386
parent6b49a257850fb8ad91f4c76bb712e9213141a34a (diff)
[PATCH] ide: more conversion to pci_get APIs
This completes IDE except for one use which requires a new core PCI function and will be polished up at the end Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-i386')
-rw-r--r--include/asm-i386/ide.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/asm-i386/ide.h b/include/asm-i386/ide.h
index 73465d2892b9..0fc240c80f49 100644
--- a/include/asm-i386/ide.h
+++ b/include/asm-i386/ide.h
@@ -40,13 +40,14 @@ static __inline__ int ide_default_irq(unsigned long base)
static __inline__ unsigned long ide_default_io_base(int index)
{
+ struct pci_dev *pdev;
/*
* If PCI is present then it is not safe to poke around
* the other legacy IDE ports. Only 0x1f0 and 0x170 are
* defined compatibility mode ports for PCI. A user can
* override this using ide= but we must default safe.
*/
- if (pci_find_device(PCI_ANY_ID, PCI_ANY_ID, NULL) == NULL) {
+ if ((pdev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, NULL)) == NULL) {
switch(index) {
case 2: return 0x1e8;
case 3: return 0x168;
@@ -54,6 +55,7 @@ static __inline__ unsigned long ide_default_io_base(int index)
case 5: return 0x160;
}
}
+ pci_dev_put(pdev);
switch (index) {
case 0: return 0x1f0;
case 1: return 0x170;