Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 376030
b: refs/heads/master
c: 1581a03
h: refs/heads/master
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed May 13, 2013
1 parent 3f44047 commit 33f5f43
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 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: 0a438d5b381e2bdfd5e02d653bf46fcc878356e3
refs/heads/master: 1581a03573e6c9ebd931e31f9172cce25dcb69e6
8 changes: 5 additions & 3 deletions trunk/drivers/staging/comedi/drivers/ni_labpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -976,8 +976,7 @@ static int labpc_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
/* clear flip-flop to make sure 2-byte registers for
* count and address get set correctly */
clear_dma_ff(devpriv->dma_chan);
set_dma_addr(devpriv->dma_chan,
virt_to_bus(devpriv->dma_buffer));
set_dma_addr(devpriv->dma_chan, devpriv->dma_addr);
/* set appropriate size of transfer */
devpriv->dma_transfer_size = labpc_suggest_transfer_size(cmd);
if (cmd->stop_src == TRIG_COUNT &&
Expand Down Expand Up @@ -1089,7 +1088,7 @@ static void labpc_drain_dma(struct comedi_device *dev)
devpriv->count -= num_points;

/* set address and count for next transfer */
set_dma_addr(devpriv->dma_chan, virt_to_bus(devpriv->dma_buffer));
set_dma_addr(devpriv->dma_chan, devpriv->dma_addr);
set_dma_count(devpriv->dma_chan, leftover * sample_size);
release_dma_lock(flags);

Expand Down Expand Up @@ -1741,6 +1740,9 @@ static int labpc_attach(struct comedi_device *dev, struct comedi_devconfig *it)
unsigned long dma_flags;

devpriv->dma_chan = dma_chan;
devpriv->dma_addr =
virt_to_bus(devpriv->dma_buffer);

dma_flags = claim_dma_lock();
disable_dma(devpriv->dma_chan);
set_dma_mode(devpriv->dma_chan, DMA_MODE_READ);
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/staging/comedi/drivers/ni_labpc.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ struct labpc_private {
unsigned int divisor_b1;
unsigned int dma_chan; /* dma channel to use */
u16 *dma_buffer; /* buffer ai will dma into */
phys_addr_t dma_addr;
/* transfer size in bytes for current transfer */
unsigned int dma_transfer_size;
/* we are using dma/fifo-half-full/etc. */
Expand Down

0 comments on commit 33f5f43

Please sign in to comment.