For aesthetic reasons, hookup the comedi_device (*open) and (*close)
functions after everything else in the attach has succeeded.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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];
s->range_table = NULL;
s->insn_read = serial2002_encoder_insn_read;
+ dev->open = serial_2002_open;
+ dev->close = serial_2002_close;
+
return 0;
}