Commit 0110c443 authored by Bill Pemberton's avatar Bill Pemberton Committed by Greg Kroah-Hartman

Staging: comedi: remove C99 comments in APCI1710_Pwm.c

Signed-off-by: default avatarBill Pemberton <wfp5p@virginia.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent c47375f3
...@@ -79,29 +79,29 @@ int i_APCI1710_InsnConfigPWM(struct comedi_device * dev, struct comedi_subdevice ...@@ -79,29 +79,29 @@ int i_APCI1710_InsnConfigPWM(struct comedi_device * dev, struct comedi_subdevice
switch (b_ConfigType) { switch (b_ConfigType) {
case APCI1710_PWM_INIT: case APCI1710_PWM_INIT:
i_ReturnValue = i_APCI1710_InitPWM(dev, (unsigned char) CR_AREF(insn->chanspec), // b_ModulNbr i_ReturnValue = i_APCI1710_InitPWM(dev, (unsigned char) CR_AREF(insn->chanspec), /* b_ModulNbr */
(unsigned char) data[0], //b_PWM (unsigned char) data[0], /* b_PWM */
(unsigned char) data[1], // b_ClockSelection (unsigned char) data[1], /* b_ClockSelection */
(unsigned char) data[2], // b_TimingUnit (unsigned char) data[2], /* b_TimingUnit */
(unsigned int) data[3], //ul_LowTiming (unsigned int) data[3], /* ul_LowTiming */
(unsigned int) data[4], //ul_HighTiming (unsigned int) data[4], /* ul_HighTiming */
(unsigned int *) & data[0], //pul_RealLowTiming (unsigned int *) & data[0], /* pul_RealLowTiming */
(unsigned int *) & data[1] //pul_RealHighTiming (unsigned int *) & data[1] /* pul_RealHighTiming */
); );
break; break;
case APCI1710_PWM_GETINITDATA: case APCI1710_PWM_GETINITDATA:
i_ReturnValue = i_APCI1710_GetPWMInitialisation(dev, (unsigned char) CR_AREF(insn->chanspec), // b_ModulNbr i_ReturnValue = i_APCI1710_GetPWMInitialisation(dev, (unsigned char) CR_AREF(insn->chanspec), /* b_ModulNbr */
(unsigned char) data[0], //b_PWM (unsigned char) data[0], /* b_PWM */
(unsigned char *) & data[0], //pb_TimingUnit (unsigned char *) & data[0], /* pb_TimingUnit */
(unsigned int *) & data[1], //pul_LowTiming (unsigned int *) & data[1], /* pul_LowTiming */
(unsigned int *) & data[2], //pul_HighTiming (unsigned int *) & data[2], /* pul_HighTiming */
(unsigned char *) & data[3], // pb_StartLevel (unsigned char *) & data[3], /* pb_StartLevel */
(unsigned char *) & data[4], // pb_StopMode (unsigned char *) & data[4], /* pb_StopMode */
(unsigned char *) & data[5], // pb_StopLevel (unsigned char *) & data[5], /* pb_StopLevel */
(unsigned char *) & data[6], // pb_ExternGate (unsigned char *) & data[6], /* pb_ExternGate */
(unsigned char *) & data[7], // pb_InterruptEnable (unsigned char *) & data[7], /* pb_InterruptEnable */
(unsigned char *) & data[8] // pb_Enable (unsigned char *) & data[8] /* pb_Enable */
); );
break; break;
...@@ -1397,30 +1397,30 @@ int i_APCI1710_InitPWM(struct comedi_device * dev, ...@@ -1397,30 +1397,30 @@ int i_APCI1710_InitPWM(struct comedi_device * dev,
DPRINTK("Low base timing selection is wrong\n"); DPRINTK("Low base timing selection is wrong\n");
i_ReturnValue = -7; i_ReturnValue = -7;
} }
} // if ((b_TimingUnit >= 0) && (b_TimingUnit <= 4)) } /* if ((b_TimingUnit >= 0) && (b_TimingUnit <= 4)) */
else { else {
/**********************************/ /**********************************/
/* Timing unit selection is wrong */ /* Timing unit selection is wrong */
/**********************************/ /**********************************/
DPRINTK("Timing unit selection is wrong\n"); DPRINTK("Timing unit selection is wrong\n");
i_ReturnValue = -6; i_ReturnValue = -6;
} // if ((b_TimingUnit >= 0) && (b_TimingUnit <= 4)) } /* if ((b_TimingUnit >= 0) && (b_TimingUnit <= 4)) */
} // if ((b_ClockSelection == APCI1710_30MHZ) || (b_ClockSelection == APCI1710_33MHZ) || (b_ClockSelection == APCI1710_40MHZ)) } /* if ((b_ClockSelection == APCI1710_30MHZ) || (b_ClockSelection == APCI1710_33MHZ) || (b_ClockSelection == APCI1710_40MHZ)) */
else { else {
/*******************************/ /*******************************/
/* The selected clock is wrong */ /* The selected clock is wrong */
/*******************************/ /*******************************/
DPRINTK("The selected clock is wrong\n"); DPRINTK("The selected clock is wrong\n");
i_ReturnValue = -5; i_ReturnValue = -5;
} // if ((b_ClockSelection == APCI1710_30MHZ) || (b_ClockSelection == APCI1710_33MHZ) || (b_ClockSelection == APCI1710_40MHZ)) } /* if ((b_ClockSelection == APCI1710_30MHZ) || (b_ClockSelection == APCI1710_33MHZ) || (b_ClockSelection == APCI1710_40MHZ)) */
} // if (b_PWM >= 0 && b_PWM <= 1) } /* if (b_PWM >= 0 && b_PWM <= 1) */
else { else {
/******************************/ /******************************/
/* Tor PWM selection is wrong */ /* Tor PWM selection is wrong */
/******************************/ /******************************/
DPRINTK("Tor PWM selection is wrong\n"); DPRINTK("Tor PWM selection is wrong\n");
i_ReturnValue = -4; i_ReturnValue = -4;
} // if (b_PWM >= 0 && b_PWM <= 1) } /* if (b_PWM >= 0 && b_PWM <= 1) */
} else { } else {
/**********************************/ /**********************************/
/* The module is not a PWM module */ /* The module is not a PWM module */
...@@ -1634,22 +1634,22 @@ int i_APCI1710_GetPWMInitialisation(struct comedi_device * dev, ...@@ -1634,22 +1634,22 @@ int i_APCI1710_GetPWMInitialisation(struct comedi_device * dev,
s_ModuleInfo[b_ModulNbr]. s_ModuleInfo[b_ModulNbr].
s_PWMModuleInfo. s_PWMModuleInfo.
s_PWMInfo[b_PWM].b_TimingUnit; s_PWMInfo[b_PWM].b_TimingUnit;
} // if (dw_Status & 0x10) } /* if (dw_Status & 0x10) */
else { else {
/***********************/ /***********************/
/* PWM not initialised */ /* PWM not initialised */
/***********************/ /***********************/
DPRINTK("PWM not initialised\n"); DPRINTK("PWM not initialised\n");
i_ReturnValue = -5; i_ReturnValue = -5;
} // if (dw_Status & 0x10) } /* if (dw_Status & 0x10) */
} // if (b_PWM >= 0 && b_PWM <= 1) } /* if (b_PWM >= 0 && b_PWM <= 1) */
else { else {
/******************************/ /******************************/
/* Tor PWM selection is wrong */ /* Tor PWM selection is wrong */
/******************************/ /******************************/
DPRINTK("Tor PWM selection is wrong\n"); DPRINTK("Tor PWM selection is wrong\n");
i_ReturnValue = -4; i_ReturnValue = -4;
} // if (b_PWM >= 0 && b_PWM <= 1) } /* if (b_PWM >= 0 && b_PWM <= 1) */
} else { } else {
/**********************************/ /**********************************/
/* The module is not a PWM module */ /* The module is not a PWM module */
...@@ -1817,7 +1817,7 @@ int i_APCI1710_EnablePWM(struct comedi_device * dev, ...@@ -1817,7 +1817,7 @@ int i_APCI1710_EnablePWM(struct comedi_device * dev,
unsigned int dw_Status; unsigned int dw_Status;
unsigned int dw_Command; unsigned int dw_Command;
devpriv->tsk_Current = current; // Save the current process task structure devpriv->tsk_Current = current; /* Save the current process task structure */
/**************************/ /**************************/
/* Test the module number */ /* Test the module number */
/**************************/ /**************************/
...@@ -1953,7 +1953,7 @@ int i_APCI1710_EnablePWM(struct comedi_device * dev, ...@@ -1953,7 +1953,7 @@ int i_APCI1710_EnablePWM(struct comedi_device * dev,
/* Enable the PWM */ /* Enable the PWM */
/******************/ /******************/
outl(1, devpriv->s_BoardInfos.ui_Address + 12 + (20 * b_PWM) + (64 * b_ModulNbr)); outl(1, devpriv->s_BoardInfos.ui_Address + 12 + (20 * b_PWM) + (64 * b_ModulNbr));
} // if (b_InterruptEnable == APCI1710_ENABLE || b_InterruptEnable == APCI1710_DISABLE) } /* if (b_InterruptEnable == APCI1710_ENABLE || b_InterruptEnable == APCI1710_DISABLE) */
else { else {
/********************************/ /********************************/
/* Interrupt parameter is wrong */ /* Interrupt parameter is wrong */
...@@ -1962,8 +1962,8 @@ int i_APCI1710_EnablePWM(struct comedi_device * dev, ...@@ -1962,8 +1962,8 @@ int i_APCI1710_EnablePWM(struct comedi_device * dev,
i_ReturnValue i_ReturnValue
= =
-10; -10;
} // if (b_InterruptEnable == APCI1710_ENABLE || b_InterruptEnable == APCI1710_DISABLE) } /* if (b_InterruptEnable == APCI1710_ENABLE || b_InterruptEnable == APCI1710_DISABLE) */
} // if (b_ExternGate >= 0 && b_ExternGate <= 1) } /* if (b_ExternGate >= 0 && b_ExternGate <= 1) */
else { else {
/*****************************************/ /*****************************************/
/* Extern gate signal selection is wrong */ /* Extern gate signal selection is wrong */
...@@ -1972,8 +1972,8 @@ int i_APCI1710_EnablePWM(struct comedi_device * dev, ...@@ -1972,8 +1972,8 @@ int i_APCI1710_EnablePWM(struct comedi_device * dev,
i_ReturnValue i_ReturnValue
= =
-9; -9;
} // if (b_ExternGate >= 0 && b_ExternGate <= 1) } /* if (b_ExternGate >= 0 && b_ExternGate <= 1) */
} // if (b_StopLevel >= 0 && b_StopLevel <= 2) } /* if (b_StopLevel >= 0 && b_StopLevel <= 2) */
else { else {
/*************************************/ /*************************************/
/* PWM stop level selection is wrong */ /* PWM stop level selection is wrong */
...@@ -1981,39 +1981,39 @@ int i_APCI1710_EnablePWM(struct comedi_device * dev, ...@@ -1981,39 +1981,39 @@ int i_APCI1710_EnablePWM(struct comedi_device * dev,
DPRINTK("PWM stop level selection is wrong\n"); DPRINTK("PWM stop level selection is wrong\n");
i_ReturnValue = i_ReturnValue =
-8; -8;
} // if (b_StopLevel >= 0 && b_StopLevel <= 2) } /* if (b_StopLevel >= 0 && b_StopLevel <= 2) */
} // if (b_StopMode >= 0 && b_StopMode <= 1) } /* if (b_StopMode >= 0 && b_StopMode <= 1) */
else { else {
/************************************/ /************************************/
/* PWM stop mode selection is wrong */ /* PWM stop mode selection is wrong */
/************************************/ /************************************/
DPRINTK("PWM stop mode selection is wrong\n"); DPRINTK("PWM stop mode selection is wrong\n");
i_ReturnValue = -7; i_ReturnValue = -7;
} // if (b_StopMode >= 0 && b_StopMode <= 1) } /* if (b_StopMode >= 0 && b_StopMode <= 1) */
} // if (b_StartLevel >= 0 && b_StartLevel <= 1) } /* if (b_StartLevel >= 0 && b_StartLevel <= 1) */
else { else {
/**************************************/ /**************************************/
/* PWM start level selection is wrong */ /* PWM start level selection is wrong */
/**************************************/ /**************************************/
DPRINTK("PWM start level selection is wrong\n"); DPRINTK("PWM start level selection is wrong\n");
i_ReturnValue = -6; i_ReturnValue = -6;
} // if (b_StartLevel >= 0 && b_StartLevel <= 1) } /* if (b_StartLevel >= 0 && b_StartLevel <= 1) */
} // if (dw_Status & 0x10) } /* if (dw_Status & 0x10) */
else { else {
/***********************/ /***********************/
/* PWM not initialised */ /* PWM not initialised */
/***********************/ /***********************/
DPRINTK("PWM not initialised\n"); DPRINTK("PWM not initialised\n");
i_ReturnValue = -5; i_ReturnValue = -5;
} // if (dw_Status & 0x10) } /* if (dw_Status & 0x10) */
} // if (b_PWM >= 0 && b_PWM <= 1) } /* if (b_PWM >= 0 && b_PWM <= 1) */
else { else {
/******************************/ /******************************/
/* Tor PWM selection is wrong */ /* Tor PWM selection is wrong */
/******************************/ /******************************/
DPRINTK("Tor PWM selection is wrong\n"); DPRINTK("Tor PWM selection is wrong\n");
i_ReturnValue = -4; i_ReturnValue = -4;
} // if (b_PWM >= 0 && b_PWM <= 1) } /* if (b_PWM >= 0 && b_PWM <= 1) */
} else { } else {
/**********************************/ /**********************************/
/* The module is not a PWM module */ /* The module is not a PWM module */
...@@ -2105,30 +2105,30 @@ int i_APCI1710_DisablePWM(struct comedi_device * dev, unsigned char b_ModulNbr, ...@@ -2105,30 +2105,30 @@ int i_APCI1710_DisablePWM(struct comedi_device * dev, unsigned char b_ModulNbr,
ui_Address + 12 + ui_Address + 12 +
(20 * b_PWM) + (20 * b_PWM) +
(64 * b_ModulNbr)); (64 * b_ModulNbr));
} // if (dw_Status & 0x1) } /* if (dw_Status & 0x1) */
else { else {
/*******************/ /*******************/
/* PWM not enabled */ /* PWM not enabled */
/*******************/ /*******************/
DPRINTK("PWM not enabled\n"); DPRINTK("PWM not enabled\n");
i_ReturnValue = -6; i_ReturnValue = -6;
} // if (dw_Status & 0x1) } /* if (dw_Status & 0x1) */
} // if (dw_Status & 0x10) } /* if (dw_Status & 0x10) */
else { else {
/***********************/ /***********************/
/* PWM not initialised */ /* PWM not initialised */
/***********************/ /***********************/
DPRINTK(" PWM not initialised\n"); DPRINTK(" PWM not initialised\n");
i_ReturnValue = -5; i_ReturnValue = -5;
} // if (dw_Status & 0x10) } /* if (dw_Status & 0x10) */
} // if (b_PWM >= 0 && b_PWM <= 1) } /* if (b_PWM >= 0 && b_PWM <= 1) */
else { else {
/******************************/ /******************************/
/* Tor PWM selection is wrong */ /* Tor PWM selection is wrong */
/******************************/ /******************************/
DPRINTK("Tor PWM selection is wrong\n"); DPRINTK("Tor PWM selection is wrong\n");
i_ReturnValue = -4; i_ReturnValue = -4;
} // if (b_PWM >= 0 && b_PWM <= 1) } /* if (b_PWM >= 0 && b_PWM <= 1) */
} else { } else {
/**********************************/ /**********************************/
/* The module is not a PWM module */ /* The module is not a PWM module */
...@@ -3372,30 +3372,30 @@ int i_APCI1710_SetNewPWMTiming(struct comedi_device * dev, ...@@ -3372,30 +3372,30 @@ int i_APCI1710_SetNewPWMTiming(struct comedi_device * dev,
DPRINTK("Low base timing selection is wrong\n"); DPRINTK("Low base timing selection is wrong\n");
i_ReturnValue = -7; i_ReturnValue = -7;
} }
} // if ((b_TimingUnit >= 0) && (b_TimingUnit <= 4)) } /* if ((b_TimingUnit >= 0) && (b_TimingUnit <= 4)) */
else { else {
/**********************************/ /**********************************/
/* Timing unit selection is wrong */ /* Timing unit selection is wrong */
/**********************************/ /**********************************/
DPRINTK("Timing unit selection is wrong\n"); DPRINTK("Timing unit selection is wrong\n");
i_ReturnValue = -6; i_ReturnValue = -6;
} // if ((b_TimingUnit >= 0) && (b_TimingUnit <= 4)) } /* if ((b_TimingUnit >= 0) && (b_TimingUnit <= 4)) */
} // if (dw_Status & 0x10) } /* if (dw_Status & 0x10) */
else { else {
/***********************/ /***********************/
/* PWM not initialised */ /* PWM not initialised */
/***********************/ /***********************/
DPRINTK("PWM not initialised\n"); DPRINTK("PWM not initialised\n");
i_ReturnValue = -5; i_ReturnValue = -5;
} // if (dw_Status & 0x10) } /* if (dw_Status & 0x10) */
} // if (b_PWM >= 0 && b_PWM <= 1) } /* if (b_PWM >= 0 && b_PWM <= 1) */
else { else {
/******************************/ /******************************/
/* Tor PWM selection is wrong */ /* Tor PWM selection is wrong */
/******************************/ /******************************/
DPRINTK("Tor PWM selection is wrong\n"); DPRINTK("Tor PWM selection is wrong\n");
i_ReturnValue = -4; i_ReturnValue = -4;
} // if (b_PWM >= 0 && b_PWM <= 1) } /* if (b_PWM >= 0 && b_PWM <= 1) */
} else { } else {
/**********************************/ /**********************************/
/* The module is not a PWM module */ /* The module is not a PWM module */
...@@ -3514,7 +3514,7 @@ int i_APCI1710_InsnReadGetPWMStatus(struct comedi_device * dev, struct comedi_su ...@@ -3514,7 +3514,7 @@ int i_APCI1710_InsnReadGetPWMStatus(struct comedi_device * dev, struct comedi_su
*pb_ExternGateStatus = *pb_ExternGateStatus =
(unsigned char) ((dw_Status >> 6) (unsigned char) ((dw_Status >> 6)
& 1); & 1);
} // if (dw_Status & 0x1) } /* if (dw_Status & 0x1) */
else { else {
/*******************/ /*******************/
/* PWM not enabled */ /* PWM not enabled */
...@@ -3522,8 +3522,8 @@ int i_APCI1710_InsnReadGetPWMStatus(struct comedi_device * dev, struct comedi_su ...@@ -3522,8 +3522,8 @@ int i_APCI1710_InsnReadGetPWMStatus(struct comedi_device * dev, struct comedi_su
DPRINTK("PWM not enabled \n"); DPRINTK("PWM not enabled \n");
i_ReturnValue = -6; i_ReturnValue = -6;
} // if (dw_Status & 0x1) } /* if (dw_Status & 0x1) */
} // if (dw_Status & 0x10) } /* if (dw_Status & 0x10) */
else { else {
/***********************/ /***********************/
/* PWM not initialised */ /* PWM not initialised */
...@@ -3531,8 +3531,8 @@ int i_APCI1710_InsnReadGetPWMStatus(struct comedi_device * dev, struct comedi_su ...@@ -3531,8 +3531,8 @@ int i_APCI1710_InsnReadGetPWMStatus(struct comedi_device * dev, struct comedi_su
DPRINTK("PWM not initialised\n"); DPRINTK("PWM not initialised\n");
i_ReturnValue = -5; i_ReturnValue = -5;
} // if (dw_Status & 0x10) } /* if (dw_Status & 0x10) */
} // if (b_PWM >= 0 && b_PWM <= 1) } /* if (b_PWM >= 0 && b_PWM <= 1) */
else { else {
/******************************/ /******************************/
/* Tor PWM selection is wrong */ /* Tor PWM selection is wrong */
...@@ -3540,7 +3540,7 @@ int i_APCI1710_InsnReadGetPWMStatus(struct comedi_device * dev, struct comedi_su ...@@ -3540,7 +3540,7 @@ int i_APCI1710_InsnReadGetPWMStatus(struct comedi_device * dev, struct comedi_su
DPRINTK("Tor PWM selection is wrong\n"); DPRINTK("Tor PWM selection is wrong\n");
i_ReturnValue = -4; i_ReturnValue = -4;
} // if (b_PWM >= 0 && b_PWM <= 1) } /* if (b_PWM >= 0 && b_PWM <= 1) */
} else { } else {
/**********************************/ /**********************************/
/* The module is not a PWM module */ /* The module is not a PWM module */
......
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