resource/PCI: align functions now return start of resource
[linux-2.6-block.git] / arch / parisc / kernel / pci.c
index f7064abc3bb6e60a544e3bfb97c12f468768fd89..4463a31973ba4067f0242c9c14f961a356089c6a 100644 (file)
@@ -254,10 +254,10 @@ EXPORT_SYMBOL(pcibios_bus_to_resource);
  * Since we are just checking candidates, don't use any fields other
  * than res->start.
  */
-void pcibios_align_resource(void *data, struct resource *res,
+resource_size_t pcibios_align_resource(void *data, struct resource *res,
                                resource_size_t size, resource_size_t alignment)
 {
-       resource_size_t mask, align;
+       resource_size_t mask, align, start = res->start;
 
        DBG_RES("pcibios_align_resource(%s, (%p) [%lx,%lx]/%x, 0x%lx, 0x%lx)\n",
                pci_name(((struct pci_dev *) data)),
@@ -269,10 +269,10 @@ void pcibios_align_resource(void *data, struct resource *res,
 
        /* Align to largest of MIN or input size */
        mask = max(alignment, align) - 1;
-       res->start += mask;
-       res->start &= ~mask;
+       start += mask;
+       start &= ~mask;
 
-       /* The caller updates the end field, we don't.  */
+       return start;
 }