diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/coda/psdev.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/fs/coda/psdev.c b/fs/coda/psdev.c index ef001a9313e6..3d1cce3653b8 100644 --- a/fs/coda/psdev.c +++ b/fs/coda/psdev.c | |||
@@ -61,7 +61,7 @@ unsigned long coda_timeout = 30; /* .. secs, then signals will dequeue */ | |||
61 | 61 | ||
62 | 62 | ||
63 | struct venus_comm coda_comms[MAX_CODADEVS]; | 63 | struct venus_comm coda_comms[MAX_CODADEVS]; |
64 | static struct class_simple *coda_psdev_class; | 64 | static struct class *coda_psdev_class; |
65 | 65 | ||
66 | /* | 66 | /* |
67 | * Device operations | 67 | * Device operations |
@@ -363,14 +363,14 @@ static int init_coda_psdev(void) | |||
363 | CODA_PSDEV_MAJOR); | 363 | CODA_PSDEV_MAJOR); |
364 | return -EIO; | 364 | return -EIO; |
365 | } | 365 | } |
366 | coda_psdev_class = class_simple_create(THIS_MODULE, "coda"); | 366 | coda_psdev_class = class_create(THIS_MODULE, "coda"); |
367 | if (IS_ERR(coda_psdev_class)) { | 367 | if (IS_ERR(coda_psdev_class)) { |
368 | err = PTR_ERR(coda_psdev_class); | 368 | err = PTR_ERR(coda_psdev_class); |
369 | goto out_chrdev; | 369 | goto out_chrdev; |
370 | } | 370 | } |
371 | devfs_mk_dir ("coda"); | 371 | devfs_mk_dir ("coda"); |
372 | for (i = 0; i < MAX_CODADEVS; i++) { | 372 | for (i = 0; i < MAX_CODADEVS; i++) { |
373 | class_simple_device_add(coda_psdev_class, MKDEV(CODA_PSDEV_MAJOR,i), | 373 | class_device_create(coda_psdev_class, MKDEV(CODA_PSDEV_MAJOR,i), |
374 | NULL, "cfs%d", i); | 374 | NULL, "cfs%d", i); |
375 | err = devfs_mk_cdev(MKDEV(CODA_PSDEV_MAJOR, i), | 375 | err = devfs_mk_cdev(MKDEV(CODA_PSDEV_MAJOR, i), |
376 | S_IFCHR|S_IRUSR|S_IWUSR, "coda/%d", i); | 376 | S_IFCHR|S_IRUSR|S_IWUSR, "coda/%d", i); |
@@ -382,8 +382,8 @@ static int init_coda_psdev(void) | |||
382 | 382 | ||
383 | out_class: | 383 | out_class: |
384 | for (i = 0; i < MAX_CODADEVS; i++) | 384 | for (i = 0; i < MAX_CODADEVS; i++) |
385 | class_simple_device_remove(MKDEV(CODA_PSDEV_MAJOR, i)); | 385 | class_device_destroy(coda_psdev_class, MKDEV(CODA_PSDEV_MAJOR, i)); |
386 | class_simple_destroy(coda_psdev_class); | 386 | class_destroy(coda_psdev_class); |
387 | out_chrdev: | 387 | out_chrdev: |
388 | unregister_chrdev(CODA_PSDEV_MAJOR, "coda"); | 388 | unregister_chrdev(CODA_PSDEV_MAJOR, "coda"); |
389 | out: | 389 | out: |
@@ -425,10 +425,10 @@ static int __init init_coda(void) | |||
425 | return 0; | 425 | return 0; |
426 | out: | 426 | out: |
427 | for (i = 0; i < MAX_CODADEVS; i++) { | 427 | for (i = 0; i < MAX_CODADEVS; i++) { |
428 | class_simple_device_remove(MKDEV(CODA_PSDEV_MAJOR, i)); | 428 | class_device_destroy(coda_psdev_class, MKDEV(CODA_PSDEV_MAJOR, i)); |
429 | devfs_remove("coda/%d", i); | 429 | devfs_remove("coda/%d", i); |
430 | } | 430 | } |
431 | class_simple_destroy(coda_psdev_class); | 431 | class_destroy(coda_psdev_class); |
432 | devfs_remove("coda"); | 432 | devfs_remove("coda"); |
433 | unregister_chrdev(CODA_PSDEV_MAJOR, "coda"); | 433 | unregister_chrdev(CODA_PSDEV_MAJOR, "coda"); |
434 | coda_sysctl_clean(); | 434 | coda_sysctl_clean(); |
@@ -447,10 +447,10 @@ static void __exit exit_coda(void) | |||
447 | printk("coda: failed to unregister filesystem\n"); | 447 | printk("coda: failed to unregister filesystem\n"); |
448 | } | 448 | } |
449 | for (i = 0; i < MAX_CODADEVS; i++) { | 449 | for (i = 0; i < MAX_CODADEVS; i++) { |
450 | class_simple_device_remove(MKDEV(CODA_PSDEV_MAJOR, i)); | 450 | class_device_destroy(coda_psdev_class, MKDEV(CODA_PSDEV_MAJOR, i)); |
451 | devfs_remove("coda/%d", i); | 451 | devfs_remove("coda/%d", i); |
452 | } | 452 | } |
453 | class_simple_destroy(coda_psdev_class); | 453 | class_destroy(coda_psdev_class); |
454 | devfs_remove("coda"); | 454 | devfs_remove("coda"); |
455 | unregister_chrdev(CODA_PSDEV_MAJOR, "coda"); | 455 | unregister_chrdev(CODA_PSDEV_MAJOR, "coda"); |
456 | coda_sysctl_clean(); | 456 | coda_sysctl_clean(); |