]> err.no Git - linux-2.6/blobdiff - drivers/char/stallion.c
[PATCH] Add missing overflow check in get_blkdev_list
[linux-2.6] / drivers / char / stallion.c
index de166608c59e548f966c4ceaeca3bd1b63d7322c..951545a6ef2d3f4c63a6f8c372fcbe88bbbdb277 100644 (file)
@@ -466,7 +466,7 @@ static int  stl_parsebrd(stlconf_t *confp, char **argp);
 
 static unsigned long stl_atol(char *str);
 
-int            stl_init(void);
+static int     stl_init(void);
 static int     stl_open(struct tty_struct *tty, struct file *filp);
 static void    stl_close(struct tty_struct *tty, struct file *filp);
 static int     stl_write(struct tty_struct *tty, const unsigned char *buf, int count);
@@ -719,7 +719,7 @@ static struct file_operations       stl_fsiomem = {
 
 /*****************************************************************************/
 
-static struct class_simple *stallion_class;
+static struct class *stallion_class;
 
 /*
  *     Loadable module initialization stuff.
@@ -777,13 +777,13 @@ static void __exit stallion_module_exit(void)
        }
        for (i = 0; i < 4; i++) {
                devfs_remove("staliomem/%d", i);
-               class_simple_device_remove(MKDEV(STL_SIOMEMMAJOR, i));
+               class_device_destroy(stallion_class, MKDEV(STL_SIOMEMMAJOR, i));
        }
        devfs_remove("staliomem");
        if ((i = unregister_chrdev(STL_SIOMEMMAJOR, "staliomem")))
                printk("STALLION: failed to un-register serial memory device, "
                        "errno=%d\n", -i);
-       class_simple_destroy(stallion_class);
+       class_destroy(stallion_class);
 
        if (stl_tmpwritebuf != (char *) NULL)
                kfree(stl_tmpwritebuf);
@@ -3063,7 +3063,7 @@ static struct tty_operations stl_ops = {
 
 /*****************************************************************************/
 
-int __init stl_init(void)
+static int __init stl_init(void)
 {
        int i;
        printk(KERN_INFO "%s: version %s\n", stl_drvtitle, stl_drvversion);
@@ -3090,12 +3090,12 @@ int __init stl_init(void)
                printk("STALLION: failed to register serial board device\n");
        devfs_mk_dir("staliomem");
 
-       stallion_class = class_simple_create(THIS_MODULE, "staliomem");
+       stallion_class = class_create(THIS_MODULE, "staliomem");
        for (i = 0; i < 4; i++) {
                devfs_mk_cdev(MKDEV(STL_SIOMEMMAJOR, i),
                                S_IFCHR|S_IRUSR|S_IWUSR,
                                "staliomem/%d", i);
-               class_simple_device_add(stallion_class, MKDEV(STL_SIOMEMMAJOR, i), NULL, "staliomem%d", i);
+               class_device_create(stallion_class, MKDEV(STL_SIOMEMMAJOR, i), NULL, "staliomem%d", i);
        }
 
        stl_serial->owner = THIS_MODULE;