diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-11-16 10:51:56 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-11-16 10:51:56 -0800 |
commit | bdbd01ac444bffb3c9aefed3059d12554059b320 (patch) | |
tree | 1ee6fe62d019b2f487abe6d3250b348bb667fc3c | |
parent | 2ebc8ec86fe0f3f3acf9ba9b41a368f819e7807e (diff) | |
parent | 8c05cd08a7504b855c265263e84af61aabafa329 (diff) | |
download | kernel_goldelico_gta04-bdbd01ac444bffb3c9aefed3059d12554059b320.zip kernel_goldelico_gta04-bdbd01ac444bffb3c9aefed3059d12554059b320.tar.gz kernel_goldelico_gta04-bdbd01ac444bffb3c9aefed3059d12554059b320.tar.bz2 |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
PCI: fix offset check for sysfs mmapped files
-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 95712a3..63d5042 100644 --- a/drivers/pci/pci-sysfs.c +++ b/drivers/pci/pci-sysfs.c @@ -715,7 +715,7 @@ int pci_mmap_fits(struct pci_dev *pdev, int resno, struct vm_area_struct *vma, nr = (vma->vm_end - vma->vm_start) >> PAGE_SHIFT; start = vma->vm_pgoff; size = ((pci_resource_len(pdev, resno) - 1) >> PAGE_SHIFT) + 1; - pci_start = (mmap_api == PCI_MMAP_SYSFS) ? + pci_start = (mmap_api == PCI_MMAP_PROCFS) ? pci_resource_start(pdev, resno) >> PAGE_SHIFT : 0; if (start >= pci_start && start < pci_start + size && start + nr <= pci_start + size) |