]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
device create: dvb: convert device_create to device_create_drvdata
authorGreg Kroah-Hartman <gregkh@suse.de>
Wed, 21 May 2008 19:52:33 +0000 (12:52 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 22 Jul 2008 04:54:42 +0000 (21:54 -0700)
device_create() is race-prone, so use the race-free
device_create_drvdata() instead as device_create() is going away.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/media/dvb/dvb-core/dvbdev.c

index e208a60c048ad930ebdade3ff274efdbf039fb1f..e7132770a3bfdd656117890d11ff4ee6c9195302 100644 (file)
@@ -233,9 +233,9 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev,
 
        mutex_unlock(&dvbdev_register_lock);
 
-       clsdev = device_create(dvb_class, adap->device,
+       clsdev = device_create_drvdata(dvb_class, adap->device,
                               MKDEV(DVB_MAJOR, nums2minor(adap->num, type, id)),
-                              "dvb%d.%s%d", adap->num, dnames[type], id);
+                              NULL, "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",
                       __func__, adap->num, dnames[type], id, PTR_ERR(clsdev));