aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/quirks.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/quirks.c')
-rw-r--r--drivers/pci/quirks.c7
1 files changed, 7 insertions, 0 deletions
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}