Re: [PATCH] PCI Hotplug changes for 2.5.59

Greg KH (greg@kroah.com)
Wed, 5 Feb 2003 20:08 -0800


ChangeSet 1.947.23.11, 2003/02/06 10:04:49+11:00, greg@kroah.com

[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/