diff options
Diffstat (limited to 'drivers/pci/proc.c')
| -rw-r--r-- | drivers/pci/proc.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/pci/proc.c b/drivers/pci/proc.c index e68bbfb1e7c3..7988fc8df3fd 100644 --- a/drivers/pci/proc.c +++ b/drivers/pci/proc.c | |||
| @@ -355,14 +355,20 @@ static int show_device(struct seq_file *m, void *v) | |||
| 355 | dev->device, | 355 | dev->device, |
| 356 | dev->irq); | 356 | dev->irq); |
| 357 | /* Here should be 7 and not PCI_NUM_RESOURCES as we need to preserve compatibility */ | 357 | /* Here should be 7 and not PCI_NUM_RESOURCES as we need to preserve compatibility */ |
| 358 | for(i=0; i<7; i++) | 358 | for (i=0; i<7; i++) { |
| 359 | u64 start, end; | ||
| 360 | pci_resource_to_user(dev, i, &dev->resource[i], &start, &end); | ||
| 359 | seq_printf(m, LONG_FORMAT, | 361 | seq_printf(m, LONG_FORMAT, |
| 360 | dev->resource[i].start | | 362 | ((unsigned long)start) | |
| 361 | (dev->resource[i].flags & PCI_REGION_FLAG_MASK)); | 363 | (dev->resource[i].flags & PCI_REGION_FLAG_MASK)); |
| 362 | for(i=0; i<7; i++) | 364 | } |
| 365 | for (i=0; i<7; i++) { | ||
| 366 | u64 start, end; | ||
| 367 | pci_resource_to_user(dev, i, &dev->resource[i], &start, &end); | ||
| 363 | seq_printf(m, LONG_FORMAT, | 368 | seq_printf(m, LONG_FORMAT, |
| 364 | dev->resource[i].start < dev->resource[i].end ? | 369 | dev->resource[i].start < dev->resource[i].end ? |
| 365 | dev->resource[i].end - dev->resource[i].start + 1 : 0); | 370 | (unsigned long)(end - start) + 1 : 0); |
| 371 | } | ||
| 366 | seq_putc(m, '\t'); | 372 | seq_putc(m, '\t'); |
| 367 | if (drv) | 373 | if (drv) |
| 368 | seq_printf(m, "%s", drv->name); | 374 | seq_printf(m, "%s", drv->name); |
