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

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

staging: comedi: cb_das16_cs: cleanup dio subdevice initialization



The digital i/o subdevice is always initialized due to the 'if (1)'.
Simplify the attach by removing the test.

Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5c416ef3
Loading
Loading
Loading
Loading
+7 −11
Original line number Diff line number Diff line
@@ -513,7 +513,6 @@ static int das16cs_attach(struct comedi_device *dev,

	s = dev->subdevices + 2;
	/* digital i/o subdevice */
	if (1) {
	s->type = COMEDI_SUBD_DIO;
	s->subdev_flags = SDF_READABLE | SDF_WRITABLE;
	s->n_chan = 8;
@@ -521,9 +520,6 @@ static int das16cs_attach(struct comedi_device *dev,
	s->range_table = &range_digital;
	s->insn_bits = das16cs_dio_insn_bits;
	s->insn_config = das16cs_dio_insn_config;
	} else {
		s->type = COMEDI_SUBD_UNUSED;
	}

	return 1;
}