提交 4ca7da6e 编写于 作者: I Ian Abbott 提交者: Greg Kroah-Hartman

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: NIan Abbott <abbotti@mev.co.uk>
Reviewed-by: NH Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 91622200
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册