diff options
author | Kyle McMartin <kyle@mako.i.cabal.ca> | 2007-01-13 14:56:50 -0500 |
---|---|---|
committer | Kyle McMartin <kyle@athena.road.mcmartin.ca> | 2007-02-17 01:08:09 -0500 |
commit | a04b0605384e019c6fd77cfd4e4ffce8eb50785f (patch) | |
tree | 1ee8e08ca875234d2024ff25720e349791cb33f1 /arch | |
parent | 3fe4c55ebc440159c49efe2e9464ac301b390913 (diff) |
[PARISC] display parisc device modalias in sysfs
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/parisc/kernel/drivers.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/parisc/kernel/drivers.c b/arch/parisc/kernel/drivers.c index 6274cd268e6a..2ca654bd6322 100644 --- a/arch/parisc/kernel/drivers.c +++ b/arch/parisc/kernel/drivers.c | |||
@@ -562,12 +562,23 @@ pa_dev_attr(rev, id.hversion_rev, "0x%x\n"); | |||
562 | pa_dev_attr_id(hversion, "0x%03x\n"); | 562 | pa_dev_attr_id(hversion, "0x%03x\n"); |
563 | pa_dev_attr_id(sversion, "0x%05x\n"); | 563 | pa_dev_attr_id(sversion, "0x%05x\n"); |
564 | 564 | ||
565 | static ssize_t modalias_show(struct device *dev, struct device_attribute *attr, char *buf) | ||
566 | { | ||
567 | struct parisc_device *padev = to_parisc_device(dev); | ||
568 | struct parisc_device_id *id = &padev->id; | ||
569 | |||
570 | return sprintf(buf, "parisc:t%02Xhv%04Xrev%02Xsv%08X\n", | ||
571 | (u8)id->hw_type, (u16)id->hversion, (u8)id->hversion_rev, | ||
572 | (u32)id->sversion); | ||
573 | } | ||
574 | |||
565 | static struct device_attribute parisc_device_attrs[] = { | 575 | static struct device_attribute parisc_device_attrs[] = { |
566 | __ATTR_RO(irq), | 576 | __ATTR_RO(irq), |
567 | __ATTR_RO(hw_type), | 577 | __ATTR_RO(hw_type), |
568 | __ATTR_RO(rev), | 578 | __ATTR_RO(rev), |
569 | __ATTR_RO(hversion), | 579 | __ATTR_RO(hversion), |
570 | __ATTR_RO(sversion), | 580 | __ATTR_RO(sversion), |
581 | __ATTR_RO(modalias), | ||
571 | __ATTR_NULL, | 582 | __ATTR_NULL, |
572 | }; | 583 | }; |
573 | 584 | ||