Code was moved to a separate function in a previous patch. Code structure wast maintained to ease review. Code may now be refactored to ease reading. Move multi-line dereference onto single line. Give function parameter more meaningful name. Fix minor alignment issue. Signed-off-by: Tobin C. Harding <me@xxxxxxxx> --- drivers/staging/comedi/drivers/cb_pcidas64.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/staging/comedi/drivers/cb_pcidas64.c b/drivers/staging/comedi/drivers/cb_pcidas64.c index 385f007..16d2491 100644 --- a/drivers/staging/comedi/drivers/cb_pcidas64.c +++ b/drivers/staging/comedi/drivers/cb_pcidas64.c @@ -1480,18 +1480,17 @@ static void init_stc_registers(struct comedi_device *dev) disable_ai_pacing(dev); }; -static int alloc_dma_member(int i, struct comedi_device *dev) +static int alloc_dma_member(int member, struct comedi_device *dev) { struct pci_dev *pcidev = comedi_to_pci_dev(dev); struct pcidas64_private *devpriv = dev->private; - devpriv->ao_buffer[i] = + devpriv->ao_buffer[member] = dma_alloc_coherent(&pcidev->dev, - DMA_BUFFER_SIZE, - &devpriv-> - ao_buffer_bus_addr[i], - GFP_KERNEL); - if (!devpriv->ao_buffer[i]) + DMA_BUFFER_SIZE, + &devpriv->ao_buffer_bus_addr[member], + GFP_KERNEL); + if (!devpriv->ao_buffer[member]) return -ENOMEM; return 0; } -- 2.7.4 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel