diff options
author | Bill Pemberton <wfp5p@virginia.edu> | 2009-03-16 22:04:23 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-04-03 14:53:54 -0700 |
commit | 82675f3547ba2a0732beabd9bb4393535f74408c (patch) | |
tree | 91142ea65d09dfad30643af5988d0a46ed89f23c /drivers/staging/comedi/drivers/mite.c | |
parent | dedd1325f1d53e2a2604457c4b3af9e62dde5001 (diff) | |
download | linux-rt-82675f3547ba2a0732beabd9bb4393535f74408c.tar.gz |
Staging: comedi: Remove curly braces where they are not needed
Changes as suggested by checkpatch.pl.
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/comedi/drivers/mite.c')
-rw-r--r-- | drivers/staging/comedi/drivers/mite.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/drivers/staging/comedi/drivers/mite.c b/drivers/staging/comedi/drivers/mite.c index c7fe073f27b7..e0e2d6c90ac3 100644 --- a/drivers/staging/comedi/drivers/mite.c +++ b/drivers/staging/comedi/drivers/mite.c @@ -331,9 +331,9 @@ int mite_buf_change(struct mite_dma_descriptor_ring *ring, comedi_async * async) ring->descriptors_dma_addr = 0; ring->n_links = 0; - if (async->prealloc_bufsz == 0) { + if (async->prealloc_bufsz == 0) return 0; - } + n_links = async->prealloc_bufsz >> PAGE_SHIFT; MDPRINTK("ring->hw_dev=%p, n_links=0x%04x\n", ring->hw_dev, n_links); @@ -395,9 +395,9 @@ void mite_prep_dma(struct mite_channel *mite_chan, on e-series boards. */ chcr |= CHCR_BYTE_SWAP_DEVICE | CHCR_BYTE_SWAP_MEMORY; } - if (mite_chan->dir == COMEDI_INPUT) { + if (mite_chan->dir == COMEDI_INPUT) chcr |= CHCR_DEV_TO_MEM; - } + writel(chcr, mite->mite_io_addr + MITE_CHCR(mite_chan->channel)); /* to/from memory */ @@ -547,9 +547,9 @@ int mite_sync_input_dma(struct mite_channel *mite_chan, comedi_async * async) count = nbytes - async->buf_write_count; /* it's possible count will be negative due to * conservative value returned by mite_bytes_written_to_memory_lb */ - if (count <= 0) { + if (count <= 0) return 0; - } + comedi_buf_write_free(async, count); async->scan_progress += count; @@ -586,9 +586,9 @@ int mite_sync_output_dma(struct mite_channel *mite_chan, comedi_async * async) return -1; } count = nbytes_lb - async->buf_read_count; - if (count <= 0) { + if (count <= 0) return 0; - } + if (count) { comedi_buf_read_free(async, count); async->events |= COMEDI_CB_BLOCK; @@ -753,9 +753,8 @@ static void mite_decode(char **bit_str, unsigned int bits) int i; for (i = 31; i >= 0; i--) { - if (bits & (1 << i)) { + if (bits & (1 << i)) printk(" %s", bit_str[i]); - } } printk("\n"); } |