/* Test the timout parameter */
/*****************************/
- if ((ui_TimeOut >= 0)
- && (ui_TimeOut <= 65535UL)) {
+ if (ui_TimeOut <= 65535UL) {
for (;;) {
/*******************/
unsigned int ui_TmpValue = 0;
unsigned int ui_Channel;
ui_Channel = CR_CHAN(insn->chanspec);
- if (ui_Channel >= 0 && ui_Channel <= 31) {
+ if (ui_Channel <= 31) {
ui_TmpValue = (unsigned int) inl(devpriv->iobase + APCI1032_DIGITAL_IP);
/*
* since only 1 channel reqd to bring it to last bit it is rotated 8
switch (data[0]) {
case 0:
- if (ui_Channel >= 0 && ui_Channel <= 15) {
+ if (ui_Channel <= 15) {
ui_TmpValue =
(unsigned int) inw(devpriv->i_IobaseAddon +
APCI1500_DIGITAL_IP);
unsigned int ui_TmpValue = 0;
unsigned int ui_Channel;
ui_Channel = CR_CHAN(insn->chanspec);
- if (ui_Channel >= 0 && ui_Channel <= 7) {
+ if (ui_Channel <= 7) {
ui_TmpValue = (unsigned int) inw(devpriv->iobase + APCI1516_DIGITAL_IP);
/* since only 1 channel reqd to bring it to last bit it is rotated */
/* 8 +(chan - 1) times then ANDed with 1 for last bit. */
unsigned int ui_Channel;
ui_Channel = CR_CHAN(insn->chanspec);
- if (ui_Channel >= 0 && ui_Channel <= 31) {
+ if (ui_Channel <= 31) {
ui_TmpValue =
(unsigned int) inl(devpriv->i_IobaseAmcc + APCI1564_DIGITAL_IP);
/*
unsigned int ui_NoOfChannel;
unsigned int ui_Temp, ui_Temp1;
ui_NoOfChannel = CR_CHAN(insn->chanspec);
- if ((ui_NoOfChannel < 0) || (ui_NoOfChannel > 15)) {
+ if (ui_NoOfChannel > 15) {
comedi_error(dev,
"Invalid Channel Numbers !!!, Channel Numbers must be between 0 and 15\n");
return -EINVAL;
unsigned int ui_Temp;
unsigned int ui_NoOfChannel;
ui_NoOfChannel = CR_CHAN(insn->chanspec);
- if ((ui_NoOfChannel < 0) || (ui_NoOfChannel > 15)) {
+ if (ui_NoOfChannel > 15) {
comedi_error(dev,
"Invalid Channel Numbers !!!, Channel Numbers must be between 0 and 15\n");
return -EINVAL;
unsigned int ui_TmpValue = 0;
unsigned int ui_Channel;
ui_Channel = CR_CHAN(insn->chanspec);
- if (ui_Channel >= 0 && ui_Channel <= 7) {
+ if (ui_Channel <= 7) {
ui_TmpValue = (unsigned int) inw(devpriv->iobase + APCI2200_DIGITAL_IP);
*data = (ui_TmpValue >> ui_Channel) & 0x1;
} /* if(ui_Channel >= 0 && ui_Channel <=7) */
ui_Chan = CR_CHAN(insn->chanspec); /* channel specified */
/* this_board->i_hwdrv_InsnReadDigitalInput(dev,ui_Chan,data); */
- if (ui_Chan >= 0 && ui_Chan <= 3) {
+ if (ui_Chan <= 3) {
ui_TmpValue = (unsigned int) inw(devpriv->iobase + APCI3120_RD_STATUS);
/*
"Not a valid Data !!! ,Data should be 1 or 0\n");
return -EINVAL;
}
- if ((ui_NoOfChannel > (this_board->i_NbrDoChannel - 1))
- || (ui_NoOfChannel < 0)) {
+ if (ui_NoOfChannel > this_board->i_NbrDoChannel - 1) {
comedi_error(dev,
"This board doesn't have specified channel !!! \n");
return -EINVAL;
if (s_BoardInfos[dev->minor].i_ConnectionType == 1) {
/* if diff */
- if ((ui_Channel_num >= 0) && (ui_Channel_num <= 1))
+ if (ui_Channel_num <= 1)
i_DiffChannel = ui_Channel_num, i_Module = 0;
else if ((ui_Channel_num >= 2) && (ui_Channel_num <= 3))
i_DiffChannel = ui_Channel_num - 2, i_Module = 1;
/* Test the convert time value */
/*******************************/
- if ((dw_ReloadValue >= 0) && (dw_ReloadValue <= 65535)) {
+ if (dw_ReloadValue <= 65535) {
dw_TestReloadValue = dw_ReloadValue;
if (b_TimeBase == 1) {