From: Ian Abbott Date: Thu, 4 Apr 2013 13:58:44 +0000 (+0100) Subject: staging: comedi: remove memset() call from comedi_device_init() X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=4ca7da6e8234c864c8694237c26e4d574b9fd00a;p=openwrt%2Fstaging%2Fblogic.git staging: comedi: remove memset() call from comedi_device_init() `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 Reviewed-by: H Hartley Sweeten Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c index c8a704b92daf..f2bfa0efcf74 100644 --- a/drivers/staging/comedi/comedi_fops.c +++ b/drivers/staging/comedi/comedi_fops.c @@ -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;