Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 251888
b: refs/heads/master
c: c3af098
h: refs/heads/master
v: v3
  • Loading branch information
Roland Dreier committed May 23, 2011
1 parent ef81e89 commit c6c2328
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c8367c4cd9de512d296fc557f121be62a43987f3
refs/heads/master: c3af0980ce01dfb8e946990c3ae4c3727b1e9f26
8 changes: 8 additions & 0 deletions trunk/drivers/infiniband/core/cm.c
Original file line number Diff line number Diff line change
Expand Up @@ -3639,8 +3639,16 @@ static struct kobj_type cm_port_obj_type = {
.release = cm_release_port_obj
};

static char *cm_devnode(struct device *dev, mode_t *mode)
{
*mode = 0666;
return kasprintf(GFP_KERNEL, "infiniband/%s", dev_name(dev));
}

struct class cm_class = {
.owner = THIS_MODULE,
.name = "infiniband_cm",
.devnode = cm_devnode,
};
EXPORT_SYMBOL(cm_class);

Expand Down
7 changes: 7 additions & 0 deletions trunk/drivers/infiniband/core/user_mad.c
Original file line number Diff line number Diff line change
Expand Up @@ -1176,6 +1176,11 @@ static void ib_umad_remove_one(struct ib_device *device)
kref_put(&umad_dev->ref, ib_umad_release_dev);
}

static char *umad_devnode(struct device *dev, mode_t *mode)
{
return kasprintf(GFP_KERNEL, "infiniband/%s", dev_name(dev));
}

static int __init ib_umad_init(void)
{
int ret;
Expand All @@ -1194,6 +1199,8 @@ static int __init ib_umad_init(void)
goto out_chrdev;
}

umad_class->devnode = umad_devnode;

ret = class_create_file(umad_class, &class_attr_abi_version.attr);
if (ret) {
printk(KERN_ERR "user_mad: couldn't create abi_version attribute\n");
Expand Down

0 comments on commit c6c2328

Please sign in to comment.