diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-12 16:40:57 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-12 16:40:57 -0400 |
commit | 21ba0f88ae56da82a3a15fe54d729208b64c4f4b (patch) | |
tree | 17ce67f276fe3ea7284c3dc730bdd6a2ec7dfe2f /drivers/pci/setup-bus.c | |
parent | dc690d8ef842b464f1c429a376ca16cb8dbee6ae (diff) | |
parent | 36e235901f90fb83215be43cbd8f1ca14661ea40 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6: (34 commits)
PCI: Only build PCI syscalls on architectures that want them
PCI: limit pci_get_bus_and_slot to domain 0
PCI: hotplug: acpiphp: avoid acpiphp "cannot get bridge info" PCI hotplug failure
PCI: hotplug: acpiphp: remove hot plug parameter write to PCI host bridge
PCI: hotplug: acpiphp: fix slot poweroff problem on systems without _PS3
PCI: hotplug: pciehp: wait for 1 second after power off slot
PCI: pci_set_power_state(): check for PM capabilities earlier
PCI: cpci_hotplug: Convert to use the kthread API
PCI: add pci_try_set_mwi
PCI: pcie: remove SPIN_LOCK_UNLOCKED
PCI: ROUND_UP macro cleanup in drivers/pci
PCI: remove pci_dac_dma_... APIs
PCI: pci-x-pci-express-read-control-interfaces cleanups
PCI: Fix typo in include/linux/pci.h
PCI: pci_ids, remove double or more empty lines
PCI: pci_ids, add atheros and 3com_2 vendors
PCI: pci_ids, reorder some entries
PCI: i386: traps, change VENDOR to DEVICE
PCI: ATM: lanai, change VENDOR to DEVICE
PCI: Change all drivers to use pci_device->revision
...
Diffstat (limited to 'drivers/pci/setup-bus.c')
-rw-r--r-- | drivers/pci/setup-bus.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index 5ec297d7a5b4..5e5191ec8de6 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c | |||
@@ -34,8 +34,6 @@ | |||
34 | #define DBG(x...) | 34 | #define DBG(x...) |
35 | #endif | 35 | #endif |
36 | 36 | ||
37 | #define ROUND_UP(x, a) (((x) + (a) - 1) & ~((a) - 1)) | ||
38 | |||
39 | static void pbus_assign_resources_sorted(struct pci_bus *bus) | 37 | static void pbus_assign_resources_sorted(struct pci_bus *bus) |
40 | { | 38 | { |
41 | struct pci_dev *dev; | 39 | struct pci_dev *dev; |
@@ -310,7 +308,7 @@ static void pbus_size_io(struct pci_bus *bus) | |||
310 | #if defined(CONFIG_ISA) || defined(CONFIG_EISA) | 308 | #if defined(CONFIG_ISA) || defined(CONFIG_EISA) |
311 | size = (size & 0xff) + ((size & ~0xffUL) << 2); | 309 | size = (size & 0xff) + ((size & ~0xffUL) << 2); |
312 | #endif | 310 | #endif |
313 | size = ROUND_UP(size + size1, 4096); | 311 | size = ALIGN(size + size1, 4096); |
314 | if (!size) { | 312 | if (!size) { |
315 | b_res->flags = 0; | 313 | b_res->flags = 0; |
316 | return; | 314 | return; |
@@ -378,11 +376,11 @@ static int pbus_size_mem(struct pci_bus *bus, unsigned long mask, unsigned long | |||
378 | 376 | ||
379 | if (!align) | 377 | if (!align) |
380 | min_align = align1; | 378 | min_align = align1; |
381 | else if (ROUND_UP(align + min_align, min_align) < align1) | 379 | else if (ALIGN(align + min_align, min_align) < align1) |
382 | min_align = align1 >> 1; | 380 | min_align = align1 >> 1; |
383 | align += aligns[order]; | 381 | align += aligns[order]; |
384 | } | 382 | } |
385 | size = ROUND_UP(size, min_align); | 383 | size = ALIGN(size, min_align); |
386 | if (!size) { | 384 | if (!size) { |
387 | b_res->flags = 0; | 385 | b_res->flags = 0; |
388 | return 1; | 386 | return 1; |