Commit d3ceb27c authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: adl_pci9111: remove pci9111_8254_* i/o macros

These macros rely on a local variable having a specific name.
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 886edb0c
......@@ -259,33 +259,6 @@ a multiple of chanlist_len*convert_arg.
#define pci9111_do_set_bits(bits) \
outw(bits, dev->iobase + PCI9111_REGISTER_DIGITAL_IO)
#define pci9111_8254_control_set(flags) \
outb(flags, dev->iobase + PCI9111_REGISTER_8254_CONTROL)
#define pci9111_8254_counter_0_set(data) \
do { \
outb(data & 0xFF, \
dev->iobase + PCI9111_REGISTER_8254_COUNTER_0); \
outb((data >> 8) & 0xFF, \
dev->iobase + PCI9111_REGISTER_8254_COUNTER_0); \
} while (0)
#define pci9111_8254_counter_1_set(data) \
do { \
outb(data & 0xFF, \
dev->iobase + PCI9111_REGISTER_8254_COUNTER_1); \
outb((data >> 8) & 0xFF, \
dev->iobase + PCI9111_REGISTER_8254_COUNTER_1); \
} while (0)
#define pci9111_8254_counter_2_set(data) \
do { \
outb(data & 0xFF, \
dev->iobase + PCI9111_REGISTER_8254_COUNTER_2); \
outb((data >> 8) & 0xFF, \
dev->iobase + PCI9111_REGISTER_8254_COUNTER_2); \
} while (0)
static const struct comedi_lrange pci9111_hr_ai_range = {
5,
{
......@@ -407,25 +380,35 @@ static void pci9111_timer_set(struct comedi_device *dev)
{
struct pci9111_private_data *dev_private = dev->private;
pci9111_8254_control_set(PCI9111_8254_COUNTER_0 |
PCI9111_8254_READ_LOAD_LSB_MSB |
PCI9111_8254_MODE_0 |
PCI9111_8254_BINARY_COUNTER);
outb(PCI9111_8254_COUNTER_0 |
PCI9111_8254_READ_LOAD_LSB_MSB |
PCI9111_8254_MODE_0 |
PCI9111_8254_BINARY_COUNTER,
dev->iobase + PCI9111_REGISTER_8254_CONTROL);
pci9111_8254_control_set(PCI9111_8254_COUNTER_1 |
PCI9111_8254_READ_LOAD_LSB_MSB |
PCI9111_8254_MODE_2 |
PCI9111_8254_BINARY_COUNTER);
outb(PCI9111_8254_COUNTER_1 |
PCI9111_8254_READ_LOAD_LSB_MSB |
PCI9111_8254_MODE_2 |
PCI9111_8254_BINARY_COUNTER,
dev->iobase + PCI9111_REGISTER_8254_CONTROL);
pci9111_8254_control_set(PCI9111_8254_COUNTER_2 |
PCI9111_8254_READ_LOAD_LSB_MSB |
PCI9111_8254_MODE_2 |
PCI9111_8254_BINARY_COUNTER);
outb(PCI9111_8254_COUNTER_2 |
PCI9111_8254_READ_LOAD_LSB_MSB |
PCI9111_8254_MODE_2 |
PCI9111_8254_BINARY_COUNTER,
dev->iobase + PCI9111_REGISTER_8254_CONTROL);
udelay(1);
pci9111_8254_counter_2_set(dev_private->timer_divisor_2);
pci9111_8254_counter_1_set(dev_private->timer_divisor_1);
outb(dev_private->timer_divisor_2 & 0xff,
dev->iobase + PCI9111_REGISTER_8254_COUNTER_2);
outb((dev_private->timer_divisor_2 >> 8) & 0xff,
dev->iobase + PCI9111_REGISTER_8254_COUNTER_2);
outb(dev_private->timer_divisor_1 & 0xff,
dev->iobase + PCI9111_REGISTER_8254_COUNTER_1);
outb((dev_private->timer_divisor_1 >> 8) & 0xff,
dev->iobase + PCI9111_REGISTER_8254_COUNTER_1);
}
enum pci9111_trigger_sources {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment