aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorTony Jones <tonyj@suse.de>2007-09-24 20:03:03 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2008-01-24 23:40:06 -0500
commit6013c12be8313b3205b41912d965b03f3b06147d (patch)
tree8763a0e1901d4cad2f947ec49f0626da87c95066 /drivers/block
parentaa2758261469374b598e2a6a2702e000a6ab2fbb (diff)
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')
-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 3535ef896677..17da6999bef0 100644
--- a/drivers/block/pktcdvd.c
+++ b/drivers/block/pktcdvd.c
@@ -301,18 +301,16 @@ static struct kobj_type kobj_pkt_type_wqueue = {
301static void pkt_sysfs_dev_new(struct pktcdvd_device *pd) 301static void pkt_sysfs_dev_new(struct pktcdvd_device *pd)
302{ 302{
303 if (class_pktcdvd) { 303 if (class_pktcdvd) {
304 pd->clsdev = class_device_create(class_pktcdvd, 304 pd->dev = device_create(class_pktcdvd, NULL, pd->pkt_dev, "%s", pd->name);
305 NULL, pd->pkt_dev, 305 if (IS_ERR(pd->dev))
306 NULL, "%s", pd->name); 306 pd->dev = NULL;
307 if (IS_ERR(pd->clsdev))
308 pd->clsdev = NULL;
309 } 307 }
310 if (pd->clsdev) { 308 if (pd->dev) {
311 pd->kobj_stat = pkt_kobj_create(pd, "stat", 309 pd->kobj_stat = pkt_kobj_create(pd, "stat",
312 &pd->clsdev->kobj, 310 &pd->dev->kobj,
313 &kobj_pkt_type_stat); 311 &kobj_pkt_type_stat);
314 pd->kobj_wqueue = pkt_kobj_create(pd, "write_queue", 312 pd->kobj_wqueue = pkt_kobj_create(pd, "write_queue",
315 &pd->clsdev->kobj, 313 &pd->dev->kobj,
316 &kobj_pkt_type_wqueue); 314 &kobj_pkt_type_wqueue);
317 } 315 }
318} 316}
@@ -322,7 +320,7 @@ static void pkt_sysfs_dev_remove(struct pktcdvd_device *pd)
322 pkt_kobj_remove(pd->kobj_stat); 320 pkt_kobj_remove(pd->kobj_stat);
323 pkt_kobj_remove(pd->kobj_wqueue); 321 pkt_kobj_remove(pd->kobj_wqueue);
324 if (class_pktcdvd) 322 if (class_pktcdvd)
325 class_device_destroy(class_pktcdvd, pd->pkt_dev); 323 device_destroy(class_pktcdvd, pd->pkt_dev);
326} 324}
327 325
328 326