]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/infiniband/core/sysfs.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable
[linux-2.6-omap-h63xx.git] / drivers / infiniband / core / sysfs.c
index 4d1042115598d39b95ccc76b12b80da0cbdf89c6..b43f7d3682d387eb4de8bf3581a9499660cd97db 100644 (file)
@@ -262,15 +262,7 @@ static ssize_t show_port_gid(struct ib_port *p, struct port_attribute *attr,
        if (ret)
                return ret;
 
-       return sprintf(buf, "%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",
-                      be16_to_cpu(((__be16 *) gid.raw)[0]),
-                      be16_to_cpu(((__be16 *) gid.raw)[1]),
-                      be16_to_cpu(((__be16 *) gid.raw)[2]),
-                      be16_to_cpu(((__be16 *) gid.raw)[3]),
-                      be16_to_cpu(((__be16 *) gid.raw)[4]),
-                      be16_to_cpu(((__be16 *) gid.raw)[5]),
-                      be16_to_cpu(((__be16 *) gid.raw)[6]),
-                      be16_to_cpu(((__be16 *) gid.raw)[7]));
+       return sprintf(buf, "%pI6\n", gid.raw);
 }
 
 static ssize_t show_port_pkey(struct ib_port *p, struct port_attribute *attr,
@@ -786,7 +778,7 @@ int ib_device_register_sysfs(struct ib_device *device)
        class_dev->class      = &ib_class;
        class_dev->driver_data = device;
        class_dev->parent     = device->dma_device;
-       strlcpy(class_dev->bus_id, device->name, BUS_ID_SIZE);
+       dev_set_name(class_dev, device->name);
 
        INIT_LIST_HEAD(&device->port_list);