mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Shannon Nelson <shannon.nelson@intel.com>
To: linux-kernel@vger.kernel.org, akpm@linux-foundation.org
Cc: shannon.nelson@intel.com, greg@kroah.com, kay.sievers@vrfy.org,
	tonyj@suse.de, dan.j.williams@intel.com
Subject: [PATCH] DCA: Convert struct class_device to struct device.
Date: Fri, 26 Oct 2007 16:54:12 -0700	[thread overview]
Message-ID: <20071026235411.5691.24867.stgit@localhost.localdomain> (raw)

From: Kay Sievers <kay.sievers@vrfy.org>

Thanks to Kay for keeping us honest.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
---

 drivers/dca/dca-sysfs.c |   15 +++++++--------
 include/linux/dca.h     |    2 +-
 2 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/drivers/dca/dca-sysfs.c b/drivers/dca/dca-sysfs.c
index 24a263b..011328f 100644
--- a/drivers/dca/dca-sysfs.c
+++ b/drivers/dca/dca-sysfs.c
@@ -12,10 +12,10 @@ static spinlock_t dca_idr_lock;
 
 int dca_sysfs_add_req(struct dca_provider *dca, struct device *dev, int slot)
 {
-	struct class_device *cd;
+	struct device *cd;
 
-	cd = class_device_create(dca_class, dca->cd, MKDEV(0, slot + 1),
-				 dev, "requester%d", slot);
+	cd = device_create(dca_class, dca->cd, MKDEV(0, slot + 1),
+			   "requester%d", slot);
 	if (IS_ERR(cd))
 		return PTR_ERR(cd);
 	return 0;
@@ -23,12 +23,12 @@ int dca_sysfs_add_req(struct dca_provider *dca, struct device *dev, int slot)
 
 void dca_sysfs_remove_req(struct dca_provider *dca, int slot)
 {
-	class_device_destroy(dca_class, MKDEV(0, slot + 1));
+	device_destroy(dca_class, MKDEV(0, slot + 1));
 }
 
 int dca_sysfs_add_provider(struct dca_provider *dca, struct device *dev)
 {
-	struct class_device *cd;
+	struct device *cd;
 	int err = 0;
 
 idr_try_again:
@@ -46,8 +46,7 @@ idr_try_again:
 		return err;
 	}
 
-	cd = class_device_create(dca_class, NULL, MKDEV(0, 0),
-				 dev, "dca%d", dca->id);
+	cd = device_create(dca_class, dev, MKDEV(0, 0), "dca%d", dca->id);
 	if (IS_ERR(cd)) {
 		spin_lock(&dca_idr_lock);
 		idr_remove(&dca_idr, dca->id);
@@ -60,7 +59,7 @@ idr_try_again:
 
 void dca_sysfs_remove_provider(struct dca_provider *dca)
 {
-	class_device_unregister(dca->cd);
+	device_unregister(dca->cd);
 	dca->cd = NULL;
 	spin_lock(&dca_idr_lock);
 	idr_remove(&dca_idr, dca->id);
diff --git a/include/linux/dca.h b/include/linux/dca.h
index 83eaecc..af61cd1 100644
--- a/include/linux/dca.h
+++ b/include/linux/dca.h
@@ -11,7 +11,7 @@ void dca_unregister_notify(struct notifier_block *nb);
 
 struct dca_provider {
 	struct dca_ops		*ops;
-	struct class_device 	*cd;
+	struct device 		*cd;
 	int			 id;
 };
 

                 reply	other threads:[~2007-10-27  6:32 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20071026235411.5691.24867.stgit@localhost.localdomain \
    --to=shannon.nelson@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=dan.j.williams@intel.com \
    --cc=greg@kroah.com \
    --cc=kay.sievers@vrfy.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tonyj@suse.de \
    /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

all inboxes | Powered by JetHome®