device create: coda: 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:41 +0000 (21:54 -0700)
device_create() is race-prone, so use the race-free
device_create_drvdata() instead as device_create() is going away.

Cc: Jan Harkes <jaharkes@cs.cmu.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/coda/psdev.c

index e3eb3556622b6808c6d15515e18e597a0ddc4f5b..40c36f7352a609a061cabdd1704e8074c0e0ee2e 100644 (file)
@@ -362,8 +362,9 @@ static int init_coda_psdev(void)
                goto out_chrdev;
        }               
        for (i = 0; i < MAX_CODADEVS; i++)
-               device_create(coda_psdev_class, NULL,
-                             MKDEV(CODA_PSDEV_MAJOR,i), "cfs%d", i);
+               device_create_drvdata(coda_psdev_class, NULL,
+                                     MKDEV(CODA_PSDEV_MAJOR, i),
+                                     NULL, "cfs%d", i);
        coda_sysctl_init();
        goto out;