diff options
Diffstat (limited to 'arch/sparc/kernel/pci.c')
-rw-r--r-- | arch/sparc/kernel/pci.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/sparc/kernel/pci.c b/arch/sparc/kernel/pci.c index 80a87e2a3e7c..1e94f946570e 100644 --- a/arch/sparc/kernel/pci.c +++ b/arch/sparc/kernel/pci.c | |||
@@ -820,11 +820,9 @@ static int __pci_mmap_make_offset_bus(struct pci_dev *pdev, struct vm_area_struc | |||
820 | unsigned long space_size, user_offset, user_size; | 820 | unsigned long space_size, user_offset, user_size; |
821 | 821 | ||
822 | if (mmap_state == pci_mmap_io) { | 822 | if (mmap_state == pci_mmap_io) { |
823 | space_size = (pbm->io_space.end - | 823 | space_size = resource_size(&pbm->io_space); |
824 | pbm->io_space.start) + 1; | ||
825 | } else { | 824 | } else { |
826 | space_size = (pbm->mem_space.end - | 825 | space_size = resource_size(&pbm->mem_space); |
827 | pbm->mem_space.start) + 1; | ||
828 | } | 826 | } |
829 | 827 | ||
830 | /* Make sure the request is in range. */ | 828 | /* Make sure the request is in range. */ |