]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/char/stallion.c
Merge branch 'sg' of git://git.kernel.dk/linux-2.6-block
[linux-2.6-omap-h63xx.git] / drivers / char / stallion.c
index 93d0bb8b4c0fadac7cc6a27e94d9675c2e374849..45758d5b56ef88f3c2700fb218b55d6b71994b90 100644 (file)
@@ -4778,9 +4778,8 @@ static int __init stallion_module_init(void)
        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:
@@ -4795,7 +4794,6 @@ static void __exit stallion_module_exit(void)
 {
        struct stlbrd *brdp;
        unsigned int i, j;
-       int retval;
 
        pr_debug("cleanup_module()\n");
 
@@ -4817,10 +4815,8 @@ static void __exit stallion_module_exit(void)
        }
 
        for (i = 0; i < 4; i++)
-               class_device_destroy(stallion_class, MKDEV(STL_SIOMEMMAJOR, i));
-       if ((retval = unregister_chrdev(STL_SIOMEMMAJOR, "staliomem")))
-               printk("STALLION: failed to un-register serial memory device, "
-                       "errno=%d\n", -retval);
+               device_destroy(stallion_class, MKDEV(STL_SIOMEMMAJOR, i));
+       unregister_chrdev(STL_SIOMEMMAJOR, "staliomem");
        class_destroy(stallion_class);
 
        pci_unregister_driver(&stl_pcidriver);