]> err.no Git - linux-2.6/commitdiff
V4L/DVB (6015): DVB: convert struct class_device to struct device
authorKay Sievers <kay.sievers@vrfy.org>
Wed, 15 Aug 2007 17:00:09 +0000 (14:00 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Wed, 10 Oct 2007 01:05:11 +0000 (22:05 -0300)
The currently used "struct class_device" will be removed from the
kernel. Here is a trivial patch that converts DVB to use struct device.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/dvb/dvb-core/dvbdev.c

index 9ef0c00605ee80a3d4a08b14f4be7f826a50d91f..0f18ce8a939796e9b8f6c5b95e49144cac5cfdb2 100644 (file)
@@ -200,7 +200,7 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev,
 {
        struct dvb_device *dvbdev;
        struct file_operations *dvbdevfops;
-       struct class_device *clsdev;
+       struct device *clsdev;
        int id;
 
        mutex_lock(&dvbdev_register_lock);
@@ -242,10 +242,9 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev,
 
        mutex_unlock(&dvbdev_register_lock);
 
-       clsdev = class_device_create(dvb_class, NULL, MKDEV(DVB_MAJOR,
-                                    nums2minor(adap->num, type, id)),
-                                    adap->device, "dvb%d.%s%d", adap->num,
-                                    dnames[type], id);
+       clsdev = device_create(dvb_class, adap->device,
+                              MKDEV(DVB_MAJOR, nums2minor(adap->num, type, id)),
+                              "dvb%d.%s%d", adap->num, dnames[type], id);
        if (IS_ERR(clsdev)) {
                printk(KERN_ERR "%s: failed to create device dvb%d.%s%d (%ld)\n",
                       __FUNCTION__, adap->num, dnames[type], id, PTR_ERR(clsdev));
@@ -266,8 +265,8 @@ void dvb_unregister_device(struct dvb_device *dvbdev)
        if (!dvbdev)
                return;
 
-       class_device_destroy(dvb_class, MKDEV(DVB_MAJOR, nums2minor(dvbdev->adapter->num,
-                                       dvbdev->type, dvbdev->id)));
+       device_destroy(dvb_class, MKDEV(DVB_MAJOR, nums2minor(dvbdev->adapter->num,
+                      dvbdev->type, dvbdev->id)));
 
        list_del (&dvbdev->list_head);
        kfree (dvbdev->fops);