aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2005-05-05 18:06:38 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2005-06-20 18:15:12 -0400
commiteb51b65005737b777e0709683b061d5f82aefd97 (patch)
tree1e458e31a6c07da7c245c3e10293c7c7459c390f
parent733a366c34aea88def75dee478f92233410ab3c4 (diff)
[PATCH] fix up ipmi code after class_simple.c removal
Cc: Corey Minyard <minyard@acm.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/char/ipmi/ipmi_devintf.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/char/ipmi/ipmi_devintf.c b/drivers/char/ipmi/ipmi_devintf.c
index 6dc765dc5413..88d1ad656e99 100644
--- a/drivers/char/ipmi/ipmi_devintf.c
+++ b/drivers/char/ipmi/ipmi_devintf.c
@@ -520,7 +520,7 @@ MODULE_PARM_DESC(ipmi_major, "Sets the major number of the IPMI device. By"
520 " interface. Other values will set the major device number" 520 " interface. Other values will set the major device number"
521 " to that value."); 521 " to that value.");
522 522
523static struct class_simple *ipmi_class; 523static struct class *ipmi_class;
524 524
525static void ipmi_new_smi(int if_num) 525static void ipmi_new_smi(int if_num)
526{ 526{
@@ -529,12 +529,12 @@ static void ipmi_new_smi(int if_num)
529 devfs_mk_cdev(dev, S_IFCHR | S_IRUSR | S_IWUSR, 529 devfs_mk_cdev(dev, S_IFCHR | S_IRUSR | S_IWUSR,
530 "ipmidev/%d", if_num); 530 "ipmidev/%d", if_num);
531 531
532 class_simple_device_add(ipmi_class, dev, NULL, "ipmi%d", if_num); 532 class_device_create(ipmi_class, dev, NULL, "ipmi%d", if_num);
533} 533}
534 534
535static void ipmi_smi_gone(int if_num) 535static void ipmi_smi_gone(int if_num)
536{ 536{
537 class_simple_device_remove(MKDEV(ipmi_major, if_num)); 537 class_device_destroy(ipmi_class, MKDEV(ipmi_major, if_num));
538 devfs_remove("ipmidev/%d", if_num); 538 devfs_remove("ipmidev/%d", if_num);
539} 539}
540 540
@@ -555,7 +555,7 @@ static __init int init_ipmi_devintf(void)
555 printk(KERN_INFO "ipmi device interface version " 555 printk(KERN_INFO "ipmi device interface version "
556 IPMI_DEVINTF_VERSION "\n"); 556 IPMI_DEVINTF_VERSION "\n");
557 557
558 ipmi_class = class_simple_create(THIS_MODULE, "ipmi"); 558 ipmi_class = class_create(THIS_MODULE, "ipmi");
559 if (IS_ERR(ipmi_class)) { 559 if (IS_ERR(ipmi_class)) {
560 printk(KERN_ERR "ipmi: can't register device class\n"); 560 printk(KERN_ERR "ipmi: can't register device class\n");
561 return PTR_ERR(ipmi_class); 561 return PTR_ERR(ipmi_class);
@@ -563,7 +563,7 @@ static __init int init_ipmi_devintf(void)
563 563
564 rv = register_chrdev(ipmi_major, DEVICE_NAME, &ipmi_fops); 564 rv = register_chrdev(ipmi_major, DEVICE_NAME, &ipmi_fops);
565 if (rv < 0) { 565 if (rv < 0) {
566 class_simple_destroy(ipmi_class); 566 class_destroy(ipmi_class);
567 printk(KERN_ERR "ipmi: can't get major %d\n", ipmi_major); 567 printk(KERN_ERR "ipmi: can't get major %d\n", ipmi_major);
568 return rv; 568 return rv;
569 } 569 }
@@ -577,7 +577,7 @@ static __init int init_ipmi_devintf(void)
577 rv = ipmi_smi_watcher_register(&smi_watcher); 577 rv = ipmi_smi_watcher_register(&smi_watcher);
578 if (rv) { 578 if (rv) {
579 unregister_chrdev(ipmi_major, DEVICE_NAME); 579 unregister_chrdev(ipmi_major, DEVICE_NAME);
580 class_simple_destroy(ipmi_class); 580 class_destroy(ipmi_class);
581 printk(KERN_WARNING "ipmi: can't register smi watcher\n"); 581 printk(KERN_WARNING "ipmi: can't register smi watcher\n");
582 return rv; 582 return rv;
583 } 583 }
@@ -588,7 +588,7 @@ module_init(init_ipmi_devintf);
588 588
589static __exit void cleanup_ipmi(void) 589static __exit void cleanup_ipmi(void)
590{ 590{
591 class_simple_destroy(ipmi_class); 591 class_destroy(ipmi_class);
592 ipmi_smi_watcher_unregister(&smi_watcher); 592 ipmi_smi_watcher_unregister(&smi_watcher);
593 devfs_remove(DEVICE_NAME); 593 devfs_remove(DEVICE_NAME);
594 unregister_chrdev(ipmi_major, DEVICE_NAME); 594 unregister_chrdev(ipmi_major, DEVICE_NAME);