lkml.org 
[lkml]   [2003]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [PATCH] PCI Hotplug changes for 2.5.59
From
Date
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/

\
 
 \ /
  Last update: 2005-03-22 13:32    [W:0.048 / U:1.640 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site