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/dsp56k.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/dsp56k.c')
-rw-r--r-- | drivers/char/dsp56k.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/char/dsp56k.c b/drivers/char/dsp56k.c index 37d6649011ad..26271e3ca823 100644 --- a/drivers/char/dsp56k.c +++ b/drivers/char/dsp56k.c | |||
@@ -144,7 +144,7 @@ static struct dsp56k_device { | |||
144 | int tx_wsize, rx_wsize; | 144 | int tx_wsize, rx_wsize; |
145 | } dsp56k; | 145 | } dsp56k; |
146 | 146 | ||
147 | static struct class_simple *dsp56k_class; | 147 | static struct class *dsp56k_class; |
148 | 148 | ||
149 | static int dsp56k_reset(void) | 149 | static int dsp56k_reset(void) |
150 | { | 150 | { |
@@ -510,12 +510,12 @@ static int __init dsp56k_init_driver(void) | |||
510 | printk("DSP56k driver: Unable to register driver\n"); | 510 | printk("DSP56k driver: Unable to register driver\n"); |
511 | return -ENODEV; | 511 | return -ENODEV; |
512 | } | 512 | } |
513 | dsp56k_class = class_simple_create(THIS_MODULE, "dsp56k"); | 513 | dsp56k_class = class_create(THIS_MODULE, "dsp56k"); |
514 | if (IS_ERR(dsp56k_class)) { | 514 | if (IS_ERR(dsp56k_class)) { |
515 | err = PTR_ERR(dsp56k_class); | 515 | err = PTR_ERR(dsp56k_class); |
516 | goto out_chrdev; | 516 | goto out_chrdev; |
517 | } | 517 | } |
518 | class_simple_device_add(dsp56k_class, MKDEV(DSP56K_MAJOR, 0), NULL, "dsp56k"); | 518 | class_device_create(dsp56k_class, MKDEV(DSP56K_MAJOR, 0), NULL, "dsp56k"); |
519 | 519 | ||
520 | err = devfs_mk_cdev(MKDEV(DSP56K_MAJOR, 0), | 520 | err = devfs_mk_cdev(MKDEV(DSP56K_MAJOR, 0), |
521 | S_IFCHR | S_IRUSR | S_IWUSR, "dsp56k"); | 521 | S_IFCHR | S_IRUSR | S_IWUSR, "dsp56k"); |
@@ -526,8 +526,8 @@ static int __init dsp56k_init_driver(void) | |||
526 | goto out; | 526 | goto out; |
527 | 527 | ||
528 | out_class: | 528 | out_class: |
529 | class_simple_device_remove(MKDEV(DSP56K_MAJOR, 0)); | 529 | class_device_destroy(dsp56k_class, MKDEV(DSP56K_MAJOR, 0)); |
530 | class_simple_destroy(dsp56k_class); | 530 | class_destroy(dsp56k_class); |
531 | out_chrdev: | 531 | out_chrdev: |
532 | unregister_chrdev(DSP56K_MAJOR, "dsp56k"); | 532 | unregister_chrdev(DSP56K_MAJOR, "dsp56k"); |
533 | out: | 533 | out: |
@@ -537,8 +537,8 @@ module_init(dsp56k_init_driver); | |||
537 | 537 | ||
538 | static void __exit dsp56k_cleanup_driver(void) | 538 | static void __exit dsp56k_cleanup_driver(void) |
539 | { | 539 | { |
540 | class_simple_device_remove(MKDEV(DSP56K_MAJOR, 0)); | 540 | class_device_destroy(dsp56k_class, MKDEV(DSP56K_MAJOR, 0)); |
541 | class_simple_destroy(dsp56k_class); | 541 | class_destroy(dsp56k_class); |
542 | unregister_chrdev(DSP56K_MAJOR, "dsp56k"); | 542 | unregister_chrdev(DSP56K_MAJOR, "dsp56k"); |
543 | devfs_remove("dsp56k"); | 543 | devfs_remove("dsp56k"); |
544 | } | 544 | } |