Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 186833
b: refs/heads/master
c: 20db7d7
h: refs/heads/master
i:
  186831: d41088a
v: v3
  • Loading branch information
Andrea Gelmini authored and Greg Kroah-Hartman committed Mar 4, 2010
1 parent 2f16c3d commit 39d2cb6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 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: 2d238b2972bf365153ae8d699177c7a19a5f3056
refs/heads/master: 20db7d7de7027ddee5df1b51b3d013568273b9df
12 changes: 4 additions & 8 deletions trunk/drivers/staging/comedi/drivers/cb_pcidda.c
Original file line number Diff line number Diff line change
Expand Up @@ -410,9 +410,8 @@ static int cb_pcidda_detach(struct comedi_device *dev)
*/
if (devpriv) {
if (devpriv->pci_dev) {
if (devpriv->dac) {
if (devpriv->dac)
comedi_pci_disable(devpriv->pci_dev);
}
pci_dev_put(devpriv->pci_dev);
}
}
Expand Down Expand Up @@ -677,9 +676,8 @@ static unsigned int cb_pcidda_serial_in(struct comedi_device *dev)

for (i = 1; i <= value_width; i++) {
/* read bits most significant bit first */
if (inw_p(devpriv->dac + DACALIBRATION1) & SERIAL_OUT_BIT) {
if (inw_p(devpriv->dac + DACALIBRATION1) & SERIAL_OUT_BIT)
value |= 1 << (value_width - i);
}
}

return value;
Expand Down Expand Up @@ -716,9 +714,8 @@ static unsigned int cb_pcidda_read_eeprom(struct comedi_device *dev,
/* send serial output stream to eeprom */
cal2_bits = SELECT_EEPROM_BIT | DESELECT_REF_DAC_BIT | DUMMY_BIT;
/* deactivate caldacs (one caldac for every two channels) */
for (i = 0; i < max_num_caldacs; i++) {
for (i = 0; i < max_num_caldacs; i++)
cal2_bits |= DESELECT_CALDAC_BIT(i);
}
outw_p(cal2_bits, devpriv->dac + DACALIBRATION2);

/* tell eeprom we want to read */
Expand Down Expand Up @@ -756,9 +753,8 @@ static void cb_pcidda_write_caldac(struct comedi_device *dev,
*/
cal2_bits = DESELECT_REF_DAC_BIT | DUMMY_BIT;
/* deactivate caldacs (one caldac for every two channels) */
for (i = 0; i < max_num_caldacs; i++) {
for (i = 0; i < max_num_caldacs; i++)
cal2_bits |= DESELECT_CALDAC_BIT(i);
}
/* activate the caldac we want */
cal2_bits &= ~DESELECT_CALDAC_BIT(caldac);
outw_p(cal2_bits, devpriv->dac + DACALIBRATION2);
Expand Down

0 comments on commit 39d2cb6

Please sign in to comment.