summaryrefslogtreecommitdiffstats
path: root/drivers/pci/setup-res.c
diff options
context:
space:
mode:
authorNikhil P Rao <nikhil.rao@intel.com>2012-06-20 12:56:00 -0700
committerBjorn Helgaas <bhelgaas@google.com>2012-07-11 16:57:44 -0600
commitd6776e6d5c2f8db0252f447b09736075e1bbe387 (patch)
tree304355b34b77cd64b30a95f79b16a08d1521e17b /drivers/pci/setup-res.c
parentcfaf025112d3856637ff34a767ef785ef5cf2ca9 (diff)
PCI: fix truncation of resource size to 32 bits
_pci_assign_resource() took an int "size" argument, which meant that sizes larger than 4GB were truncated. Change type to resource_size_t. [bhelgaas: changelog] Signed-off-by: Nikhil P Rao <nikhil.rao@intel.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/setup-res.c')
-rw-r--r--drivers/pci/setup-res.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/pci/setup-res.c b/drivers/pci/setup-res.c
index eea85dafc76..be76ebacf48 100644
--- a/drivers/pci/setup-res.c
+++ b/drivers/pci/setup-res.c
@@ -206,7 +206,8 @@ static int pci_revert_fw_address(struct resource *res, struct pci_dev *dev,
return ret;
}
-static int _pci_assign_resource(struct pci_dev *dev, int resno, int size, resource_size_t min_align)
+static int _pci_assign_resource(struct pci_dev *dev, int resno,
+ resource_size_t size, resource_size_t min_align)
{
struct resource *res = dev->resource + resno;
struct pci_bus *bus;