aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/proc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/proc.c')
-rw-r--r--drivers/pci/proc.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/drivers/pci/proc.c b/drivers/pci/proc.c
index 54b2ebc9c91a..20dfd77bd8c2 100644
--- a/drivers/pci/proc.c
+++ b/drivers/pci/proc.c
@@ -302,12 +302,6 @@ static struct file_operations proc_bus_pci_operations = {
302#endif /* HAVE_PCI_MMAP */ 302#endif /* HAVE_PCI_MMAP */
303}; 303};
304 304
305#if BITS_PER_LONG == 32
306#define LONG_FORMAT "\t%08lx"
307#else
308#define LONG_FORMAT "\t%16lx"
309#endif
310
311/* iterator */ 305/* iterator */
312static void *pci_seq_start(struct seq_file *m, loff_t *pos) 306static void *pci_seq_start(struct seq_file *m, loff_t *pos)
313{ 307{
@@ -358,16 +352,16 @@ static int show_device(struct seq_file *m, void *v)
358 for (i=0; i<7; i++) { 352 for (i=0; i<7; i++) {
359 u64 start, end; 353 u64 start, end;
360 pci_resource_to_user(dev, i, &dev->resource[i], &start, &end); 354 pci_resource_to_user(dev, i, &dev->resource[i], &start, &end);
361 seq_printf(m, LONG_FORMAT, 355 seq_printf(m, "\t%16llx",
362 ((unsigned long)start) | 356 (unsigned long long)(start |
363 (dev->resource[i].flags & PCI_REGION_FLAG_MASK)); 357 (dev->resource[i].flags & PCI_REGION_FLAG_MASK)));
364 } 358 }
365 for (i=0; i<7; i++) { 359 for (i=0; i<7; i++) {
366 u64 start, end; 360 u64 start, end;
367 pci_resource_to_user(dev, i, &dev->resource[i], &start, &end); 361 pci_resource_to_user(dev, i, &dev->resource[i], &start, &end);
368 seq_printf(m, LONG_FORMAT, 362 seq_printf(m, "\t%16llx",
369 dev->resource[i].start < dev->resource[i].end ? 363 dev->resource[i].start < dev->resource[i].end ?
370 (unsigned long)(end - start) + 1 : 0); 364 (unsigned long long)(end - start) + 1 : 0);
371 } 365 }
372 seq_putc(m, '\t'); 366 seq_putc(m, '\t');
373 if (drv) 367 if (drv)