diff options
-rw-r--r-- | drivers/xen/xen-pciback/conf_space_header.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/xen/xen-pciback/conf_space_header.c b/drivers/xen/xen-pciback/conf_space_header.c index da3cbdfcb5dc..f14b30f71464 100644 --- a/drivers/xen/xen-pciback/conf_space_header.c +++ b/drivers/xen/xen-pciback/conf_space_header.c | |||
@@ -187,7 +187,7 @@ static inline void read_dev_bar(struct pci_dev *dev, | |||
187 | 187 | ||
188 | bar_info->val = res[pos].start | | 188 | bar_info->val = res[pos].start | |
189 | (res[pos].flags & PCI_REGION_FLAG_MASK); | 189 | (res[pos].flags & PCI_REGION_FLAG_MASK); |
190 | bar_info->len_val = res[pos].end - res[pos].start + 1; | 190 | bar_info->len_val = resource_size(&res[pos]); |
191 | } | 191 | } |
192 | 192 | ||
193 | static void *bar_init(struct pci_dev *dev, int offset) | 193 | static void *bar_init(struct pci_dev *dev, int offset) |