aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAlan Cox <alan@lxorguk.ukuu.org.uk>2006-12-08 05:39:58 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-08 11:29:03 -0500
commitb1489009963b8c5132f2ffe23483e811d9ae5607 (patch)
tree66f8ada358e6e42dc7a65e3f7ed662d5bfc0d32a /include
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')
-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)
40 40
41static __inline__ unsigned long ide_default_io_base(int index) 41static __inline__ unsigned long ide_default_io_base(int index)
42{ 42{
43 struct pci_dev *pdev;
43 /* 44 /*
44 * If PCI is present then it is not safe to poke around 45 * If PCI is present then it is not safe to poke around
45 * the other legacy IDE ports. Only 0x1f0 and 0x170 are 46 * the other legacy IDE ports. Only 0x1f0 and 0x170 are
46 * defined compatibility mode ports for PCI. A user can 47 * defined compatibility mode ports for PCI. A user can
47 * override this using ide= but we must default safe. 48 * override this using ide= but we must default safe.
48 */ 49 */
49 if (pci_find_device(PCI_ANY_ID, PCI_ANY_ID, NULL) == NULL) { 50 if ((pdev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, NULL)) == NULL) {
50 switch(index) { 51 switch(index) {
51 case 2: return 0x1e8; 52 case 2: return 0x1e8;
52 case 3: return 0x168; 53 case 3: return 0x168;
@@ -54,6 +55,7 @@ static __inline__ unsigned long ide_default_io_base(int index)
54 case 5: return 0x160; 55 case 5: return 0x160;
55 } 56 }
56 } 57 }
58 pci_dev_put(pdev);
57 switch (index) { 59 switch (index) {
58 case 0: return 0x1f0; 60 case 0: return 0x1f0;
59 case 1: return 0x170; 61 case 1: return 0x170;