Convert from class_device to device in drivers/char.
Signed-off-by: Tony Jones <tonyj@suse.de>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
                err = PTR_ERR(dsp56k_class);
                goto out_chrdev;
        }
-       class_device_create(dsp56k_class, NULL, MKDEV(DSP56K_MAJOR, 0), NULL, "dsp56k");
+       device_create(dsp56k_class, NULL, MKDEV(DSP56K_MAJOR, 0), "dsp56k");
 
        printk(banner);
        goto out;
 
 static void __exit dsp56k_cleanup_driver(void)
 {
-       class_device_destroy(dsp56k_class, MKDEV(DSP56K_MAJOR, 0));
+       device_destroy(dsp56k_class, MKDEV(DSP56K_MAJOR, 0));
        class_destroy(dsp56k_class);
        unregister_chrdev(DSP56K_MAJOR, "dsp56k");
 }
 
                        iiResetDelay( i2BoardPtrTable[i] );
                        /* free io addresses and Tibet */
                        release_region( ip2config.addr[i], 8 );
-                       class_device_destroy(ip2_class, MKDEV(IP2_IPL_MAJOR, 4 * i));
-                       class_device_destroy(ip2_class, MKDEV(IP2_IPL_MAJOR, 4 * i + 1));
+                       device_destroy(ip2_class, MKDEV(IP2_IPL_MAJOR, 4 * i));
+                       device_destroy(ip2_class, MKDEV(IP2_IPL_MAJOR, 4 * i + 1));
                }
                /* Disable and remove interrupt handler. */
                if ( (ip2config.irq[i] > 0) && have_requested_irq(ip2config.irq[i]) ) { 
                        }
 
                        if ( NULL != ( pB = i2BoardPtrTable[i] ) ) {
-                               class_device_create(ip2_class, NULL,
+                               device_create(ip2_class, NULL,
                                                MKDEV(IP2_IPL_MAJOR, 4 * i),
-                                               NULL, "ipl%d", i);
-                               class_device_create(ip2_class, NULL,
+                                               "ipl%d", i);
+                               device_create(ip2_class, NULL,
                                                MKDEV(IP2_IPL_MAJOR, 4 * i + 1),
-                                               NULL, "stat%d", i);
+                                               "stat%d", i);
 
                            for ( box = 0; box < ABS_MAX_BOXES; ++box )
                            {
 
        entry->dev = dev;
 
        mutex_lock(®_list_mutex);
-       class_device_create(ipmi_class, NULL, dev, device, "ipmi%d", if_num);
+       device_create(ipmi_class, device, dev, "ipmi%d", if_num);
        list_add(&entry->link, ®_list);
        mutex_unlock(®_list_mutex);
 }
                        break;
                }
        }
-       class_device_destroy(ipmi_class, dev);
+       device_destroy(ipmi_class, dev);
        mutex_unlock(®_list_mutex);
 }
 
        mutex_lock(®_list_mutex);
        list_for_each_entry_safe(entry, entry2, ®_list, link) {
                list_del(&entry->link);
-               class_device_destroy(ipmi_class, entry->dev);
+               device_destroy(ipmi_class, entry->dev);
                kfree(entry);
        }
        mutex_unlock(®_list_mutex);
 
 
        istallion_class = class_create(THIS_MODULE, "staliomem");
        for (i = 0; i < 4; i++)
-               class_device_create(istallion_class, NULL,
-                               MKDEV(STL_SIOMEMMAJOR, i),
-                               NULL, "staliomem%d", i);
+               device_create(istallion_class, NULL, MKDEV(STL_SIOMEMMAJOR, i),
+                             "staliomem%d", i);
 
        return 0;
 err_deinit:
        unregister_chrdev(STL_SIOMEMMAJOR, "staliomem");
 
        for (j = 0; j < 4; j++)
-               class_device_destroy(istallion_class, MKDEV(STL_SIOMEMMAJOR,
-                                       j));
+               device_destroy(istallion_class, MKDEV(STL_SIOMEMMAJOR, j));
        class_destroy(istallion_class);
 
        pci_unregister_driver(&stli_pcidriver);
 
        if (reset)
                lp_reset(nr);
 
-       class_device_create(lp_class, NULL, MKDEV(LP_MAJOR, nr), port->dev,
-                               "lp%d", nr);
+       device_create(lp_class, port->dev, MKDEV(LP_MAJOR, nr), "lp%d", nr);
 
        printk(KERN_INFO "lp%d: using %s (%s).\n", nr, port->name, 
               (port->irq == PARPORT_IRQ_NONE)?"polling":"interrupt-driven");
                if (lp_table[offset].dev == NULL)
                        continue;
                parport_unregister_device(lp_table[offset].dev);
