Messages in this thread Patch in this message | | | Subject | Re: [PATCH 05/16] IB uverbs: core implementation | From | Roland Dreier <> | Date | Wed, 29 Jun 2005 10:01:53 -0700 |
| |
Greg> This is no longer needed with the class device interface in Greg> the kernel today. Please use the new api (basically just Greg> set dev_t in the class_device, and you get this for free.)
Here's a patch that applies on top of this patch set that fixes this:
Greg KH pointed out that with the new class device code, we can just set class_dev.devt instead of having our own show_dev() function.
Signed-off-by: Roland Dreier <rolandd@cisco.com>
--- linux.orig/drivers/infiniband/core/uverbs_main.c 2005-06-28 15:20:04.000000000 -0700 +++ linux/drivers/infiniband/core/uverbs_main.c 2005-06-29 09:54:26.560138283 -0700 @@ -509,15 +509,6 @@ .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 = @@ -584,12 +575,11 @@ 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; - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |