]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
staging: comedi: no need to zero out comedi_file_info_table[]
authorIan Abbott <abbotti@mev.co.uk>
Thu, 4 Apr 2013 13:58:43 +0000 (14:58 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 Apr 2013 21:33:16 +0000 (14:33 -0700)
In the comedi core module, `comedi_file_info_table[]` is tentatively
defined in the .bss section, so will already be zeroed out on
initialization.  Don't bother zeroing it out again in the module
initialization function `comedi_init()`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/comedi_fops.c

index 6bcbb52510ef9e2b82ffd8c6cb1b329e40e78ae2..c8a704b92daf8e8e664892e35333fcae1afe535d 100644 (file)
@@ -2432,9 +2432,6 @@ static int __init comedi_init(void)
                return -EINVAL;
        }
 
-       memset(comedi_file_info_table, 0,
-              sizeof(struct comedi_file_info *) * COMEDI_NUM_MINORS);
-
        retval = register_chrdev_region(MKDEV(COMEDI_MAJOR, 0),
                                        COMEDI_NUM_MINORS, "comedi");
        if (retval)