-               class_device_destroy(lp_class, MKDEV(LP_MAJOR, offset));
+               device_destroy(lp_class, MKDEV(LP_MAJOR, offset));
        }
        class_destroy(lp_class);
 }
 
                return ret;
        }
 
-       class_device_create(cmm_class, NULL, MKDEV(major, i), NULL,
-                           "cmm%d", i);
+       device_create(cmm_class, NULL, MKDEV(major, i), "cmm%d", i);
 
        return 0;
 }
        dev_table[devno] = NULL;
        kfree(dev);
 
-       class_device_destroy(cmm_class, MKDEV(major, devno));
+       device_destroy(cmm_class, MKDEV(major, devno));
 
        return;
 }
 
                return ret;
        }
 
-       class_device_create(cmx_class, NULL, MKDEV(major, i), NULL,
-                           "cmx%d", i);
+       device_create(cmx_class, NULL, MKDEV(major, i), "cmx%d", i);
 
        return 0;
 }
        dev_table[devno] = NULL;
        kfree(dev);
 
-       class_device_destroy(cmx_class, MKDEV(major, devno));
+       device_destroy(cmx_class, MKDEV(major, devno));
 
        return;
 }
 
                                continue;
                        }
 
-                       class_device_create(snsc_class, NULL, dev, NULL,
-                                               "%s", devname);
+                       device_create(snsc_class, NULL, dev, "%s", devname);
 
                        ia64_sn_irtr_intr_enable(scd->scd_nasid,
                                                 0 /*ignored */ ,
 
        if (IS_ERR(stallion_class))
                printk("STALLION: failed to create class\n");
        for (i = 0; i < 4; i++)
-               class_device_create(stallion_class, NULL,
-                                   MKDEV(STL_SIOMEMMAJOR, i), NULL,
-                                   "staliomem%d", i);
+               device_create(stallion_class, NULL, MKDEV(STL_SIOMEMMAJOR, i),
+                             "staliomem%d", i);
 
        return 0;
 err_unrtty:
        }
 
        for (i = 0; i < 4; i++)
-               class_device_destroy(stallion_class, MKDEV(STL_SIOMEMMAJOR, i));
+               device_destroy(stallion_class, MKDEV(STL_SIOMEMMAJOR, i));
        unregister_chrdev(STL_SIOMEMMAJOR, "staliomem");
        class_destroy(stallion_class);
 
 
                goto out;
        }
 
-       class_device_create(tipar_class, NULL, MKDEV(TIPAR_MAJOR,
-                       TIPAR_MINOR + nr), port->dev, "par%d", nr);
+       device_create(tipar_class, port->dev, MKDEV(TIPAR_MAJOR,
+                       TIPAR_MINOR + nr), "par%d", nr);
 
        /* Display informations */
        pr_info("tipar%d: using %s (%s)\n", nr, port->name, (port->irq ==
                if (table[i].dev == NULL)
                        continue;
                parport_unregister_device(table[i].dev);
-               class_device_destroy(tipar_class, MKDEV(TIPAR_MAJOR, i));
+               device_destroy(tipar_class, MKDEV(TIPAR_MAJOR, i));
        }
        class_destroy(tipar_class);
 
 
        state[i].cur_part = 0;
        for (j = 0; j < MAX_PARTITIONS; ++j)
                state[i].part_stat_rwi[j] = VIOT_IDLE;
-       class_device_create(tape_class, NULL, MKDEV(VIOTAPE_MAJOR, i), NULL,
+       device_create(tape_class, NULL, MKDEV(VIOTAPE_MAJOR, i),
                        "iseries!vt%d", i);
-       class_device_create(tape_class, NULL, MKDEV(VIOTAPE_MAJOR, i | 0x80),
-                       NULL, "iseries!nvt%d", i);
+       device_create(tape_class, NULL, MKDEV(VIOTAPE_MAJOR, i | 0x80),
+                       "iseries!nvt%d", i);
        printk(VIOTAPE_KERN_INFO "tape iseries/vt%d is iSeries "
                        "resource %10.10s type %4.4s, model %3.3s\n",
                        i, viotape_unitinfo[i].rsrcname,
 {
        int i = vdev->unit_address;
 
-       class_device_destroy(tape_class, MKDEV(VIOTAPE_MAJOR, i | 0x80));
-       class_device_destroy(tape_class, MKDEV(VIOTAPE_MAJOR, i));
+       device_destroy(tape_class, MKDEV(VIOTAPE_MAJOR, i | 0x80));
+       device_destroy(tape_class, MKDEV(VIOTAPE_MAJOR, i));
        return 0;
 }