diff options
author | David S. Miller <davem@davemloft.net> | 2008-11-11 18:43:02 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-11 18:43:02 -0500 |
commit | 7e452baf6b96b5aeba097afd91501d33d390cc97 (patch) | |
tree | 9b0e062d3677d50d731ffd0fba47423bfdee9253 /drivers/pci/pci-sysfs.c | |
parent | 3ac38c3a2e7dac3f8f35a56eb85c27881a4c3833 (diff) | |
parent | f21f237cf55494c3a4209de323281a3b0528da10 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/message/fusion/mptlan.c
drivers/net/sfc/ethtool.c
net/mac80211/debugfs_sta.c
Diffstat (limited to 'drivers/pci/pci-sysfs.c')
-rw-r--r-- | drivers/pci/pci-sysfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c index 110022d78689..5d72866897a8 100644 --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c | |||
@@ -575,7 +575,7 @@ static int pci_mmap_fits(struct pci_dev *pdev, int resno, struct vm_area_struct | |||
575 | 575 | ||
576 | nr = (vma->vm_end - vma->vm_start) >> PAGE_SHIFT; | 576 | nr = (vma->vm_end - vma->vm_start) >> PAGE_SHIFT; |
577 | start = vma->vm_pgoff; | 577 | start = vma->vm_pgoff; |
578 | size = pci_resource_len(pdev, resno) >> PAGE_SHIFT; | 578 | size = ((pci_resource_len(pdev, resno) - 1) >> PAGE_SHIFT) + 1; |
579 | if (start < size && size - start >= nr) | 579 | if (start < size && size - start >= nr) |
580 | return 1; | 580 | return 1; |
581 | WARN(1, "process \"%s\" tried to map 0x%08lx-0x%08lx on %s BAR %d (size 0x%08lx)\n", | 581 | WARN(1, "process \"%s\" tried to map 0x%08lx-0x%08lx on %s BAR %d (size 0x%08lx)\n", |