Commit 3e418b7c authored by Chase Southwood's avatar Chase Southwood Committed by Greg Kroah-Hartman

Staging: comedi: addi-data: style cleanups in hwdrv_apci1564.c

This patch cleans up a few trivial style issues, including fixing crazy
indentation problems in the defines near the top of the file, removing a
couple of unneeded braces, and wrapping a couple of long comments onto new
lines to fix lines which were in excess of 80 characters.
Signed-off-by: default avatarChase Southwood <chase.southwood@yahoo.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a7aa94ce
......@@ -72,30 +72,30 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY
/*
* devpriv->i_IobaseAmcc Register Map
*/
#define APCI1564_DI_REG 0x04
#define APCI1564_DI_INT_MODE1_REG 0x08
#define APCI1564_DI_INT_MODE2_REG 0x0c
#define APCI1564_DI_INT_STATUS_REG 0x10
#define APCI1564_DI_IRQ_REG 0x14
#define APCI1564_DO_REG 0x18
#define APCI1564_DO_INT_CTRL_REG 0x1c
#define APCI1564_DO_INT_STATUS_REG 0x20
#define APCI1564_DO_IRQ_REG 0x24
#define APCI1564_WDOG_REG 0x28
#define APCI1564_WDOG_RELOAD_REG 0x2c
#define APCI1564_WDOG_TIMEBASE_REG 0x30
#define APCI1564_WDOG_CTRL_REG 0x34
#define APCI1564_WDOG_STATUS_REG 0x38
#define APCI1564_WDOG_IRQ_REG 0x3c
#define APCI1564_DI_REG 0x04
#define APCI1564_DI_INT_MODE1_REG 0x08
#define APCI1564_DI_INT_MODE2_REG 0x0c
#define APCI1564_DI_INT_STATUS_REG 0x10
#define APCI1564_DI_IRQ_REG 0x14
#define APCI1564_DO_REG 0x18
#define APCI1564_DO_INT_CTRL_REG 0x1c
#define APCI1564_DO_INT_STATUS_REG 0x20
#define APCI1564_DO_IRQ_REG 0x24
#define APCI1564_WDOG_REG 0x28
#define APCI1564_WDOG_RELOAD_REG 0x2c
#define APCI1564_WDOG_TIMEBASE_REG 0x30
#define APCI1564_WDOG_CTRL_REG 0x34
#define APCI1564_WDOG_STATUS_REG 0x38
#define APCI1564_WDOG_IRQ_REG 0x3c
#define APCI1564_WDOG_WARN_TIMEVAL_REG 0x40
#define APCI1564_WDOG_WARN_TIMEBASE_REG 0x44
#define APCI1564_TIMER_REG 0x48
#define APCI1564_TIMER_RELOAD_REG 0x4c
#define APCI1564_WDOG_WARN_TIMEBASE_REG 0x44
#define APCI1564_TIMER_REG 0x48
#define APCI1564_TIMER_RELOAD_REG 0x4c
#define APCI1564_TIMER_TIMEBASE_REG 0x50
#define APCI1564_TIMER_CTRL_REG 0x54
#define APCI1564_TIMER_STATUS_REG 0x58
#define APCI1564_TIMER_IRQ_REG 0x5c
#define APCI1564_TIMER_WARN_TIMEVAL_REG 0x60
#define APCI1564_TIMER_STATUS_REG 0x58
#define APCI1564_TIMER_IRQ_REG 0x5c
#define APCI1564_TIMER_WARN_TIMEVAL_REG 0x60
#define APCI1564_TIMER_WARN_TIMEBASE_REG 0x64
/*
......@@ -156,11 +156,10 @@ static int i_APCI1564_ConfigDigitalInput(struct comedi_device *dev,
data[3] = data[3] << 4;
outl(data[2], devpriv->i_IobaseAmcc + APCI1564_DI_INT_MODE1_REG);
outl(data[3], devpriv->i_IobaseAmcc + APCI1564_DI_INT_MODE2_REG);
if (data[1] == ADDIDATA_OR) {
if (data[1] == ADDIDATA_OR)
outl(0x4, devpriv->i_IobaseAmcc + APCI1564_DI_IRQ_REG);
} else {
else
outl(0x6, devpriv->i_IobaseAmcc + APCI1564_DI_IRQ_REG);
}
} else {
outl(0x0, devpriv->i_IobaseAmcc + APCI1564_DI_INT_MODE1_REG);
outl(0x0, devpriv->i_IobaseAmcc + APCI1564_DI_INT_MODE2_REG);
......@@ -611,14 +610,17 @@ static void v_APCI1564_Interrupt(int irq, void *d)
ui_InterruptStatus_1564 =
inl(devpriv->i_IobaseAmcc + APCI1564_DI_INT_STATUS_REG);
ui_InterruptStatus_1564 = ui_InterruptStatus_1564 & 0X000FFFF0;
send_sig(SIGIO, devpriv->tsk_Current, 0); /* send signal to the sample */
/* send signal to the sample */
send_sig(SIGIO, devpriv->tsk_Current, 0);
/* enable the interrupt */
outl(ui_DI, devpriv->i_IobaseAmcc + APCI1564_DI_IRQ_REG);
return;
}
if (ui_DO == 1) {
/* Check for Digital Output interrupt Type - 1: Vcc interrupt 2: CC interrupt. */
/* Check for Digital Output interrupt Type */
/* 1: VCC interrupt */
/* 2: CC interrupt */
ui_Type = inl(devpriv->i_IobaseAmcc + APCI1564_DO_INT_STATUS_REG) & 0x3;
/* Disable the Interrupt */
outl(0x0, devpriv->i_IobaseAmcc + APCI1564_DO_INT_CTRL_REG);
......
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