Commit e7ccc452 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: serial2002: hookup the (*open) and (*close) last

For aesthetic reasons, hookup the comedi_device (*open) and (*close)
functions after everything else in the attach has succeeded.
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 81c01c3f
......@@ -751,8 +751,6 @@ static int serial2002_attach(struct comedi_device *dev,
return -ENOMEM;
dev->private = devpriv;
dev->open = serial_2002_open;
dev->close = serial_2002_close;
devpriv->port = it->options[0];
devpriv->speed = it->options[1];
......@@ -806,6 +804,9 @@ static int serial2002_attach(struct comedi_device *dev,
s->range_table = NULL;
s->insn_read = serial2002_encoder_insn_read;
dev->open = serial_2002_open;
dev->close = serial_2002_close;
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment