summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Duffy <tduffy@sun.com>2005-07-27 22:45:45 +0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-28 03:26:15 +0400
commit2d0d099f1950bda2f712364a3bf74f20ddb61190 (patch)
treedf817baa8fa2bc78f28f4248a18ad825bd3b650a
parenta5b74540770cb28b8ae779d0c27e228fe7500669 (diff)
downloadlinux-2d0d099f1950bda2f712364a3bf74f20ddb61190.tar.xz
[PATCH] Add kernel portion of user CM implementation (fix)
Include the patch openib-general changing class_simple to class. Signed-off-by: Tom Duffy <tduffy@sun.com> Cc: Hal Rosenstock <halr@voltaire.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--drivers/infiniband/core/ucm.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/infiniband/core/ucm.c b/drivers/infiniband/core/ucm.c
index 4b4808a0be43..546ec61c407f 100644
--- a/drivers/infiniband/core/ucm.c
+++ b/drivers/infiniband/core/ucm.c
@@ -1339,7 +1339,7 @@ static struct file_operations ib_ucm_fops = {
};
-static struct class_simple *ib_ucm_class;
+static struct class *ib_ucm_class;
static struct cdev ib_ucm_cdev;
static int __init ib_ucm_init(void)
@@ -1360,17 +1360,14 @@ static int __init ib_ucm_init(void)
goto err_cdev;
}
- ib_ucm_class = class_simple_create(THIS_MODULE, "infiniband_cm");
+ ib_ucm_class = class_create(THIS_MODULE, "infiniband_cm");
if (IS_ERR(ib_ucm_class)) {
result = PTR_ERR(ib_ucm_class);
printk(KERN_ERR "UCM: Error <%d> creating class\n", result);
goto err_class;
}
- class_simple_device_add(ib_ucm_class,
- IB_UCM_DEV,
- NULL,
- "ucm");
+ class_device_create(ib_ucm_class, IB_UCM_DEV, NULL, "ucm");
idr_init(&ctx_id_table);
init_MUTEX(&ctx_id_mutex);
@@ -1386,8 +1383,8 @@ err_chr:
static void __exit ib_ucm_cleanup(void)
{
- class_simple_device_remove(IB_UCM_DEV);
- class_simple_destroy(ib_ucm_class);
+ class_device_destroy(ib_ucm_class, IB_UCM_DEV);
+ class_destroy(ib_ucm_class);
cdev_del(&ib_ucm_cdev);
unregister_chrdev_region(IB_UCM_DEV, 1);
}