aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wan/cosa.c
diff options
context:
space:
mode:
authorgregkh@suse.de <gregkh@suse.de>2005-03-23 13:01:41 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2005-06-20 18:15:09 -0400
commit56b2293595b2eb52cc2aa2baf92c6cfa8265f9d5 (patch)
tree5cbada5b35b1b87dfd75852c9397a2b14dfbb9d9 /drivers/net/wan/cosa.c
parent8874b414ffe037c39e73bb262ddf69653a13c0a4 (diff)
[PATCH] class: convert drivers/* to use the new class api instead of class_simple
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/net/wan/cosa.c')
-rw-r--r--drivers/net/wan/cosa.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/wan/cosa.c b/drivers/net/wan/cosa.c
index 921a573372e..7ff814fd65d 100644
--- a/drivers/net/wan/cosa.c
+++ b/drivers/net/wan/cosa.c
@@ -235,7 +235,7 @@ static int dma[MAX_CARDS+1];
235static int irq[MAX_CARDS+1] = { -1, -1, -1, -1, -1, -1, 0, }; 235static int irq[MAX_CARDS+1] = { -1, -1, -1, -1, -1, -1, 0, };
236 236
237/* for class stuff*/ 237/* for class stuff*/
238static struct class_simple *cosa_class; 238static struct class *cosa_class;
239 239
240#ifdef MODULE 240#ifdef MODULE
241module_param_array(io, int, NULL, 0); 241module_param_array(io, int, NULL, 0);
@@ -394,19 +394,19 @@ static int __init cosa_init(void)
394 goto out; 394 goto out;
395 } 395 }
396 devfs_mk_dir("cosa"); 396 devfs_mk_dir("cosa");
397 cosa_class = class_simple_create(THIS_MODULE, "cosa"); 397 cosa_class = class_create(THIS_MODULE, "cosa");
398 if (IS_ERR(cosa_class)) { 398 if (IS_ERR(cosa_class)) {
399 err = PTR_ERR(cosa_class); 399 err = PTR_ERR(cosa_class);
400 goto out_chrdev; 400 goto out_chrdev;
401 } 401 }
402 for (i=0; i<nr_cards; i++) { 402 for (i=0; i<nr_cards; i++) {
403 class_simple_device_add(cosa_class, MKDEV(cosa_major, i), 403 class_device_create(cosa_class, MKDEV(cosa_major, i),
404 NULL, "cosa%d", i); 404 NULL, "cosa%d", i);
405 err = devfs_mk_cdev(MKDEV(cosa_major, i), 405 err = devfs_mk_cdev(MKDEV(cosa_major, i),
406 S_IFCHR|S_IRUSR|S_IWUSR, 406 S_IFCHR|S_IRUSR|S_IWUSR,
407 "cosa/%d", i); 407 "cosa/%d", i);
408 if (err) { 408 if (err) {
409 class_simple_device_remove(MKDEV(cosa_major, i)); 409 class_device_destroy(cosa_class, MKDEV(cosa_major, i));
410 goto out_chrdev; 410 goto out_chrdev;
411 } 411 }
412 } 412 }
@@ -427,10 +427,10 @@ static void __exit cosa_exit(void)
427 printk(KERN_INFO "Unloading the cosa module\n"); 427 printk(KERN_INFO "Unloading the cosa module\n");
428 428
429 for (i=0; i<nr_cards; i++) { 429 for (i=0; i<nr_cards; i++) {
430 class_simple_device_remove(MKDEV(cosa_major, i)); 430 class_device_destroy(cosa_class, MKDEV(cosa_major, i));
431 devfs_remove("cosa/%d", i); 431 devfs_remove("cosa/%d", i);
432 } 432 }
433 class_simple_destroy(cosa_class); 433 class_destroy(cosa_class);
434 devfs_remove("cosa"); 434 devfs_remove("cosa");
435 for (cosa=cosa_cards; nr_cards--; cosa++) { 435 for (cosa=cosa_cards; nr_cards--; cosa++) {
436 /* Clean up the per-channel data */ 436 /* Clean up the per-channel data */