diff options
Diffstat (limited to 'arch/parisc/kernel/drivers.c')
-rw-r--r-- | arch/parisc/kernel/drivers.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/arch/parisc/kernel/drivers.c b/arch/parisc/kernel/drivers.c index d6c486e9501c..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 | ||
@@ -689,7 +700,9 @@ parse_tree_node(struct device *parent, int index, struct hardware_path *modpath) | |||
689 | .fn = check_parent, | 700 | .fn = check_parent, |
690 | }; | 701 | }; |
691 | 702 | ||
692 | device_for_each_child(parent, &recurse_data, descend_children); | 703 | if (device_for_each_child(parent, &recurse_data, descend_children)) |
704 | /* nothing */; | ||
705 | |||
693 | return d.dev; | 706 | return d.dev; |
694 | } | 707 | } |
695 | 708 | ||
@@ -835,8 +848,8 @@ static void print_parisc_device(struct parisc_device *dev) | |||
835 | static int count; | 848 | static int count; |
836 | 849 | ||
837 | print_pa_hwpath(dev, hw_path); | 850 | print_pa_hwpath(dev, hw_path); |
838 | printk(KERN_INFO "%d. %s at 0x%lx [%s] { %d, 0x%x, 0x%.3x, 0x%.5x }", | 851 | printk(KERN_INFO "%d. %s at 0x%p [%s] { %d, 0x%x, 0x%.3x, 0x%.5x }", |
839 | ++count, dev->name, dev->hpa.start, hw_path, dev->id.hw_type, | 852 | ++count, dev->name, (void*) dev->hpa.start, hw_path, dev->id.hw_type, |
840 | dev->id.hversion_rev, dev->id.hversion, dev->id.sversion); | 853 | dev->id.hversion_rev, dev->id.hversion, dev->id.sversion); |
841 | 854 | ||
842 | if (dev->num_addrs) { | 855 | if (dev->num_addrs) { |