diff options
Diffstat (limited to 'drivers/char/tipar.c')
| -rw-r--r-- | drivers/char/tipar.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/char/tipar.c b/drivers/char/tipar.c index 0c5ba9dc9063..659335d80ee7 100644 --- a/drivers/char/tipar.c +++ b/drivers/char/tipar.c | |||
| @@ -90,7 +90,7 @@ static int timeout = TIMAXTIME; /* timeout in tenth of seconds */ | |||
| 90 | static unsigned int tp_count; /* tipar count */ | 90 | static unsigned int tp_count; /* tipar count */ |
| 91 | static unsigned long opened; /* opened devices */ | 91 | static unsigned long opened; /* opened devices */ |
| 92 | 92 | ||
| 93 | static struct class_simple *tipar_class; | 93 | static struct class *tipar_class; |
| 94 | 94 | ||
| 95 | /* --- macros for parport access -------------------------------------- */ | 95 | /* --- macros for parport access -------------------------------------- */ |
| 96 | 96 | ||
| @@ -436,7 +436,7 @@ tipar_register(int nr, struct parport *port) | |||
| 436 | goto out; | 436 | goto out; |
| 437 | } | 437 | } |
| 438 | 438 | ||
| 439 | class_simple_device_add(tipar_class, MKDEV(TIPAR_MAJOR, | 439 | class_device_create(tipar_class, MKDEV(TIPAR_MAJOR, |
| 440 | TIPAR_MINOR + nr), NULL, "par%d", nr); | 440 | TIPAR_MINOR + nr), NULL, "par%d", nr); |
| 441 | /* Use devfs, tree: /dev/ticables/par/[0..2] */ | 441 | /* Use devfs, tree: /dev/ticables/par/[0..2] */ |
| 442 | err = devfs_mk_cdev(MKDEV(TIPAR_MAJOR, TIPAR_MINOR + nr), | 442 | err = devfs_mk_cdev(MKDEV(TIPAR_MAJOR, TIPAR_MINOR + nr), |
| @@ -458,8 +458,8 @@ tipar_register(int nr, struct parport *port) | |||
| 458 | goto out; | 458 | goto out; |
| 459 | 459 | ||
| 460 | out_class: | 460 | out_class: |
| 461 | class_simple_device_remove(MKDEV(TIPAR_MAJOR, TIPAR_MINOR + nr)); | 461 | class_device_destroy(tipar_class, MKDEV(TIPAR_MAJOR, TIPAR_MINOR + nr)); |
| 462 | class_simple_destroy(tipar_class); | 462 | class_destroy(tipar_class); |
| 463 | out: | 463 | out: |
| 464 | return err; | 464 | return err; |
| 465 | } | 465 | } |
| @@ -505,7 +505,7 @@ tipar_init_module(void) | |||
| 505 | /* Use devfs with tree: /dev/ticables/par/[0..2] */ | 505 | /* Use devfs with tree: /dev/ticables/par/[0..2] */ |
| 506 | devfs_mk_dir("ticables/par"); | 506 | devfs_mk_dir("ticables/par"); |
| 507 | 507 | ||
| 508 | tipar_class = class_simple_create(THIS_MODULE, "ticables"); | 508 | tipar_class = class_create(THIS_MODULE, "ticables"); |
| 509 | if (IS_ERR(tipar_class)) { | 509 | if (IS_ERR(tipar_class)) { |
| 510 | err = PTR_ERR(tipar_class); | 510 | err = PTR_ERR(tipar_class); |
| 511 | goto out_chrdev; | 511 | goto out_chrdev; |
| @@ -539,10 +539,10 @@ tipar_cleanup_module(void) | |||
| 539 | if (table[i].dev == NULL) | 539 | if (table[i].dev == NULL) |
| 540 | continue; | 540 | continue; |
| 541 | parport_unregister_device(table[i].dev); | 541 | parport_unregister_device(table[i].dev); |
| 542 | class_simple_device_remove(MKDEV(TIPAR_MAJOR, i)); | 542 | class_device_destroy(tipar_class, MKDEV(TIPAR_MAJOR, i)); |
| 543 | devfs_remove("ticables/par/%d", i); | 543 | devfs_remove("ticables/par/%d", i); |
| 544 | } | 544 | } |
| 545 | class_simple_destroy(tipar_class); | 545 | class_destroy(tipar_class); |
| 546 | devfs_remove("ticables/par"); | 546 | devfs_remove("ticables/par"); |
| 547 | 547 | ||
| 548 | pr_info("tipar: module unloaded\n"); | 548 | pr_info("tipar: module unloaded\n"); |
