summaryrefslogtreecommitdiffstats
path: root/drivers/block/pktcdvd.c
diff options
context:
space:
mode:
authorTony Jones <tonyj@suse.de>2007-09-25 02:03:03 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2008-01-24 20:40:06 -0800
commit6013c12be8313b3205b41912d965b03f3b06147d (patch)
tree8763a0e1901d4cad2f947ec49f0626da87c95066 /drivers/block/pktcdvd.c
parentaa2758261469374b598e2a6a2702e000a6ab2fbb (diff)
downloadkernel-crypto-6013c12be8313b3205b41912d965b03f3b06147d.tar.gz
kernel-crypto-6013c12be8313b3205b41912d965b03f3b06147d.tar.xz
kernel-crypto-6013c12be8313b3205b41912d965b03f3b06147d.zip
pktcdvd: Convert from class_device to device for block/pktcdvd
struct class_device is going away, this converts the code to use struct device instead. Signed-off-by: Tony Jones <tonyj@suse.de> Cc: Peter Osterlund <petero2@telia.com> Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/block/pktcdvd.c')
-rw-r--r--drivers/block/pktcdvd.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c
index 3535ef89667..17da6999bef 100644
--- a/drivers/block/pktcdvd.c
+++ b/drivers/block/pktcdvd.c
@@ -301,18 +301,16 @@ static struct kobj_type kobj_pkt_type_wqueue = {
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);
}
}
@@ -322,7 +320,7 @@ static void pkt_sysfs_dev_remove(struct pktcdvd_device *pd)
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);
}