[PATCH 7/7] inifiniband: pass dev_t to class core

From: Kay Sievers
Date: Sat Jan 22 2005 - 23:38:48 EST


Signed-off-by: Kay Sievers <kay.sievers@xxxxxxxx>

===== drivers/infiniband/core/user_mad.c 1.2 vs edited =====
--- 1.2/drivers/infiniband/core/user_mad.c 2005-01-21 06:01:17 +01:00
+++ edited/drivers/infiniband/core/user_mad.c 2005-01-22 15:34:10 +01:00
@@ -518,15 +518,6 @@ static struct ib_client umad_client = {
.remove = ib_umad_remove_one
};

-static ssize_t show_dev(struct class_device *class_dev, char *buf)
-{
- struct ib_umad_port *port =
- container_of(class_dev, struct ib_umad_port, class_dev);
-
- return print_dev_t(buf, port->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_umad_port *port =
@@ -625,16 +616,13 @@ static void ib_umad_add_one(struct ib_de
umad_dev->port[i - s].devnum, 1))
goto err;

- umad_dev->port[i - s].class_dev.class = &umad_class;
+ umad_dev->port[i - s].class_dev.devt = umad_dev->port[i - s].dev.dev;
umad_dev->port[i - s].class_dev.dev = device->dma_device;
snprintf(umad_dev->port[i - s].class_dev.class_id,
BUS_ID_SIZE, "umad%d", umad_dev->port[i - s].devnum);
if (class_device_register(&umad_dev->port[i - s].class_dev))
goto err_class;

- if (class_device_create_file(&umad_dev->port[i - s].class_dev,
- &class_device_attr_dev))
- goto err_class;
if (class_device_create_file(&umad_dev->port[i - s].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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/