[PATCH] PCI: put proper field sizes on sysfs files, and add class file.
diff -Nru a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c
--- a/drivers/pci/pci-sysfs.c Thu Feb 6 14:51:27 2003
+++ b/drivers/pci/pci-sysfs.c Thu Feb 6 14:51:27 2003
@@ -35,10 +35,11 @@
} \
static DEVICE_ATTR(field, S_IRUGO, show_##field, NULL);
-pci_config_attr(vendor, "%x\n");
-pci_config_attr(device, "%x\n");
-pci_config_attr(subsystem_vendor, "%x\n");
-pci_config_attr(subsystem_device, "%x\n");
+pci_config_attr(vendor, "%04x\n");
+pci_config_attr(device, "%04x\n");
+pci_config_attr(subsystem_vendor, "%04x\n");
+pci_config_attr(subsystem_device, "%04x\n");
+pci_config_attr(class, "%06x\n");
pci_config_attr(irq, "%u\n");
/* show resources */
@@ -69,6 +70,7 @@
device_create_file (dev, &dev_attr_device);
device_create_file (dev, &dev_attr_subsystem_vendor);
device_create_file (dev, &dev_attr_subsystem_device);
+ device_create_file (dev, &dev_attr_class);
device_create_file (dev, &dev_attr_irq);
device_create_file (dev, &dev_attr_resource);
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/