aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/xen/xen-pciback
diff options
context:
space:
mode:
authorThomas Meyer <thomas@m3y3r.de>2011-08-06 05:05:35 -0400
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2011-09-21 16:21:42 -0400
commit5fa99911a346e1f95c7932ff99a76693037e7927 (patch)
treec763ca108c5c22c6fdfac41a07fffb03e3596a25 /drivers/xen/xen-pciback
parentb6fd41e29dea9c6753b1843a77e50433e6123bcb (diff)
xen/pciback: use resource_size()
Use resource_size function on resource object instead of explicit computation. The semantic patch that makes this output is available in scripts/coccinelle/api/resource_size.cocci. More information about semantic patching is available at http://coccinelle.lip6.fr/ Signed-off-by: Thomas Meyer <thomas@m3y3r.de> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'drivers/xen/xen-pciback')
-rw-r--r--drivers/xen/xen-pciback/conf_space_header.c2
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
193static void *bar_init(struct pci_dev *dev, int offset) 193static void *bar_init(struct pci_dev *dev, int offset)