mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 10:31:46 +09:00
staging: comedi: addi_apci_3120: move apci3120_do_insn_bits() to driver source
Move this function from the included hwdrv_apci31210.c source file to the main driver source file. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
196540ee44
commit
ae12280db7
@@ -1031,24 +1031,6 @@ static int apci3120_di_insn_bits(struct comedi_device *dev,
|
||||
return insn->n;
|
||||
}
|
||||
|
||||
static int apci3120_do_insn_bits(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn,
|
||||
unsigned int *data)
|
||||
{
|
||||
struct apci3120_private *devpriv = dev->private;
|
||||
|
||||
if (comedi_dio_update_state(s, data)) {
|
||||
devpriv->do_bits = s->state;
|
||||
outb(APCI3120_CTR0_DO_BITS(devpriv->do_bits),
|
||||
dev->iobase + APCI3120_CTR0_REG);
|
||||
}
|
||||
|
||||
data[1] = s->state;
|
||||
|
||||
return insn->n;
|
||||
}
|
||||
|
||||
static int apci3120_ao_ready(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn,
|
||||
|
||||
@@ -281,6 +281,24 @@ static void apci3120_ai_reset_fifo(struct comedi_device *dev)
|
||||
|
||||
#include "addi-data/hwdrv_apci3120.c"
|
||||
|
||||
static int apci3120_do_insn_bits(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn,
|
||||
unsigned int *data)
|
||||
{
|
||||
struct apci3120_private *devpriv = dev->private;
|
||||
|
||||
if (comedi_dio_update_state(s, data)) {
|
||||
devpriv->do_bits = s->state;
|
||||
outb(APCI3120_CTR0_DO_BITS(devpriv->do_bits),
|
||||
dev->iobase + APCI3120_CTR0_REG);
|
||||
}
|
||||
|
||||
data[1] = s->state;
|
||||
|
||||
return insn->n;
|
||||
}
|
||||
|
||||
static void apci3120_dma_alloc(struct comedi_device *dev)
|
||||
{
|
||||
struct apci3120_private *devpriv = dev->private;
|
||||
|
||||
Reference in New Issue
Block a user