[PATCH] fix up ipmi code after class_simple.c removal
authorAndrew Morton <akpm@osdl.org>
Thu, 5 May 2005 22:06:38 +0000 (15:06 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 20 Jun 2005 22:15:12 +0000 (15:15 -0700)
Cc: Corey Minyard <minyard@acm.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/char/ipmi/ipmi_devintf.c

index 6dc765dc5413dfe1f0ba58ead7d921899be22194..88d1ad656e99a2df138122225992d7cb91f3d728 100644 (file)
@@ -520,7 +520,7 @@ MODULE_PARM_DESC(ipmi_major, "Sets the major number of the IPMI device.  By"
                 " interface.  Other values will set the major device number"
                 " to that value.");
 
-static struct class_simple *ipmi_class;
+static struct class *ipmi_class;
 
 static void ipmi_new_smi(int if_num)
 {
@@ -529,12 +529,12 @@ static void ipmi_new_smi(int if_num)
        devfs_mk_cdev(dev, S_IFCHR | S_IRUSR | S_IWUSR,
                      "ipmidev/%d", if_num);
 
-       class_simple_device_add(ipmi_class, dev, NULL, "ipmi%d", if_num);
+       class_device_create(ipmi_class, dev, NULL, "ipmi%d", if_num);
 }
 
 static void ipmi_smi_gone(int if_num)
 {
-       class_simple_device_remove(MKDEV(ipmi_major, if_num));
+       class_device_destroy(ipmi_class, MKDEV(ipmi_major, if_num));
        devfs_remove("ipmidev/%d", if_num);
 }
 
@@ -555,7 +555,7 @@ static __init int init_ipmi_devintf(void)
        printk(KERN_INFO "ipmi device interface version "
               IPMI_DEVINTF_VERSION "\n");
 
-       ipmi_class = class_simple_create(THIS_MODULE, "ipmi");
+       ipmi_class = class_create(THIS_MODULE, "ipmi");
        if (IS_ERR(ipmi_class)) {
                printk(KERN_ERR "ipmi: can't register device class\n");
                return PTR_ERR(ipmi_class);
@@ -563,7 +563,7 @@ static __init int init_ipmi_devintf(void)
 
        rv = register_chrdev(ipmi_major, DEVICE_NAME, &ipmi_fops);
        if (rv < 0) {
-               class_simple_destroy(ipmi_class);
+               class_destroy(ipmi_class);
                printk(KERN_ERR "ipmi: can't get major %d\n", ipmi_major);
                return rv;
        }
@@ -577,7 +577,7 @@ static __init int init_ipmi_devintf(void)
        rv = ipmi_smi_watcher_register(&smi_watcher);
        if (rv) {
                unregister_chrdev(ipmi_major, DEVICE_NAME);
-               class_simple_destroy(ipmi_class);
+               class_destroy(ipmi_class);
                printk(KERN_WARNING "ipmi: can't register smi watcher\n");
                return rv;
        }
@@ -588,7 +588,7 @@ module_init(init_ipmi_devintf);
 
 static __exit void cleanup_ipmi(void)
 {
-       class_simple_destroy(ipmi_class);
+       class_destroy(ipmi_class);
        ipmi_smi_watcher_unregister(&smi_watcher);
        devfs_remove(DEVICE_NAME);
        unregister_chrdev(ipmi_major, DEVICE_NAME);