diff options
Diffstat (limited to 'include/asm-i386/ide.h')
| -rw-r--r-- | include/asm-i386/ide.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/include/asm-i386/ide.h b/include/asm-i386/ide.h index 0fc240c80f49..e7817a3d6578 100644 --- a/include/asm-i386/ide.h +++ b/include/asm-i386/ide.h | |||
| @@ -40,14 +40,13 @@ static __inline__ int ide_default_irq(unsigned long base) | |||
| 40 | 40 | ||
| 41 | static __inline__ unsigned long ide_default_io_base(int index) | 41 | static __inline__ unsigned long ide_default_io_base(int index) |
| 42 | { | 42 | { |
| 43 | struct pci_dev *pdev; | ||
| 44 | /* | 43 | /* |
| 45 | * If PCI is present then it is not safe to poke around | 44 | * If PCI is present then it is not safe to poke around |
| 46 | * the other legacy IDE ports. Only 0x1f0 and 0x170 are | 45 | * the other legacy IDE ports. Only 0x1f0 and 0x170 are |
| 47 | * defined compatibility mode ports for PCI. A user can | 46 | * defined compatibility mode ports for PCI. A user can |
| 48 | * override this using ide= but we must default safe. | 47 | * override this using ide= but we must default safe. |
| 49 | */ | 48 | */ |
| 50 | if ((pdev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, NULL)) == NULL) { | 49 | if (no_pci_devices()) { |
| 51 | switch(index) { | 50 | switch(index) { |
| 52 | case 2: return 0x1e8; | 51 | case 2: return 0x1e8; |
| 53 | case 3: return 0x168; | 52 | case 3: return 0x168; |
| @@ -55,7 +54,6 @@ static __inline__ unsigned long ide_default_io_base(int index) | |||
| 55 | case 5: return 0x160; | 54 | case 5: return 0x160; |
| 56 | } | 55 | } |
| 57 | } | 56 | } |
| 58 | pci_dev_put(pdev); | ||
| 59 | switch (index) { | 57 | switch (index) { |
| 60 | case 0: return 0x1f0; | 58 | case 0: return 0x1f0; |
| 61 | case 1: return 0x170; | 59 | case 1: return 0x170; |
