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

Commit 96211ca5 authored by Chase Southwood's avatar Chase Southwood Committed by Greg Kroah-Hartman
Browse files

staging: comedi: addi_apci_1564: move apci1564_do_insn_bits() to addi_apci_1564.c



This function is already compliant with the comedi API and is behaving as
comedi core expects.  This patch moves it out of
addi-data/hwdrv_apci1564.c and into the driver proper since no further
work needs to be done on it.

Signed-off-by: default avatarChase Southwood <chase.southwood@gmail.com>
Reviewed-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 36682e57
Loading
Loading
Loading
Loading
+0 −17
Original line number Diff line number Diff line
@@ -170,23 +170,6 @@ static int apci1564_do_config(struct comedi_device *dev,
	return insn->n;
}

static int apci1564_do_insn_bits(struct comedi_device *dev,
				 struct comedi_subdevice *s,
				 struct comedi_insn *insn,
				 unsigned int *data)
{
	struct addi_private *devpriv = dev->private;

	s->state = inl(devpriv->i_IobaseAmcc + APCI1564_DO_REG);

	if (comedi_dio_update_state(s, data))
		outl(s->state, devpriv->i_IobaseAmcc + APCI1564_DO_REG);

	data[1] = s->state;

	return insn->n;
}

/*
 * Configures The Timer, Counter or Watchdog
 *
+17 −0
Original line number Diff line number Diff line
@@ -26,6 +26,23 @@ static int apci1564_di_insn_bits(struct comedi_device *dev,
	return insn->n;
}

static int apci1564_do_insn_bits(struct comedi_device *dev,
				 struct comedi_subdevice *s,
				 struct comedi_insn *insn,
				 unsigned int *data)
{
	struct addi_private *devpriv = dev->private;

	s->state = inl(devpriv->i_IobaseAmcc + APCI1564_DO_REG);

	if (comedi_dio_update_state(s, data))
		outl(s->state, devpriv->i_IobaseAmcc + APCI1564_DO_REG);

	data[1] = s->state;

	return insn->n;
}

static int apci1564_reset(struct comedi_device *dev)
{
	struct addi_private *devpriv = dev->private;