From: Roland Dreier <rolandd@cisco.com>

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>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 drivers/infiniband/core/uverbs_main.c |   12 +-----------
 1 files changed, 1 insertion(+), 11 deletions(-)

diff -puN drivers/infiniband/core/uverbs_main.c~ib-uverbs-core-implementation-fix drivers/infiniband/core/uverbs_main.c
--- 25/drivers/infiniband/core/uverbs_main.c~ib-uverbs-core-implementation-fix	2005-06-29 10:06:10.000000000 -0700
+++ 25-akpm/drivers/infiniband/core/uverbs_main.c	2005-06-29 10:06:10.000000000 -0700
@@ -509,15 +509,6 @@ 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 =
@@ -584,12 +575,11 @@ 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;
 
_