]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
pktcdvd: Convert from class_device to device for block/pktcdvd
authorTony Jones <tonyj@suse.de>
Tue, 25 Sep 2007 00:03:03 +0000 (02:03 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 25 Jan 2008 04:40:06 +0000 (20:40 -0800)
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>
drivers/block/pktcdvd.c
include/linux/pktcdvd.h

index 3535ef896677a28dcc352654c880587e9bc463c2..17da6999bef01baa00b621c67999f5aa48c48bcf 100644 (file)
@@ -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);
 }
 
 
index 5ea4f05683f6c838df23f48c2b8381a054ae7938..04b4d7330e6db16dab77d2317a8754fded181dce 100644 (file)
@@ -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/ */