]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/parisc/kernel/drivers.c
Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied...
[linux-2.6-omap-h63xx.git] / arch / parisc / kernel / drivers.c
index d6c486e9501ced09bded130f5f4049ee1d3a0c30..884b7ce16a3bd3cee27ba80e01e7bd3755d43cbd 100644 (file)
@@ -43,7 +43,7 @@ struct hppa_dma_ops *hppa_dma_ops __read_mostly;
 EXPORT_SYMBOL(hppa_dma_ops);
 
 static struct device root = {
-       .bus_id = "parisc",
+       .init_name = "parisc",
 };
 
 static inline int check_dev(struct device *dev)
@@ -393,7 +393,8 @@ EXPORT_SYMBOL(print_pci_hwpath);
 static void setup_bus_id(struct parisc_device *padev)
 {
        struct hardware_path path;
-       char *output = padev->dev.bus_id;
+       char name[20];
+       char *output = name;
        int i;
 
        get_node_path(padev->dev.parent, &path);
@@ -404,6 +405,7 @@ static void setup_bus_id(struct parisc_device *padev)
                output += sprintf(output, "%u:", (unsigned char) path.bc[i]);
        }
        sprintf(output, "%u", (unsigned char) padev->hw_path);
+       dev_set_name(&padev->dev, name);
 }
 
 struct parisc_device * create_tree_node(char id, struct device *parent)
@@ -562,12 +564,23 @@ pa_dev_attr(rev, id.hversion_rev, "0x%x\n");
 pa_dev_attr_id(hversion, "0x%03x\n");
 pa_dev_attr_id(sversion, "0x%05x\n");
 
+static ssize_t modalias_show(struct device *dev, struct device_attribute *attr, char *buf)
+{
+       struct parisc_device *padev = to_parisc_device(dev);
+       struct parisc_device_id *id = &padev->id;
+
+       return sprintf(buf, "parisc:t%02Xhv%04Xrev%02Xsv%08X\n",
+               (u8)id->hw_type, (u16)id->hversion, (u8)id->hversion_rev,
+               (u32)id->sversion);
+}
+
 static struct device_attribute parisc_device_attrs[] = {
        __ATTR_RO(irq),
        __ATTR_RO(hw_type),
        __ATTR_RO(rev),
        __ATTR_RO(hversion),
        __ATTR_RO(sversion),
+       __ATTR_RO(modalias),
        __ATTR_NULL,
 };
 
@@ -689,7 +702,9 @@ parse_tree_node(struct device *parent, int index, struct hardware_path *modpath)
                .fn     = check_parent,
        };
 
-       device_for_each_child(parent, &recurse_data, descend_children);
+       if (device_for_each_child(parent, &recurse_data, descend_children))
+               /* nothing */;
+
        return d.dev;
 }
 
@@ -835,8 +850,8 @@ static void print_parisc_device(struct parisc_device *dev)
        static int count;
 
        print_pa_hwpath(dev, hw_path);
-       printk(KERN_INFO "%d. %s at 0x%lx [%s] { %d, 0x%x, 0x%.3x, 0x%.5x }",
-               ++count, dev->name, dev->hpa.start, hw_path, dev->id.hw_type,
+       printk(KERN_INFO "%d. %s at 0x%p [%s] { %d, 0x%x, 0x%.3x, 0x%.5x }",
+               ++count, dev->name, (void*) dev->hpa.start, hw_path, dev->id.hw_type,
                dev->id.hversion_rev, dev->id.hversion, dev->id.sversion);
 
        if (dev->num_addrs) {