Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 196969
b: refs/heads/master
c: 90cae79
h: refs/heads/master
i:
  196967: 3333707
v: v3
  • Loading branch information
Jason Wong authored and Greg Kroah-Hartman committed May 11, 2010
1 parent 9b766b0 commit f301fae
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 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: 7b8f2d1a2ece4180ac5fe418bf915efe728583a8
refs/heads/master: 90cae7944011b7a09b2d248e85ee11e987cc25f8
40 changes: 20 additions & 20 deletions trunk/drivers/staging/comedi/drivers/cb_pcidas64.c
Original file line number Diff line number Diff line change
Expand Up @@ -1621,9 +1621,9 @@ int alloc_and_init_dma_members(struct comedi_device *dev)
priv(dev)->ai_buffer[i] =
pci_alloc_consistent(priv(dev)->hw_dev, DMA_BUFFER_SIZE,
&priv(dev)->ai_buffer_bus_addr[i]);
if (priv(dev)->ai_buffer[i] == NULL) {
if (priv(dev)->ai_buffer[i] == NULL)
return -ENOMEM;
}

}
for (i = 0; i < AO_DMA_RING_COUNT; i++) {
if (ao_cmd_is_supported(board(dev))) {
Expand All @@ -1632,9 +1632,9 @@ int alloc_and_init_dma_members(struct comedi_device *dev)
DMA_BUFFER_SIZE,
&priv(dev)->
ao_buffer_bus_addr[i]);
if (priv(dev)->ao_buffer[i] == NULL) {
if (priv(dev)->ao_buffer[i] == NULL)
return -ENOMEM;
}

}
}
/* allocate dma descriptors */
Expand All @@ -1643,9 +1643,9 @@ int alloc_and_init_dma_members(struct comedi_device *dev)
sizeof(struct plx_dma_desc) *
ai_dma_ring_count(board(dev)),
&priv(dev)->ai_dma_desc_bus_addr);
if (priv(dev)->ai_dma_desc == NULL) {
if (priv(dev)->ai_dma_desc == NULL)
return -ENOMEM;
}

DEBUG_PRINT("ai dma descriptors start at bus addr 0x%x\n",
priv(dev)->ai_dma_desc_bus_addr);
if (ao_cmd_is_supported(board(dev))) {
Expand All @@ -1654,9 +1654,9 @@ int alloc_and_init_dma_members(struct comedi_device *dev)
sizeof(struct plx_dma_desc) *
AO_DMA_RING_COUNT,
&priv(dev)->ao_dma_desc_bus_addr);
if (priv(dev)->ao_dma_desc == NULL) {
if (priv(dev)->ao_dma_desc == NULL)
return -ENOMEM;
}

DEBUG_PRINT("ao dma descriptors start at bus addr 0x%x\n",
priv(dev)->ao_dma_desc_bus_addr);
}
Expand Down Expand Up @@ -1848,9 +1848,9 @@ static int attach(struct comedi_device *dev, struct comedi_devconfig *it)
printk(" irq %u\n", dev->irq);

retval = setup_subdevices(dev);
if (retval < 0) {
if (retval < 0)
return retval;
}


return 0;
}
Expand Down Expand Up @@ -1919,9 +1919,9 @@ static int detach(struct comedi_device *dev)
priv(dev)->ao_dma_desc,
priv(dev)->
ao_dma_desc_bus_addr);
if (priv(dev)->main_phys_iobase) {
if (priv(dev)->main_phys_iobase)
comedi_pci_disable(priv(dev)->hw_dev);
}

pci_dev_put(priv(dev)->hw_dev);
}
}
Expand Down Expand Up @@ -2902,9 +2902,9 @@ static void pio_drain_ai_fifo_16(struct comedi_device *dev)
if (cmd->stop_src == TRIG_COUNT) {
if (priv(dev)->ai_count == 0)
break;
if (num_samples > priv(dev)->ai_count) {
if (num_samples > priv(dev)->ai_count)
num_samples = priv(dev)->ai_count;
}

priv(dev)->ai_count -= num_samples;
}

Expand Down Expand Up @@ -2943,9 +2943,9 @@ static void pio_drain_ai_fifo_32(struct comedi_device *dev)
readw(priv(dev)->main_iobase + ADC_READ_PNTR_REG) & 0x7fff;

if (cmd->stop_src == TRIG_COUNT) {
if (max_transfer > priv(dev)->ai_count) {
if (max_transfer > priv(dev)->ai_count)
max_transfer = priv(dev)->ai_count;
}

}
for (i = 0; read_code != write_code && i < max_transfer;) {
fifo_data = readl(priv(dev)->dio_counter_iobase + ADC_FIFO_REG);
Expand All @@ -2964,9 +2964,9 @@ static void pio_drain_ai_fifo_32(struct comedi_device *dev)
/* empty fifo */
static void pio_drain_ai_fifo(struct comedi_device *dev)
{
if (board(dev)->layout == LAYOUT_4020) {
if (board(dev)->layout == LAYOUT_4020)
pio_drain_ai_fifo_32(dev);
} else
else
pio_drain_ai_fifo_16(dev);
}

Expand Down Expand Up @@ -3038,9 +3038,9 @@ void handle_ai_interrupt(struct comedi_device *dev, unsigned short status,
priv(dev)->plx9080_iobase + PLX_DMA1_CS_REG);
DEBUG_PRINT("dma1 status 0x%x\n", dma1_status);

if (dma1_status & PLX_DMA_EN_BIT) {
if (dma1_status & PLX_DMA_EN_BIT)
drain_dma_buffers(dev, 1);
}

DEBUG_PRINT(" cleared dma ch1 interrupt\n");
}
spin_unlock_irqrestore(&dev->spinlock, flags);
Expand Down

0 comments on commit f301fae

Please sign in to comment.