public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Kay Sievers <kay.sievers@vrfy.org>
To: linux-kernel@vger.kernel.org
Cc: Greg KH <greg@kroah.com>
Subject: [PATCH 7/7] inifiniband: pass dev_t to class core
Date: Sun, 23 Jan 2005 05:27:10 +0100	[thread overview]
Message-ID: <20050123042710.GC9256@vrfy.org> (raw)

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

===== 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;


             reply	other threads:[~2005-01-23  4:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-23  4:27 Kay Sievers [this message]
2005-01-23  4:44 ` [PATCH 7/7] inifiniband: pass dev_t to class core Roland Dreier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050123042710.GC9256@vrfy.org \
    --to=kay.sievers@vrfy.org \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox