aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/parisc/kernel/drivers.c11
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");
562pa_dev_attr_id(hversion, "0x%03x\n"); 562pa_dev_attr_id(hversion, "0x%03x\n");
563pa_dev_attr_id(sversion, "0x%05x\n"); 563pa_dev_attr_id(sversion, "0x%05x\n");
564 564
565static 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
565static struct device_attribute parisc_device_attrs[] = { 575static 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