staging: comedi: remove memset() call from comedi_device_init()
authorIan Abbott <abbotti@mev.co.uk>
Thu, 4 Apr 2013 13:58:44 +0000 (14:58 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 Apr 2013 21:33:16 +0000 (14:33 -0700)
`comedi_device_init()` is only called from one place
(`comedi_alloc_board_minor()`) and the `struct comedi_device` has
already been zeroed out by `kzalloc()`.  Don't bother zeroing it out
again with `memset()`.

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 c8a704b92daf8e8e664892e35333fcae1afe535d..f2bfa0efcf74688d00d519d5935a47f7e40aca5f 100644 (file)
@@ -2249,7 +2249,6 @@ EXPORT_SYMBOL(comedi_event);
 
 static void comedi_device_init(struct comedi_device *dev)
 {
-       memset(dev, 0, sizeof(*dev));
        spin_lock_init(&dev->spinlock);
        mutex_init(&dev->mutex);
        dev->minor = -1;