]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/pci/proc.c
Merge git://oss.sgi.com:8090/oss/git/xfs-2.6
[karo-tx-linux.git] / drivers / pci / proc.c
index e68bbfb1e7c318d0c34c11e3c76774ae17f3c60a..7988fc8df3fd24327d60c2cc24ed1e7b6fc5b3e3 100644 (file)
@@ -355,14 +355,20 @@ static int show_device(struct seq_file *m, void *v)
                        dev->device,
                        dev->irq);
        /* Here should be 7 and not PCI_NUM_RESOURCES as we need to preserve compatibility */
-       for(i=0; i<7; i++)
+       for (i=0; i<7; i++) {
+               u64 start, end;
+               pci_resource_to_user(dev, i, &dev->resource[i], &start, &end);
                seq_printf(m, LONG_FORMAT,
-                       dev->resource[i].start |
+                       ((unsigned long)start) |
                        (dev->resource[i].flags & PCI_REGION_FLAG_MASK));
-       for(i=0; i<7; i++)
+       }
+       for (i=0; i<7; i++) {
+               u64 start, end;
+               pci_resource_to_user(dev, i, &dev->resource[i], &start, &end);
                seq_printf(m, LONG_FORMAT,
                        dev->resource[i].start < dev->resource[i].end ?
-                       dev->resource[i].end - dev->resource[i].start + 1 : 0);
+                       (unsigned long)(end - start) + 1 : 0);
+       }
        seq_putc(m, '\t');
        if (drv)
                seq_printf(m, "%s", drv->name);