public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: tonyj@suse.de
To: linux-kernel@vger.kernel.org
Cc: axboe@kernel.dk, kay.sievers@vrfy.org
Subject: [patch 02/14] Convert from class_device to device for block/pktcdvd
Date: Mon, 20 Aug 2007 15:48:08 -0700	[thread overview]
Message-ID: <20070820225053.885236000@suse.de> (raw)
In-Reply-To: 20070820224806.154198000@suse.de

-- 
Content-Disposition: inline; filename=block.patch

Convert from class_device to device for block/pktcdvd.  

---
 drivers/block/pktcdvd.c |   16 +++++++---------
 include/linux/pktcdvd.h |    2 +-
 2 files changed, 8 insertions(+), 10 deletions(-)

--- a/drivers/block/pktcdvd.c
+++ b/drivers/block/pktcdvd.c
@@ -299,18 +299,16 @@ static struct kobj_type kobj_pkt_type_wq
 static void pkt_sysfs_dev_new(struct pktcdvd_device *pd)
 {
 	if (class_pktcdvd) {
-		pd->clsdev = class_device_create(class_pktcdvd,
-					NULL, pd->pkt_dev,
-					NULL, "%s", pd->name);
-		if (IS_ERR(pd->clsdev))
-			pd->clsdev = NULL;
+		pd->dev = device_create(class_pktcdvd, NULL, pd->pkt_dev, "%s", pd->name);
+		if (IS_ERR(pd->dev))
+			pd->dev = NULL;
 	}
-	if (pd->clsdev) {
+	if (pd->dev) {
 		pd->kobj_stat = pkt_kobj_create(pd, "stat",
-					&pd->clsdev->kobj,
+					&pd->dev->kobj,
 					&kobj_pkt_type_stat);
 		pd->kobj_wqueue = pkt_kobj_create(pd, "write_queue",
-					&pd->clsdev->kobj,
+					&pd->dev->kobj,
 					&kobj_pkt_type_wqueue);
 	}
 }
@@ -320,7 +318,7 @@ static void pkt_sysfs_dev_remove(struct 
 	pkt_kobj_remove(pd->kobj_stat);
 	pkt_kobj_remove(pd->kobj_wqueue);
 	if (class_pktcdvd)
-		class_device_destroy(class_pktcdvd, pd->pkt_dev);
+		device_destroy(class_pktcdvd, pd->pkt_dev);
 }
 
 
--- a/include/linux/pktcdvd.h
+++ b/include/linux/pktcdvd.h
@@ -290,7 +290,7 @@ struct pktcdvd_device
 	int			write_congestion_off;
 	int			write_congestion_on;
 
-	struct class_device	*clsdev;	/* sysfs pktcdvd[0-7] class dev */
+	struct device		*dev;		/* sysfs pktcdvd[0-7] dev */
 	struct pktcdvd_kobj	*kobj_stat;	/* sysfs pktcdvd[0-7]/stat/     */
 	struct pktcdvd_kobj	*kobj_wqueue;	/* sysfs pktcdvd[0-7]/write_queue/ */
 

-- 

  parent reply	other threads:[~2007-08-20 22:52 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-20 22:48 [patch 00/14] More patches to convert from struct class_device to struct device tonyj
2007-08-20 22:48 ` [patch 01/14] Convert from class_device to device for block/paride tonyj
2007-08-20 22:48 ` tonyj [this message]
2007-08-21 14:59   ` [patch 02/14] Convert from class_device to device for block/pktcdvd Tony Jones
2007-08-20 22:48 ` [patch 03/14] Convert from class_device to device for block/aoechr tonyj
2007-08-21 14:59   ` Tony Jones
2007-08-20 22:48 ` [patch 04/14] Convert from class_device to device for drivers/macintosh tonyj
2007-08-21 14:59   ` Tony Jones
2007-08-24  5:04   ` Benjamin Herrenschmidt
2007-08-20 22:48 ` [patch 05/14] Convert from class_device to device for cosa sync driver tonyj
2007-08-21 14:59   ` Tony Jones
2007-08-22  9:49     ` Jan Kasprzak
2007-08-20 22:48 ` [patch 06/14] Convert from class_device to device for MTD/mtdchar tonyj
2007-08-21 15:00   ` Tony Jones
2007-08-20 22:48 ` [patch 07/14] Convert from class_device to device for IDE/ide-tape tonyj
2007-08-21 15:00   ` Tony Jones
2007-08-20 22:48 ` [patch 08/14] Convert from class_device to device for DMA engine tonyj
2007-08-21 15:01   ` Tony Jones
2007-08-20 22:48 ` [patch 09/14] Convert from class_device to device for SPI tonyj
2007-08-21 15:01   ` Tony Jones
2007-08-21 18:28     ` David Brownell
2007-08-21 18:48       ` Tony Jones
2007-08-22  3:05       ` Tony Jones
2007-08-23 21:03         ` David Brownell
2007-08-23 22:12           ` Kay Sievers
2007-08-26 19:54             ` David Brownell
2007-08-26 20:20               ` Kay Sievers
2007-08-20 22:48 ` [patch 10/14] Convert from class_device to device for USB core tonyj
2007-08-21 15:01   ` Tony Jones
2007-08-20 22:48 ` [patch 11/14] Convert from class_device to device for USB host tonyj
2007-08-21 18:06   ` Tony Jones
2007-08-25  0:15   ` Greg KH
2007-08-20 22:48 ` [patch 12/14] Convert from class_device to device for TI flash media tonyj
2007-08-21 15:02   ` Tony Jones
2007-08-20 22:48 ` [patch 13/14] Convert from class_device to device for UCB1x00 tonyj
2007-08-21 15:02   ` Tony Jones
2007-08-20 22:48 ` [patch 14/14] Convert from class_device to device for ISDN capi tonyj
2007-08-21  9:14   ` Karsten Keil
2007-08-21 14:56     ` Tony Jones

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=20070820225053.885236000@suse.de \
    --to=tonyj@suse.de \
    --cc=axboe@kernel.dk \
    --cc=kay.sievers@vrfy.org \
    --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