Merge branches 'x86/numa-fixes', 'x86/apic', 'x86/apm', 'x86/bitops', 'x86/build...
[safe/jmp/linux-2.6] / drivers / pci / pci-sysfs.c
index 9ec7d39..9c71858 100644 (file)
@@ -492,7 +492,6 @@ pci_mmap_legacy_mem(struct kobject *kobj, struct bin_attribute *attr,
  * @write_combine: 1 for write_combine mapping
  *
  * Use the regular PCI mapping routines to map a PCI resource into userspace.
- * FIXME: write combining?  maybe automatic for prefetchable regions?
  */
 static int
 pci_mmap_resource(struct kobject *kobj, struct bin_attribute *attr,
@@ -737,9 +736,9 @@ int __must_check pci_create_sysfs_dev_files (struct pci_dev *pdev)
                attr = kzalloc(sizeof(*attr), GFP_ATOMIC);
                if (attr) {
                        pdev->vpd->attr = attr;
-                       attr->size = pdev->vpd->ops->get_size(pdev);
+                       attr->size = pdev->vpd->len;
                        attr->attr.name = "vpd";
-                       attr->attr.mode = S_IRUGO | S_IWUSR;
+                       attr->attr.mode = S_IRUSR | S_IWUSR;
                        attr->read = pci_read_vpd;
                        attr->write = pci_write_vpd;
                        retval = sysfs_create_bin_file(&pdev->dev.kobj, attr);