public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@suse.de>
To: linux-kernel@vger.kernel.org
Cc: gregkh@suse.de
Subject: [PATCH] IB: fix up major/minor sysfs interface for IB core
Date: Mon, 6 Feb 2006 12:29:17 -0800	[thread overview]
Message-ID: <11392577573268@kroah.com> (raw)
In-Reply-To: <11392577571422@kroah.com>

[PATCH] IB: fix up major/minor sysfs interface for IB core

Current IB code doesn't work with userspace programs that listen only to
the kernel event netlink socket as it is trying to create its own dev
interface.  This small patch fixes this problem, and removes some
unneeded code as the driver core handles this logic for you
automatically.

Acked-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
commit 68f5f996347dc2724a0dd511683643a2b6912380
tree 1a1131ef78c81129791c2c3b3cf365c7e35283aa
parent 0650fd5824e07570f0c43980b81bb23ae917f1d7
author Greg Kroah-Hartman <gregkh@suse.de> Fri, 20 Jan 2006 14:08:59 -0800
committer Greg Kroah-Hartman <gregkh@suse.de> Mon, 06 Feb 2006 12:17:17 -0800

 drivers/infiniband/core/ucm.c |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)

diff --git a/drivers/infiniband/core/ucm.c b/drivers/infiniband/core/ucm.c
index e95c429..f6a0596 100644
--- a/drivers/infiniband/core/ucm.c
+++ b/drivers/infiniband/core/ucm.c
@@ -1319,15 +1319,6 @@ static struct class ucm_class = {
 	.release = ib_ucm_release_class_dev
 };
 
-static ssize_t show_dev(struct class_device *class_dev, char *buf)
-{
-	struct ib_ucm_device *dev;
-	
-	dev = container_of(class_dev, struct ib_ucm_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_ucm_device *dev;
@@ -1364,15 +1355,13 @@ static void ib_ucm_add_one(struct ib_dev
 
 	ucm_dev->class_dev.class = &ucm_class;
 	ucm_dev->class_dev.dev = device->dma_device;
+	ucm_dev->class_dev.devt = ucm_dev->dev.dev;
 	snprintf(ucm_dev->class_dev.class_id, BUS_ID_SIZE, "ucm%d",
 		 ucm_dev->devnum);
 	if (class_device_register(&ucm_dev->class_dev))
 		goto err_cdev;
 
 	if (class_device_create_file(&ucm_dev->class_dev,
-				     &class_device_attr_dev))
-		goto err_class;
-	if (class_device_create_file(&ucm_dev->class_dev,
 				     &class_device_attr_ibdev))
 		goto err_class;
 


  reply	other threads:[~2006-02-06 20:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-06 20:28 [GIT PATCH] Driver Core fixes for 2.6.16-rc2 Greg KH
2006-02-06 20:29 ` [PATCH] Fix Userspace interface breakage in power/state Greg KH
2006-02-06 20:29   ` [PATCH] DRM: fix up classdev interface for drm core Greg KH
2006-02-06 20:29     ` Greg KH [this message]
2006-02-06 20:29       ` [PATCH] SPI: spi_butterfly, restore lost deltas Greg KH
2006-02-06 20:29         ` [PATCH] kobject: don't oops on null kobject.name Greg KH
2006-02-06 20:29           ` [PATCH] kobject_add() must have a valid name in order to succeed Greg KH
2006-02-06 20:29             ` [PATCH] Fix compiler warning in driver core for CONFIG_HOTPLUG=N Greg KH
2006-02-06 20:29               ` [PATCH] drivers/base/: proper prototypes Greg KH
2006-02-06 20:29                 ` [PATCH] debugfs: trivial comment fix Greg KH
2006-02-06 20:29                   ` [PATCH] Fix uevent buffer overflow in input layer Greg KH

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=11392577573268@kroah.com \
    --to=gregkh@suse.de \
    --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