[openib-general] [PATCH] - ucma updates for miscdev changes

Steve WIse swise at opengridcomputing.com
Sun Dec 10 14:04:33 PST 2006


Sean, 

As part of merging up to linus's tree as of 12/8/2006, I had to change
ucma.c to support changes in the miscdevice stuff.  Below is a patch for
this.  In addition to this change, I had to merge your ucma patches to
get them to apply.  Nothing functional changed, I don't think, but some
of the changes in your tree are already in linus's tree, so those
patches were ignored.  And one didn't apply cleanly and I had to fix it
manually.    

You can see these changes including the patch below as a single patch in
git://staging.openfabrics.org/~swise/cxgb3.git commit number:
d1ac2e74680d61a5e87165e1c6b4cec44533f2bd.


Signed-off-by: Steve Wise <swise at opengridcomputing.com>



-----


--- rdma-dev/drivers/infiniband/core/ucma.c	2006-12-08 11:03:31.000000000 -0600
+++ cxgb3.git/drivers/infiniband/core/ucma.c	2006-12-09 09:41:03.000000000 -0600
@@ -836,11 +836,12 @@ static struct miscdevice ucma_misc = {
 	.fops	= &ucma_fops,
 };
 
-static ssize_t show_abi_version(struct class_device *class_dev, char *buf)
+static ssize_t show_abi_version(struct device *class_dev, 
+				struct device_attribute *attr, char *buf)
 {
 	return sprintf(buf, "%d\n", RDMA_USER_CM_ABI_VERSION);
 }
-static CLASS_DEVICE_ATTR(abi_version, S_IRUGO, show_abi_version, NULL);
+static DEVICE_ATTR(abi_version, S_IRUGO, show_abi_version, NULL);
 
 static int __init ucma_init(void)
 {
@@ -850,8 +851,7 @@ static int __init ucma_init(void)
 	if (ret)
 		return ret;
 
-	ret = class_device_create_file(ucma_misc.class,
-				       &class_device_attr_abi_version);
+	ret = device_create_file(ucma_misc.this_device, &dev_attr_abi_version);
 	if (ret) {
 		printk(KERN_ERR "rdma_ucm: couldn't create abi_version attr\n");
 		goto err;
@@ -864,8 +864,7 @@ err:
 
 static void __exit ucma_cleanup(void)
 {
-	class_device_remove_file(ucma_misc.class, 
-				 &class_device_attr_abi_version);
+	device_remove_file(ucma_misc.this_device, &dev_attr_abi_version);
 	misc_deregister(&ucma_misc);
 	idr_destroy(&ctx_idr);
 }






More information about the general mailing list