aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 = {
1339}; 1339};
1340 1340
1341 1341
1342static struct class_simple *ib_ucm_class; 1342static struct class *ib_ucm_class;
1343static struct cdev ib_ucm_cdev; 1343static struct cdev ib_ucm_cdev;
1344 1344
1345static int __init ib_ucm_init(void) 1345static int __init ib_ucm_init(void)
@@ -1360,17 +1360,14 @@ static int __init ib_ucm_init(void)
1360 goto err_cdev; 1360 goto err_cdev;
1361 } 1361 }
1362 1362
1363 ib_ucm_class = class_simple_create(THIS_MODULE, "infiniband_cm"); 1363 ib_ucm_class = class_create(THIS_MODULE, "infiniband_cm");
1364 if (IS_ERR(ib_ucm_class)) { 1364 if (IS_ERR(ib_ucm_class)) {
1365 result = PTR_ERR(ib_ucm_class); 1365 result = PTR_ERR(ib_ucm_class);
1366 printk(KERN_ERR "UCM: Error <%d> creating class\n", result); 1366 printk(KERN_ERR "UCM: Error <%d> creating class\n", result);
1367 goto err_class; 1367 goto err_class;
1368 } 1368 }
1369 1369
1370 class_simple_device_add(ib_ucm_class, 1370 class_device_create(ib_ucm_class, IB_UCM_DEV, NULL, "ucm");
1371 IB_UCM_DEV,
1372 NULL,
1373 "ucm");
1374 1371
1375 idr_init(&ctx_id_table); 1372 idr_init(&ctx_id_table);
1376 init_MUTEX(&ctx_id_mutex); 1373 init_MUTEX(&ctx_id_mutex);
@@ -1386,8 +1383,8 @@ err_chr:
1386 1383
1387static void __exit ib_ucm_cleanup(void) 1384static void __exit ib_ucm_cleanup(void)
1388{ 1385{
1389 class_simple_device_remove(IB_UCM_DEV); 1386 class_device_destroy(ib_ucm_class, IB_UCM_DEV);
1390 class_simple_destroy(ib_ucm_class); 1387 class_destroy(ib_ucm_class);
1391 cdev_del(&ib_ucm_cdev); 1388 cdev_del(&ib_ucm_cdev);
1392 unregister_chrdev_region(IB_UCM_DEV, 1); 1389 unregister_chrdev_region(IB_UCM_DEV, 1);
1393} 1390}