Skip to content

Commit

Permalink
device create: coda: convert device_create to device_create_drvdata
Browse files Browse the repository at this point in the history
device_create() is race-prone, so use the race-free
device_create_drvdata() instead as device_create() is going away.

Cc: Jan Harkes <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
gregkh committed Jul 22, 2008
1 parent 47aa579 commit 6143b59
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions fs/coda/psdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 6143b59

Please sign in to comment.