diff options
author | gregkh@suse.de <gregkh@suse.de> | 2005-03-23 12:53:09 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-06-20 18:15:08 -0400 |
commit | ca8eca6884861c1ce294b05aacfdf9045bba9aff (patch) | |
tree | d155207bb52a56683160aa192765a19d67161c01 /drivers/char/stallion.c | |
parent | deb3697037a7d362d13468a73643e09cbc1615a8 (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/stallion.c')
-rw-r--r-- | drivers/char/stallion.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/char/stallion.c b/drivers/char/stallion.c index b8899f560b5e..951545a6ef2d 100644 --- a/drivers/char/stallion.c +++ b/drivers/char/stallion.c | |||
@@ -719,7 +719,7 @@ static struct file_operations stl_fsiomem = { | |||
719 | 719 | ||
720 | /*****************************************************************************/ | 720 | /*****************************************************************************/ |
721 | 721 | ||
722 | static struct class_simple *stallion_class; | 722 | static struct class *stallion_class; |
723 | 723 | ||
724 | /* | 724 | /* |
725 | * Loadable module initialization stuff. | 725 | * Loadable module initialization stuff. |
@@ -777,13 +777,13 @@ static void __exit stallion_module_exit(void) | |||
777 | } | 777 | } |
778 | for (i = 0; i < 4; i++) { | 778 | for (i = 0; i < 4; i++) { |
779 | devfs_remove("staliomem/%d", i); | 779 | devfs_remove("staliomem/%d", i); |
780 | class_simple_device_remove(MKDEV(STL_SIOMEMMAJOR, i)); | 780 | class_device_destroy(stallion_class, MKDEV(STL_SIOMEMMAJOR, i)); |
781 | } | 781 | } |
782 | devfs_remove("staliomem"); | 782 | devfs_remove("staliomem"); |
783 | if ((i = unregister_chrdev(STL_SIOMEMMAJOR, "staliomem"))) | 783 | if ((i = unregister_chrdev(STL_SIOMEMMAJOR, "staliomem"))) |
784 | printk("STALLION: failed to un-register serial memory device, " | 784 | printk("STALLION: failed to un-register serial memory device, " |
785 | "errno=%d\n", -i); | 785 | "errno=%d\n", -i); |
786 | class_simple_destroy(stallion_class); | 786 | class_destroy(stallion_class); |
787 | 787 | ||
788 | if (stl_tmpwritebuf != (char *) NULL) | 788 | if (stl_tmpwritebuf != (char *) NULL) |
789 | kfree(stl_tmpwritebuf); | 789 | kfree(stl_tmpwritebuf); |
@@ -3090,12 +3090,12 @@ static int __init stl_init(void) | |||
3090 | printk("STALLION: failed to register serial board device\n"); | 3090 | printk("STALLION: failed to register serial board device\n"); |
3091 | devfs_mk_dir("staliomem"); | 3091 | devfs_mk_dir("staliomem"); |
3092 | 3092 | ||
3093 | stallion_class = class_simple_create(THIS_MODULE, "staliomem"); | 3093 | stallion_class = class_create(THIS_MODULE, "staliomem"); |
3094 | for (i = 0; i < 4; i++) { | 3094 | for (i = 0; i < 4; i++) { |
3095 | devfs_mk_cdev(MKDEV(STL_SIOMEMMAJOR, i), | 3095 | devfs_mk_cdev(MKDEV(STL_SIOMEMMAJOR, i), |
3096 | S_IFCHR|S_IRUSR|S_IWUSR, | 3096 | S_IFCHR|S_IRUSR|S_IWUSR, |
3097 | "staliomem/%d", i); | 3097 | "staliomem/%d", i); |
3098 | class_simple_device_add(stallion_class, MKDEV(STL_SIOMEMMAJOR, i), NULL, "staliomem%d", i); | 3098 | class_device_create(stallion_class, MKDEV(STL_SIOMEMMAJOR, i), NULL, "staliomem%d", i); |
3099 | } | 3099 | } |
3100 | 3100 | ||
3101 | stl_serial->owner = THIS_MODULE; | 3101 | stl_serial->owner = THIS_MODULE; |