Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 1247
b: refs/heads/master
c: 9888549
h: refs/heads/master
i:
  1245: eeea1d2
  1243: 4083aef
  1239: cc42cab
  1231: 25e4f0d
  1215: 10d2556
v: v3
  • Loading branch information
Greg KH committed May 17, 2005
1 parent a218154 commit f422a7e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c22610dadc0452b1273494f2b5157123c6cd60e1
refs/heads/master: 9888549e0507cc95d1d7ade1595c00ff8e902659
12 changes: 12 additions & 0 deletions trunk/drivers/pci/pci-sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,17 @@ resource_show(struct device * dev, char * buf)
return (str - buf);
}

static ssize_t modalias_show(struct device *dev, char *buf)
{
struct pci_dev *pci_dev = to_pci_dev(dev);

return sprintf(buf, "pci:v%08Xd%08Xsv%08Xsd%08Xbc%02Xsc%02Xi%02x\n",
pci_dev->vendor, pci_dev->device,
pci_dev->subsystem_vendor, pci_dev->subsystem_device,
(u8)(pci_dev->class >> 16), (u8)(pci_dev->class >> 8),
(u8)(pci_dev->class));
}

struct device_attribute pci_dev_attrs[] = {
__ATTR_RO(resource),
__ATTR_RO(vendor),
Expand All @@ -82,6 +93,7 @@ struct device_attribute pci_dev_attrs[] = {
__ATTR_RO(class),
__ATTR_RO(irq),
__ATTR_RO(local_cpus),
__ATTR_RO(modalias),
__ATTR_NULL,
};

Expand Down

0 comments on commit f422a7e

Please sign in to comment.