[openib-general] [PATCH] uat: make uat.c compile on 2.6.13-rc3

Tom Duffy tduffy at sun.com
Thu Jul 28 11:50:55 PDT 2005


This patch is similar to the one for ucm.  It updates the class code to
work with 2.6.13-rc3.

Signed-off-by: Tom Duffy <tduffy at sun.com>

Index: linux-2.6.13-rc3-openib/drivers/infiniband/core/uat.c
===================================================================
--- linux-2.6.13-rc3-openib/drivers/infiniband/core/uat.c	(revision 2928)
+++ linux-2.6.13-rc3-openib/drivers/infiniband/core/uat.c	(working copy)
@@ -806,8 +806,8 @@ static struct file_operations ib_uat_fop
 };
 
 
-static struct class_simple *ib_uat_class;
-static struct cdev	  ib_uat_cdev;
+static struct class *ib_uat_class;
+static struct cdev   ib_uat_cdev;
 
 static int __init ib_uat_init(void)
 {
@@ -827,17 +827,14 @@ static int __init ib_uat_init(void)
 		goto err_cdev;
 	}
 
-	ib_uat_class = class_simple_create(THIS_MODULE, "infiniband_uat");
+	ib_uat_class = class_create(THIS_MODULE, "infiniband_uat");
 	if (IS_ERR(ib_uat_class)) {
 		result = PTR_ERR(ib_uat_class);
 		uat_dbg("Error <%d> creating class\n", result);
 		goto err_class;
 	}
 
-	class_simple_device_add(ib_uat_class,
-				IB_UAT_DEV,
-				NULL,
-				"uat");
+	class_device_create(ib_uat_class, IB_UAT_DEV, NULL, "uat");
 	
 	idr_init(&ctx_id_table);
 	init_MUTEX(&ctx_id_mutex);
@@ -853,8 +850,8 @@ err_chr:
 
 static void __exit ib_uat_cleanup(void)
 {
-	class_simple_device_remove(IB_UAT_DEV);
-	class_simple_destroy(ib_uat_class);
+	class_device_destroy(ib_uat_class, IB_UAT_DEV);
+	class_destroy(ib_uat_class);
 	cdev_del(&ib_uat_cdev);
 	unregister_chrdev_region(IB_UAT_DEV, 1);
 }





More information about the general mailing list