[media] cx25821-audio-upstream.c: Change line endings

Change obscure line endings to less obscure ones. (improve readability)

Signed-off-by: Leonid V. Fedorenchik <leonidsbox@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
Leonid V. Fedorenchik 2011-10-22 01:43:27 -03:00 committed by Mauro Carvalho Chehab
parent 64dcb19496
commit 72a52fc325

View file

@ -175,10 +175,8 @@ int cx25821_risc_buffer_upstream_audio(struct cx25821_dev *dev,
} }
rp = cx25821_risc_field_upstream_audio(dev, rp, rp = cx25821_risc_field_upstream_audio(dev, rp,
dev-> dev->_audiodata_buf_phys_addr + databuf_offset,
_audiodata_buf_phys_addr bpl, fifo_enable);
+ databuf_offset, bpl,
fifo_enable);
if (USE_RISC_NOOP_AUDIO) { if (USE_RISC_NOOP_AUDIO) {
for (i = 0; i < NUM_NO_OPS; i++) for (i = 0; i < NUM_NO_OPS; i++)
@ -305,8 +303,8 @@ int cx25821_get_audio_data(struct cx25821_dev *dev,
for (i = 0; i < dev->_audio_lines_count; i++) { for (i = 0; i < dev->_audio_lines_count; i++) {
pos = file_offset; pos = file_offset;
vfs_read_retval = vfs_read_retval = vfs_read(myfile, mybuf, line_size,
vfs_read(myfile, mybuf, line_size, &pos); &pos);
if (vfs_read_retval > 0 && vfs_read_retval == line_size if (vfs_read_retval > 0 && vfs_read_retval == line_size
&& dev->_audiodata_buf_virt_addr != NULL) { && dev->_audiodata_buf_virt_addr != NULL) {
@ -328,8 +326,8 @@ int cx25821_get_audio_data(struct cx25821_dev *dev,
if (i > 0) if (i > 0)
dev->_audioframe_count++; dev->_audioframe_count++;
dev->_audiofile_status = dev->_audiofile_status = (vfs_read_retval == line_size) ?
(vfs_read_retval == line_size) ? IN_PROGRESS : END_OF_FILE; IN_PROGRESS : END_OF_FILE;
set_fs(old_fs); set_fs(old_fs);
filp_close(myfile, NULL); filp_close(myfile, NULL);
@ -340,8 +338,8 @@ int cx25821_get_audio_data(struct cx25821_dev *dev,
static void cx25821_audioups_handler(struct work_struct *work) static void cx25821_audioups_handler(struct work_struct *work)
{ {
struct cx25821_dev *dev = struct cx25821_dev *dev = container_of(work, struct cx25821_dev,
container_of(work, struct cx25821_dev, _audio_work_entry); _audio_work_entry);
if (!dev) { if (!dev) {
pr_err("ERROR %s(): since container_of(work_struct) FAILED!\n", pr_err("ERROR %s(): since container_of(work_struct) FAILED!\n",
@ -395,8 +393,8 @@ int cx25821_openfile_audio(struct cx25821_dev *dev,
for (i = 0; i < dev->_audio_lines_count; i++) { for (i = 0; i < dev->_audio_lines_count; i++) {
pos = offset; pos = offset;
vfs_read_retval = vfs_read_retval = vfs_read(myfile, mybuf,
vfs_read(myfile, mybuf, line_size, &pos); line_size, &pos);
if (vfs_read_retval > 0 && if (vfs_read_retval > 0 &&
vfs_read_retval == line_size && vfs_read_retval == line_size &&
@ -423,8 +421,8 @@ int cx25821_openfile_audio(struct cx25821_dev *dev,
break; break;
} }
dev->_audiofile_status = dev->_audiofile_status = (vfs_read_retval == line_size) ?
(vfs_read_retval == line_size) ? IN_PROGRESS : END_OF_FILE; IN_PROGRESS : END_OF_FILE;
set_fs(old_fs); set_fs(old_fs);
myfile->f_pos = 0; myfile->f_pos = 0;
@ -444,9 +442,8 @@ static int cx25821_audio_upstream_buffer_prepare(struct cx25821_dev *dev,
cx25821_free_memory_audio(dev); cx25821_free_memory_audio(dev);
dev->_risc_virt_addr = dev->_risc_virt_addr = pci_alloc_consistent(dev->pci,
pci_alloc_consistent(dev->pci, dev->audio_upstream_riscbuf_size, dev->audio_upstream_riscbuf_size, &dma_addr);
&dma_addr);
dev->_risc_virt_start_addr = dev->_risc_virt_addr; dev->_risc_virt_start_addr = dev->_risc_virt_addr;
dev->_risc_phys_start_addr = dma_addr; dev->_risc_phys_start_addr = dma_addr;
dev->_risc_phys_addr = dma_addr; dev->_risc_phys_addr = dma_addr;
@ -461,9 +458,8 @@ static int cx25821_audio_upstream_buffer_prepare(struct cx25821_dev *dev,
memset(dev->_risc_virt_addr, 0, dev->_audiorisc_size); memset(dev->_risc_virt_addr, 0, dev->_audiorisc_size);
/* For Audio Data buffer allocation */ /* For Audio Data buffer allocation */
dev->_audiodata_buf_virt_addr = dev->_audiodata_buf_virt_addr = pci_alloc_consistent(dev->pci,
pci_alloc_consistent(dev->pci, dev->audio_upstream_databuf_size, dev->audio_upstream_databuf_size, &data_dma_addr);
&data_dma_addr);
dev->_audiodata_buf_phys_addr = data_dma_addr; dev->_audiodata_buf_phys_addr = data_dma_addr;
dev->_audiodata_buf_size = dev->audio_upstream_databuf_size; dev->_audiodata_buf_size = dev->audio_upstream_databuf_size;
@ -480,9 +476,8 @@ static int cx25821_audio_upstream_buffer_prepare(struct cx25821_dev *dev,
return ret; return ret;
/* Creating RISC programs */ /* Creating RISC programs */
ret = ret = cx25821_risc_buffer_upstream_audio(dev, dev->pci, bpl,
cx25821_risc_buffer_upstream_audio(dev, dev->pci, bpl, dev->_audio_lines_count);
dev->_audio_lines_count);
if (ret < 0) { if (ret < 0) {
printk(KERN_DEBUG printk(KERN_DEBUG
pr_fmt("ERROR creating audio upstream RISC programs!\n")); pr_fmt("ERROR creating audio upstream RISC programs!\n"));
@ -661,9 +656,9 @@ int cx25821_start_audio_dma_upstream(struct cx25821_dev *dev,
/* Set the input mode to 16-bit */ /* Set the input mode to 16-bit */
tmp = cx_read(sram_ch->aud_cfg); tmp = cx_read(sram_ch->aud_cfg);
tmp |= tmp |= FLD_AUD_SRC_ENABLE | FLD_AUD_DST_PK_MODE | FLD_AUD_CLK_ENABLE |
FLD_AUD_SRC_ENABLE | FLD_AUD_DST_PK_MODE | FLD_AUD_CLK_ENABLE | FLD_AUD_MASTER_MODE | FLD_AUD_CLK_SELECT_PLL_D |
FLD_AUD_MASTER_MODE | FLD_AUD_CLK_SELECT_PLL_D | FLD_AUD_SONY_MODE; FLD_AUD_SONY_MODE;
cx_write(sram_ch->aud_cfg, tmp); cx_write(sram_ch->aud_cfg, tmp);
/* Read and write back the interrupt status register to clear it */ /* Read and write back the interrupt status register to clear it */
@ -678,12 +673,11 @@ int cx25821_start_audio_dma_upstream(struct cx25821_dev *dev,
tmp = cx_read(sram_ch->int_msk); tmp = cx_read(sram_ch->int_msk);
cx_write(sram_ch->int_msk, tmp |= _intr_msk); cx_write(sram_ch->int_msk, tmp |= _intr_msk);
err = err = request_irq(dev->pci->irq, cx25821_upstream_irq_audio,
request_irq(dev->pci->irq, cx25821_upstream_irq_audio,
IRQF_SHARED, dev->name, dev); IRQF_SHARED, dev->name, dev);
if (err < 0) { if (err < 0) {
pr_err("%s: can't get upstream IRQ %d\n", pr_err("%s: can't get upstream IRQ %d\n", dev->name,
dev->name, dev->pci->irq); dev->pci->irq);
goto fail_irq; goto fail_irq;
} }