diff options
author | Paul Mackerras <paulus@samba.org> | 2007-12-11 15:30:27 +1100 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-12-11 15:30:27 +1100 |
commit | cfad589f565bdaa69d45fb1c0db124727a6eaf6e (patch) | |
tree | 0582935064aa9e6ba0c80efaf6c0ef35ff8c3867 /drivers | |
parent | bc625f20c08c5a5438a9fa3bb6d67fd84b1bab4b (diff) | |
parent | 437105f2a7f23899fd647e7ada683ba8dacf11ba (diff) | |
download | blackbird-op-linux-cfad589f565bdaa69d45fb1c0db124727a6eaf6e.tar.gz blackbird-op-linux-cfad589f565bdaa69d45fb1c0db124727a6eaf6e.zip |
Merge branch 'linux-2.6' into for-2.6.25
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/pci/probe.c | 48 |
1 files changed, 12 insertions, 36 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 463a5a9d583d..c2f8a78c894c 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -743,46 +743,22 @@ static int pci_setup_device(struct pci_dev * dev) */ if (class == PCI_CLASS_STORAGE_IDE) { u8 progif; - struct pci_bus_region region; - pci_read_config_byte(dev, PCI_CLASS_PROG, &progif); if ((progif & 1) == 0) { - struct resource resource = { - .start = 0x1F0, - .end = 0x1F7, - .flags = LEGACY_IO_RESOURCE, - }; - - pcibios_resource_to_bus(dev, ®ion, &resource); - dev->resource[0].start = region.start; - dev->resource[0].end = region.end; - dev->resource[0].flags = resource.flags; - resource.start = 0x3F6; - resource.end = 0x3F6; - resource.flags = LEGACY_IO_RESOURCE; - pcibios_resource_to_bus(dev, ®ion, &resource); - dev->resource[1].start = region.start; - dev->resource[1].end = region.end; - dev->resource[1].flags = resource.flags; + dev->resource[0].start = 0x1F0; + dev->resource[0].end = 0x1F7; + dev->resource[0].flags = LEGACY_IO_RESOURCE; + dev->resource[1].start = 0x3F6; + dev->resource[1].end = 0x3F6; + dev->resource[1].flags = LEGACY_IO_RESOURCE; } if ((progif & 4) == 0) { - struct resource resource = { - .start = 0x170, - .end = 0x177, - .flags = LEGACY_IO_RESOURCE, - }; - - pcibios_resource_to_bus(dev, ®ion, &resource); - dev->resource[2].start = region.start; - dev->resource[2].end = region.end; - dev->resource[2].flags = resource.flags; - resource.start = 0x376; - resource.end = 0x376; - resource.flags = LEGACY_IO_RESOURCE; - pcibios_resource_to_bus(dev, ®ion, &resource); - dev->resource[3].start = region.start; - dev->resource[3].end = region.end; - dev->resource[3].flags = resource.flags; + dev->resource[2].start = 0x170; + dev->resource[2].end = 0x177; + dev->resource[2].flags = LEGACY_IO_RESOURCE; + dev->resource[3].start = 0x376; + dev->resource[3].end = 0x376; + dev->resource[3].flags = LEGACY_IO_RESOURCE; } } break; |