Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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;
}