Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 337673
b: refs/heads/master
c: d6d7084
h: refs/heads/master
i:
  337671: aa23586
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Nov 6, 2012
1 parent a109239 commit e933a8d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 37 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 274113fd788eefa573eba55f47068cf6052beef0
refs/heads/master: d6d708485505f7696411e8e7bfecc9162961595f
37 changes: 1 addition & 36 deletions trunk/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1032.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,43 +204,8 @@ static int i_APCI1032_ReadMoreDigitalInput(struct comedi_device *dev,
struct comedi_insn *insn,
unsigned int *data)
{
unsigned int ui_PortValue = data[0];
unsigned int ui_Mask = 0;
unsigned int ui_NoOfChannels;
data[1] = inl(dev->iobase + APCI1032_DI_REG);

ui_NoOfChannels = CR_CHAN(insn->chanspec);
if (data[1] == 0) {
*data = inl(dev->iobase + APCI1032_DI_REG);
switch (ui_NoOfChannels) {
case 2:
ui_Mask = 3;
*data = (*data >> (2 * ui_PortValue)) & ui_Mask;
break;
case 4:
ui_Mask = 15;
*data = (*data >> (4 * ui_PortValue)) & ui_Mask;
break;
case 8:
ui_Mask = 255;
*data = (*data >> (8 * ui_PortValue)) & ui_Mask;
break;
case 16:
ui_Mask = 65535;
*data = (*data >> (16 * ui_PortValue)) & ui_Mask;
break;
case 31:
break;
default:
/* comedi_error(dev," \nchan spec wrong\n"); */
return -EINVAL; /* "sorry channel spec wrong " */
break;
} /* switch(ui_NoOfChannels) */
} /* if(data[1]==0) */
else {
if (data[1] == 1)
*data = ui_InterruptStatus;
/* if(data[1]==1) */
} /* else if(data[1]==0) */
return insn->n;
}

Expand Down

0 comments on commit e933a8d

Please sign in to comment.