diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/pci/Makefile | 6 | ||||
-rw-r--r-- | drivers/pci/quirks.c | 7 | ||||
-rw-r--r-- | drivers/pci/setup-res.c | 5 |
3 files changed, 9 insertions, 9 deletions
diff --git a/drivers/pci/Makefile b/drivers/pci/Makefile index 87cbf2d5f9b1..716df015f8d0 100644 --- a/drivers/pci/Makefile +++ b/drivers/pci/Makefile | |||
@@ -3,13 +3,9 @@ | |||
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y += access.o bus.o probe.o remove.o pci.o quirks.o \ | 5 | obj-y += access.o bus.o probe.o remove.o pci.o quirks.o \ |
6 | pci-driver.o search.o pci-sysfs.o rom.o | 6 | pci-driver.o search.o pci-sysfs.o rom.o setup-res.o |
7 | obj-$(CONFIG_PROC_FS) += proc.o | 7 | obj-$(CONFIG_PROC_FS) += proc.o |
8 | 8 | ||
9 | ifndef CONFIG_SPARC64 | ||
10 | obj-y += setup-res.o | ||
11 | endif | ||
12 | |||
13 | obj-$(CONFIG_HOTPLUG) += hotplug.o | 9 | obj-$(CONFIG_HOTPLUG) += hotplug.o |
14 | 10 | ||
15 | # Build the PCI Hotplug drivers if we were asked to | 11 | # Build the PCI Hotplug drivers if we were asked to |
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 140354a2aa72..4f0c1bd3674a 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c | |||
@@ -245,12 +245,19 @@ static void __devinit quirk_io_region(struct pci_dev *dev, unsigned region, unsi | |||
245 | { | 245 | { |
246 | region &= ~(size-1); | 246 | region &= ~(size-1); |
247 | if (region) { | 247 | if (region) { |
248 | struct pci_bus_region bus_region; | ||
248 | struct resource *res = dev->resource + nr; | 249 | struct resource *res = dev->resource + nr; |
249 | 250 | ||
250 | res->name = pci_name(dev); | 251 | res->name = pci_name(dev); |
251 | res->start = region; | 252 | res->start = region; |
252 | res->end = region + size - 1; | 253 | res->end = region + size - 1; |
253 | res->flags = IORESOURCE_IO; | 254 | res->flags = IORESOURCE_IO; |
255 | |||
256 | /* Convert from PCI bus to resource space. */ | ||
257 | bus_region.start = res->start; | ||
258 | bus_region.end = res->end; | ||
259 | pcibios_bus_to_resource(dev, res, &bus_region); | ||
260 | |||
254 | pci_claim_resource(dev, nr); | 261 | pci_claim_resource(dev, nr); |
255 | } | 262 | } |
256 | } | 263 | } |
diff --git a/drivers/pci/setup-res.c b/drivers/pci/setup-res.c index 362f93337a34..50d6685dcbcc 100644 --- a/drivers/pci/setup-res.c +++ b/drivers/pci/setup-res.c | |||
@@ -97,10 +97,7 @@ pci_claim_resource(struct pci_dev *dev, int resource) | |||
97 | char *dtype = resource < PCI_BRIDGE_RESOURCES ? "device" : "bridge"; | 97 | char *dtype = resource < PCI_BRIDGE_RESOURCES ? "device" : "bridge"; |
98 | int err; | 98 | int err; |
99 | 99 | ||
100 | if (res->flags & IORESOURCE_IO) | 100 | root = pcibios_select_root(dev, res); |
101 | root = &ioport_resource; | ||
102 | if (res->flags & IORESOURCE_MEM) | ||
103 | root = &iomem_resource; | ||
104 | 101 | ||
105 | err = -EINVAL; | 102 | err = -EINVAL; |
106 | if (root != NULL) | 103 | if (root != NULL) |