aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/tipar.c
diff options
context:
space:
mode:
authorgregkh@suse.de <gregkh@suse.de>2005-03-23 12:53:09 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2005-06-20 18:15:08 -0400
commitca8eca6884861c1ce294b05aacfdf9045bba9aff (patch)
treed155207bb52a56683160aa192765a19d67161c01 /drivers/char/tipar.c
parentdeb3697037a7d362d13468a73643e09cbc1615a8 (diff)
[PATCH] class: convert drivers/char/* to use the new class api instead of class_simple
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/char/tipar.c')
-rw-r--r--drivers/char/tipar.c14
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 */
90static unsigned int tp_count; /* tipar count */ 90static unsigned int tp_count; /* tipar count */
91static unsigned long opened; /* opened devices */ 91static unsigned long opened; /* opened devices */
92 92
93static struct class_simple *tipar_class; 93static 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
460out_class: 460out_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);
463out: 463out:
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");