[openib-general] Re: compilation problem (no member devt)

Michael S. Tsirkin mst at mellanox.co.il
Mon Jul 4 16:04:12 PDT 2005


Quoting r. Sayantan Sur <surs at cse.ohio-state.edu>:
> Subject: compilation problem (no member devt)
> 
> 
> Hi,
> 
> I am facing a compile problem with the following error:
> 
> drivers/infiniband/core/uverbs_main.c: In function `ib_uverbs_add_one':
> drivers/infiniband/core/uverbs_main.c:578: error: structure has no
> member named `devt'
> make[3]: *** [drivers/infiniband/core/uverbs_main.o] Error 1
> make[2]: *** [drivers/infiniband/core] Error 2
> make[1]: *** [drivers/infiniband] Error 2
> make: *** [drivers] Error 2
> 
> The kernel version I am using is 2.6.11.7. I symlinked the
> drivers/infiniband directory to trunk/src/linux-kernel/infiniband/. The
> Gen2 tree I am using is 2780 (for both user & kernel components).  The
> platform used is IA32.
> 
> Can somebody let me know how to get around this problem?
> 
> Thanks,
> Sayantan.

main trunk only supports 2.6.12 and up.
Try this patch:

Index: infiniband/core/uverbs_main.c
===================================================================
--- infiniband/core/uverbs_main.c	(revision 2744)
+++ infiniband/core/uverbs_main.c	(revision 2743)
@@ -509,6 +509,15 @@ static struct ib_client uverbs_client = 
 	.remove = ib_uverbs_remove_one
 };
 
+static ssize_t show_dev(struct class_device *class_dev, char *buf)
+{
+	struct ib_uverbs_device *dev =
+		container_of(class_dev, struct ib_uverbs_device, class_dev);
+
+	return print_dev_t(buf, dev->dev.dev);
+}
+static CLASS_DEVICE_ATTR(dev, S_IRUGO, show_dev, NULL);
+
 static ssize_t show_ibdev(struct class_device *class_dev, char *buf)
 {
 	struct ib_uverbs_device *dev =
@@ -575,11 +584,12 @@ static void ib_uverbs_add_one(struct ib_
 
 	uverbs_dev->class_dev.class = &uverbs_class;
 	uverbs_dev->class_dev.dev   = device->dma_device;
-	uverbs_dev->class_dev.devt  = uverbs_dev->dev.dev;
 	snprintf(uverbs_dev->class_dev.class_id, BUS_ID_SIZE, "uverbs%d", uverbs_dev->devnum);
 	if (class_device_register(&uverbs_dev->class_dev))
 		goto err_cdev;
 
+	if (class_device_create_file(&uverbs_dev->class_dev, &class_device_attr_dev))
+		goto err_class;
 	if (class_device_create_file(&uverbs_dev->class_dev, &class_device_attr_ibdev))
 		goto err_class;
 
-- 
MST



More information about the general mailing list