]> err.no Git - linux-2.6/blobdiff - drivers/pci/setup-res.c
[PATCH] Clean up struct flock64 definitions
[linux-2.6] / drivers / pci / setup-res.c
index 589486704ce3b534a0b54225816ff3e1d208b46a..5598b4714f77ac2efaf0f545e404b4c9163c4fcf 100644 (file)
@@ -26,7 +26,7 @@
 #include "pci.h"
 
 
-void
+static void
 pci_update_resource(struct pci_dev *dev, struct resource *res, int resno)
 {
        struct pci_bus_region region;
@@ -53,7 +53,9 @@ pci_update_resource(struct pci_dev *dev, struct resource *res, int resno)
        if (resno < 6) {
                reg = PCI_BASE_ADDRESS_0 + 4 * resno;
        } else if (resno == PCI_ROM_RESOURCE) {
-               new |= res->flags & IORESOURCE_ROM_ENABLE;
+               if (!(res->flags & IORESOURCE_ROM_ENABLE))
+                       return;
+               new |= PCI_ROM_ADDRESS_ENABLE;
                reg = dev->rom_base_reg;
        } else {
                /* Hmm, non-standard resource. */