path: root/drivers/infiniband/core/user_mad.c
diff options
authorLinus Torvalds <torvalds@linux-foundation.org>2011-05-26 12:13:57 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2011-05-26 12:13:57 -0700
commit4c171acc20794af16a27da25e11ec4e9cad5d9fa (patch)
treefb097384d709b7bda982902d999f658bb4f07b2c /drivers/infiniband/core/user_mad.c
parent20e0ec119b2c6cc412addefbe169f4f5e38701e8 (diff)
parent8dc4abdf4c82d0e1c47f14b6615406d31975ea66 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: RDMA/cma: Save PID of ID's owner RDMA/cma: Add support for netlink statistics export RDMA/cma: Pass QP type into rdma_create_id() RDMA: Update exported headers list RDMA/cma: Export enum cma_state in <rdma/rdma_cm.h> RDMA/nes: Add a check for strict_strtoul() RDMA/cxgb3: Don't post zero-byte read if endpoint is going away RDMA/cxgb4: Use completion objects for event blocking IB/srp: Fix integer -> pointer cast warnings IB: Add devnode methods to cm_class and umad_class IB/mad: Return EPROTONOSUPPORT when an RDMA device lacks the QP required IB/uverbs: Add devnode method to set path/mode RDMA/ucma: Add .nodename/.mode to tell userspace where to create device node RDMA: Add netlink infrastructure RDMA: Add error handling to ib_core_init()
Diffstat (limited to 'drivers/infiniband/core/user_mad.c')
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/infiniband/core/user_mad.c b/drivers/infiniband/core/user_mad.c
index cd1996d0ad08..8d261b6ea5fe 100644
--- a/drivers/infiniband/core/user_mad.c
+++ b/drivers/infiniband/core/user_mad.c
@@ -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;
@@ -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");

Privacy Policy