Staging: cx25821: Clean up patch series
cover Staging: cx25821: Clean up patch series
This patch series fixes some style issues in drivers/staging/cx25821 Mostly I was hoping to improve readability and fix some issues found by checkpatch.pl script.
There is one question, however, in patch no. 18:
I deleted part of the comment that contradicts to the code and in this case maybe I should edit the code to match the comment instead. I am not sure if in this case it makes sense to check if width > 0.
Leonid V. Fedorenchik (36):
Staging: cx25821: cx25821-alsa.c: Line up comments
Staging: cx25821: cx25821-alsa.c: Add braces to else clause
Staging: cx25821: cx25821-alsa.c: Fix indent
Staging: cx25821: cx25821-alsa.c: Change line endings
Staging: cx25821: cx25821-audio-upstream.c: Fix indent
Staging: cx25821: cx25821-audio-upstream.c: Move operators
Staging: cx25821: cx25821-audio-upstream.c: Change line endings
Staging: cx25821: cx25821-audio.h: Line up defines
Staging: cx25821: cx25821-audio.h: Fix multiline defines
Staging: cx25821: cx25821-cards.c: Fix indent
Staging: cx25821: cx25821-core.c: Delete empty line
Staging: cx25821: cx25821-core.c: Fix indent
Staging: cx25821: cx25821-core.c: Change line endings
Staging: cx25821: cx25821-i2c.c: Change line endings
Staging: cx25821: cx25821-medusa-defines.h: Fix typo
Staging: cx25821: cx25821-medusa-defines.h: Line up defines
Staging: cx25821: cx25821-medusa-reg.h: Line up defines
Staging: cx25821: cx25821-medusa-video.c: Fix comment
Staging: cx25821: cx25821-medusa-video.c: Move operators
Staging: cx25821: cx25821-medusa-video.c: Change line endings
Staging: cx25821: cx25821-video-upstream-ch2.c: Line up comments
Staging: cx25821: cx25821-video-upstream-ch2.c: Fix indent
Staging: cx25821: cx25821-video-upsstream-ch2.c: Move operators
Staging: cx25821: cx25821-video-upstream-ch2.c: Remove braces
Staging: cx25821: cx25821-video-upstream-ch2.c: Change line endings
Staging: cx25821: cx25821-video-upstream.c: Remove braces
Staging: cx25821: cx25821-video-upstream.c: Fix indent
Staging: cx25821: cx25821-video-upstream.c: Change line endings
Staging: cx25821: cx25821-video.c: Delete empty line
Staging: cx25821: cx25821-video.c: Change spaces
Staging: cx25821: cx25821-video.c: Fix assignment
Staging: cx25821: cx25821-video.c: Fix definitions
Staging: cx25821: cx25821-video.c: Move operators
Staging: cx25821: cx25821-video.c: Fix indent
Staging: cx25821: cx25821-video.c: Change line endings
Staging: cx25821: cx25821.h: Line up definesdrivers/staging/cx25821/cx25821-alsa.c | 73 ++-- drivers/staging/cx25821/cx25821-audio-upstream.c | 102 ++-- drivers/staging/cx25821/cx25821-audio.h | 39 +- drivers/staging/cx25821/cx25821-cards.c | 2 +- drivers/staging/cx25821/cx25821-core.c | 57 +-- drivers/staging/cx25821/cx25821-i2c.c | 10 +- drivers/staging/cx25821/cx25821-medusa-defines.h | 6 +- drivers/staging/cx25821/cx25821-medusa-reg.h | 518 ++++++++++---------- drivers/staging/cx25821/cx25821-medusa-video.c | 410 ++++++---------- .../staging/cx25821/cx25821-video-upstream-ch2.c | 126 ++--- drivers/staging/cx25821/cx25821-video-upstream.c | 146 +++---- drivers/staging/cx25821/cx25821-video.c | 145 +++--- drivers/staging/cx25821/cx25821.h | 4 +- 13 files changed, 745 insertions(+), 893 deletions(-)
PATCH 1/36 Staging: cx25821: cx25821-alsa.c: Line up comments
Line up comments to the same column.
--- drivers/staging/cx25821/cx25821-alsa.c | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-)
drivers/staging/cx25821/cx25821-alsa.c +8 -8
@@ -234,15 +234,15 @@ static int _cx25821_stop_audio_dma(struct cx25821_audio_dev *chip)*/ static char *cx25821_aud_irqs[32 ] = {"dn_risci1" ,"up_risci1" ,"rds_dn_risc1" ,/* 0-2 */ -NULL ,/* reserved */ +NULL ,/* reserved */ "dn_risci2" ,"up_risci2" ,"rds_dn_risc2" ,/* 4-6 */ -NULL ,/* reserved */ -"dnf_of" ,"upf_uf" ,"rds_dnf_uf" ,/* 8-10 */ -NULL ,/* reserved */ -"dn_sync" ,"up_sync" ,"rds_dn_sync" ,/* 12-14 */ -NULL ,/* reserved */ -"opc_err" ,"par_err" ,"rip_err" ,/* 16-18 */ -"pci_abort" ,"ber_irq" ,"mchg_irq" /* 19-21 */ +NULL ,/* reserved */ +"dnf_of" ,"upf_uf" ,"rds_dnf_uf" ,/* 8-10 */ +NULL ,/* reserved */ +"dn_sync" ,"up_sync" ,"rds_dn_sync" ,/* 12-14 */ +NULL ,/* reserved */ +"opc_err" ,"par_err" ,"rip_err" ,/* 16-18 */ +"pci_abort" ,"ber_irq" ,"mchg_irq" /* 19-21 */ };/*
Signature · 1 line
1.7.0.4
PATCH 2/36 Staging: cx25821: cx25821-alsa.c: Add braces to else clause
In reply to Leonid V. FedorenchikAdd curly braces around else clause because corresponding if has them.
--- drivers/staging/cx25821/cx25821-alsa.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/staging/cx25821/cx25821-alsa.c +2 -1
@@ -317,8 +317,9 @@ static irqreturn_t cx25821_irq(int irq, void *dev_id)cx25821_aud_irq (chip, audint_status, audint_mask);break ; - }else + }else { goto out; + } } handled =1 ;
Signature · 1 line
1.7.0.4
PATCH 3/36 Staging: cx25821: cx25821-alsa.c: Fix indent
In reply to Leonid V. FedorenchikDelete unnecessary space before indented statement.
--- drivers/staging/cx25821/cx25821-alsa.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/staging/cx25821/cx25821-alsa.c +1 -1
@@ -687,7 +687,7 @@ static int cx25821_audio_initdev(struct cx25821_dev *dev) } err =snd_card_create (index[devno], id[devno],THIS_MODULE , -sizeof (struct cx25821_audio_dev ), &card); +sizeof (struct cx25821_audio_dev ), &card);if (err <0 ) {pr_info ("DEBUG ERROR: cannot create snd_card_new in %s\n" , __func__);
Signature · 1 line
1.7.0.4
PATCH 4/36 Staging: cx25821: cx25821-alsa.c: Change line endings
In reply to Leonid V. FedorenchikChange obscure line endings to less obscure ones. (improve readability)
--- drivers/staging/cx25821/cx25821-alsa.c | 52 +++++++++++++------------------- 1 files changed, 21 insertions(+), 31 deletions(-)
drivers/staging/cx25821/cx25821-alsa.c +21 -31
@@ -176,8 +176,7 @@ static int _cx25821_start_audio_dma(struct cx25821_audio_dev *chip)/* Set the input mode to 16-bit */ tmp =cx_read (AUD_A_CFG ); -cx_write (AUD_A_CFG , - tmp |FLD_AUD_DST_PK_MODE |FLD_AUD_DST_ENABLE | +cx_write (AUD_A_CFG , tmp |FLD_AUD_DST_PK_MODE |FLD_AUD_DST_ENABLE |FLD_AUD_CLK_ENABLE );/*
@@ -188,9 +187,8 @@ static int _cx25821_start_audio_dma(struct cx25821_audio_dev *chip)*/ /* Enables corresponding bits at AUD_INT_STAT */ -cx_write (AUD_A_INT_MSK , -FLD_AUD_DST_RISCI1 |FLD_AUD_DST_OF |FLD_AUD_DST_SYNC | -FLD_AUD_DST_OPC_ERR ); +cx_write (AUD_A_INT_MSK ,FLD_AUD_DST_RISCI1 |FLD_AUD_DST_OF | +FLD_AUD_DST_SYNC |FLD_AUD_DST_OPC_ERR );/* Clean any pending interrupt bits already set */ cx_write (AUD_A_INT_STAT , ~0 );
@@ -200,8 +198,8 @@ static int _cx25821_start_audio_dma(struct cx25821_audio_dev *chip)/* Turn on audio downstream fifo and risc enable 0x101 */ tmp =cx_read (AUD_INT_DMA_CTL ); -cx_set (AUD_INT_DMA_CTL , - tmp | (FLD_AUD_DST_A_RISC_EN |FLD_AUD_DST_A_FIFO_EN )); +cx_set (AUD_INT_DMA_CTL , tmp | + (FLD_AUD_DST_A_RISC_EN |FLD_AUD_DST_A_FIFO_EN ));mdelay (100 );return 0 ;
@@ -220,9 +218,8 @@ static int _cx25821_stop_audio_dma(struct cx25821_audio_dev *chip)/* disable irqs */ cx_clear (PCI_INT_MSK ,PCI_MSK_AUD_INT ); -cx_clear (AUD_A_INT_MSK , -AUD_INT_OPC_ERR |AUD_INT_DN_SYNC |AUD_INT_DN_RISCI2 | -AUD_INT_DN_RISCI1 ); +cx_clear (AUD_A_INT_MSK ,AUD_INT_OPC_ERR |AUD_INT_DN_SYNC | +AUD_INT_DN_RISCI2 |AUD_INT_DN_RISCI1 );return 0 ; }
@@ -258,10 +255,8 @@ static void cx25821_aud_irq(struct cx25821_audio_dev *chip, u32 status,cx_write (AUD_A_INT_STAT , status);if (debug >1 || (status & mask & ~0xff )) -cx25821_print_irqbits (dev->name,"irq aud" , - cx25821_aud_irqs, -ARRAY_SIZE (cx25821_aud_irqs), status, - mask); +cx25821_print_irqbits (dev->name,"irq aud" , cx25821_aud_irqs, +ARRAY_SIZE (cx25821_aud_irqs), status, mask);/* risc op code error */ if (status &AUD_INT_OPC_ERR ) {
@@ -270,8 +265,7 @@ static void cx25821_aud_irq(struct cx25821_audio_dev *chip, u32 status,cx_clear (AUD_INT_DMA_CTL ,FLD_AUD_DST_A_RISC_EN |FLD_AUD_DST_A_FIFO_EN );cx25821_sram_channel_dump_audio (dev, - &cx25821_sram_channels - [AUDIO_SRAM_CHANNEL ]); + &cx25821_sram_channels[AUDIO_SRAM_CHANNEL ]); }if (status &AUD_INT_DN_SYNC ) {pr_warn ("WARNING %s: Downstream sync error!\n" , dev->name);
@@ -362,9 +356,8 @@ static int dsp_buffer_free(struct cx25821_audio_dev *chip)*/ #define DEFAULT_FIFO_SIZE 384static struct snd_pcm_hardware snd_cx25821_digital_hw = { - .info =SNDRV_PCM_INFO_MMAP | -SNDRV_PCM_INFO_INTERLEAVED | -SNDRV_PCM_INFO_BLOCK_TRANSFER |SNDRV_PCM_INFO_MMAP_VALID , + .info =SNDRV_PCM_INFO_MMAP |SNDRV_PCM_INFO_INTERLEAVED | +SNDRV_PCM_INFO_BLOCK_TRANSFER |SNDRV_PCM_INFO_MMAP_VALID , .formats =SNDRV_PCM_FMTBIT_S16_LE , .rates =SNDRV_PCM_RATE_48000 ,
@@ -397,8 +390,8 @@ static int snd_cx25821_pcm_open(struct snd_pcm_substream *substream)return -ENODEV ; } - err = -snd_pcm_hw_constraint_pow2 (runtime,0 ,SNDRV_PCM_HW_PARAM_PERIODS ); + err =snd_pcm_hw_constraint_pow2 (runtime,0 , +SNDRV_PCM_HW_PARAM_PERIODS );if (err <0 ) goto _error;
@@ -469,8 +462,7 @@ static int snd_cx25821_hw_params(struct snd_pcm_substream *substream, dma = &buf->dma;videobuf_dma_init (dma); ret =videobuf_dma_init_kernel (dma,PCI_DMA_FROMDEVICE , - (PAGE_ALIGN (chip->dma_size) >> -PAGE_SHIFT )); + (PAGE_ALIGN (chip->dma_size) >>PAGE_SHIFT ));if (ret <0 ) goto error;
@@ -478,10 +470,8 @@ static int snd_cx25821_hw_params(struct snd_pcm_substream *substream,if (ret <0 ) goto error; - ret = -cx25821_risc_databuffer_audio (chip->pci, &buf->risc, dma->sglist, - chip->period_size, chip->num_periods, -1 ); + ret =cx25821_risc_databuffer_audio (chip->pci, &buf->risc, dma->sglist, + chip->period_size, chip->num_periods,1 );if (ret <0 ) {pr_info ("DEBUG: ERROR after cx25821_risc_databuffer_audio()\n" ); goto error;
@@ -712,8 +702,8 @@ static int cx25821_audio_initdev(struct cx25821_dev *dev) IRQF_SHARED | IRQF_DISABLED, chip->dev->name, chip);if (err <0 ) { -pr_err ("ERROR %s: can't get IRQ %d for ALSA\n" , - chip->dev->name, dev->pci->irq); +pr_err ("ERROR %s: can't get IRQ %d for ALSA\n" , chip->dev->name, + dev->pci->irq); goto error; }
@@ -731,8 +721,8 @@ static int cx25821_audio_initdev(struct cx25821_dev *dev) chip->iobase, chip->irq);strcpy (card->mixername,"CX25821" ); -pr_info ("%s/%i: ALSA support for cx25821 boards\n" , - card->driver, devno); +pr_info ("%s/%i: ALSA support for cx25821 boards\n" , card->driver, + devno); err =snd_card_register (card);if (err <0 ) {
Signature · 1 line
1.7.0.4
PATCH 5/36 Staging: cx25821: cx25821-audio-upstream.c: Fix indent
In reply to Leonid V. FedorenchikChange wrong indent (with spaces and less than 7 columns) of statements to tabs.
--- drivers/staging/cx25821/cx25821-audio-upstream.c | 42 +++++++++++----------- 1 files changed, 21 insertions(+), 21 deletions(-)
drivers/staging/cx25821/cx25821-audio-upstream.c +21 -21
@@ -107,7 +107,7 @@ static __le32 *cx25821_risc_field_upstream_audio(struct cx25821_dev *dev, {unsigned int line;struct sram_channel *sram_ch = - dev->channels[dev->_audio_upstream_channel].sram_channels; + dev->channels[dev->_audio_upstream_channel].sram_channels;int offset =0 ;/* scan lines */
@@ -193,7 +193,7 @@ int cx25821_risc_buffer_upstream_audio(struct cx25821_dev *dev,/* Recalculate virtual address based on frame index */ rp = dev->_risc_virt_addr +RISC_SYNC_INSTRUCTION_SIZE /4 + - (AUDIO_RISC_DMA_BUF_SIZE * (frame +1 ) /4 ); + (AUDIO_RISC_DMA_BUF_SIZE * (frame +1 ) /4 ); }return 0 ;
@@ -218,7 +218,7 @@ void cx25821_free_memory_audio(struct cx25821_dev *dev)void cx25821_stop_upstream_audio (struct cx25821_dev *dev) {struct sram_channel *sram_ch = - dev->channels[AUDIO_UPSTREAM_SRAM_CHANNEL_B ].sram_channels; + dev->channels[AUDIO_UPSTREAM_SRAM_CHANNEL_B ].sram_channels;u32 tmp =0 ;if (!dev->_audio_is_running) {
@@ -286,14 +286,14 @@ int cx25821_get_audio_data(struct cx25821_dev *dev, }else {if (!(myfile->f_op)) {pr_err ("%s(): File has no file operations registered!\n" , - __func__); + __func__);filp_close (myfile,NULL );return -EIO ; }if (!myfile->f_op->read) {pr_err ("%s(): File has no READ operations registered!\n" , - __func__); + __func__);filp_close (myfile,NULL );return -EIO ; }
@@ -312,7 +312,7 @@ int cx25821_get_audio_data(struct cx25821_dev *dev, && dev->_audiodata_buf_virt_addr != NULL) {memcpy ((void *)(dev->_audiodata_buf_virt_addr + frame_offset /4 ), mybuf, - vfs_read_retval); + vfs_read_retval); } file_offset += vfs_read_retval;
@@ -345,7 +345,7 @@ static void cx25821_audioups_handler(struct work_struct *work)if (!dev) {pr_err ("ERROR %s(): since container_of(work_struct) FAILED!\n" , - __func__); + __func__);return ; }
@@ -370,19 +370,19 @@ int cx25821_openfile_audio(struct cx25821_dev *dev,if (IS_ERR (myfile)) {const int open_errno = -PTR_ERR (myfile);pr_err ("%s(): ERROR opening file(%s) with errno = %d!\n" , - __func__, dev->_audiofilename, open_errno); + __func__, dev->_audiofilename, open_errno);return PTR_ERR (myfile); }else {if (!(myfile->f_op)) {pr_err ("%s(): File has no file operations registered!\n" , - __func__); + __func__);filp_close (myfile,NULL );return -EIO ; }if (!myfile->f_op->read) {pr_err ("%s(): File has no READ operations registered!\n" , - __func__); + __func__);filp_close (myfile,NULL );return -EIO ; }
@@ -454,7 +454,7 @@ static int cx25821_audio_upstream_buffer_prepare(struct cx25821_dev *dev,if (!dev->_risc_virt_addr) { printk(KERN_DEBUG - pr_fmt("ERROR: pci_alloc_consistent() FAILED to allocate memory for RISC program! Returning\n")); + pr_fmt("ERROR: pci_alloc_consistent() FAILED to allocate memory for RISC program! Returning\n"));return -ENOMEM ; }/* Clear out memory at address */
@@ -469,7 +469,7 @@ static int cx25821_audio_upstream_buffer_prepare(struct cx25821_dev *dev,if (!dev->_audiodata_buf_virt_addr) { printk(KERN_DEBUG - pr_fmt("ERROR: pci_alloc_consistent() FAILED to allocate memory for data buffer! Returning\n")); + pr_fmt("ERROR: pci_alloc_consistent() FAILED to allocate memory for data buffer! Returning\n"));return -ENOMEM ; }/* Clear out memory at address */
@@ -485,7 +485,7 @@ static int cx25821_audio_upstream_buffer_prepare(struct cx25821_dev *dev, dev->_audio_lines_count);if (ret <0 ) { printk(KERN_DEBUG - pr_fmt("ERROR creating audio upstream RISC programs!\n")); + pr_fmt("ERROR creating audio upstream RISC programs!\n")); goto error; }
@@ -533,9 +533,9 @@ int cx25821_audio_upstream_irq(struct cx25821_dev *dev, int chan_num,if (dev->_risc_virt_start_addr !=NULL ) { risc_phys_jump_addr = - dev->_risc_phys_start_addr + -RISC_SYNC_INSTRUCTION_SIZE + -AUDIO_RISC_DMA_BUF_SIZE ; + dev->_risc_phys_start_addr + +RISC_SYNC_INSTRUCTION_SIZE + +AUDIO_RISC_DMA_BUF_SIZE ; rp = cx25821_risc_field_upstream_audio(dev, dev->_risc_virt_start_addr + 1,
@@ -632,7 +632,7 @@ static void cx25821_wait_fifo_enable(struct cx25821_dev *dev,/* 10 millisecond timeout */ if (count++ >1000 ) {pr_err ("ERROR: %s() fifo is NOT turned on. Timeout!\n" , - __func__); + __func__);return ; }
@@ -726,7 +726,7 @@ int cx25821_audio_upstream_init(struct cx25821_dev *dev, int channel_select)if (!dev->_irq_audio_queues) { printk(KERN_DEBUG - pr_fmt("ERROR: create_singlethread_workqueue() for Audio FAILED!\n")); + pr_fmt("ERROR: create_singlethread_workqueue() for Audio FAILED!\n"));return -ENOMEM ; }
@@ -764,8 +764,8 @@ int cx25821_audio_upstream_init(struct cx25821_dev *dev, int channel_select) _line_size, 0); dev->audio_upstream_riscbuf_size = -AUDIO_RISC_DMA_BUF_SIZE *NUM_AUDIO_PROGS + -RISC_SYNC_INSTRUCTION_SIZE ; +AUDIO_RISC_DMA_BUF_SIZE *NUM_AUDIO_PROGS + +RISC_SYNC_INSTRUCTION_SIZE ; dev->audio_upstream_databuf_size =AUDIO_DATA_BUF_SZ *NUM_AUDIO_PROGS ;/* Allocating buffers and prepare RISC program */
@@ -773,7 +773,7 @@ int cx25821_audio_upstream_init(struct cx25821_dev *dev, int channel_select) _line_size);if (retval <0 ) {pr_err ("%s: Failed to set up Audio upstream buffers!\n" , - dev->name); + dev->name); goto error; }/* Start RISC engine */
Signature · 1 line
1.7.0.4
PATCH 6/36 Staging: cx25821: cx25821-audio-upstream.c: Move operators
In reply to Leonid V. FedorenchikMove operator of complex expression to the end of the lines to preserve consistency.
--- drivers/staging/cx25821/cx25821-audio-upstream.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
drivers/staging/cx25821/cx25821-audio-upstream.c +3 -3
@@ -398,9 +398,9 @@ int cx25821_openfile_audio(struct cx25821_dev *dev, vfs_read_retval =vfs_read (myfile, mybuf, line_size, &pos); -if (vfs_read_retval >0 - && vfs_read_retval == line_size - && dev->_audiodata_buf_virt_addr !=NULL ) { +if (vfs_read_retval >0 && + vfs_read_retval == line_size && + dev->_audiodata_buf_virt_addr !=NULL ) { memcpy((void *)(dev-> _audiodata_buf_virt_addr + offset / 4), mybuf,
Signature · 1 line
1.7.0.4
PATCH 7/36 Staging: cx25821: cx25821-audio-upstream.c: Change line endings
In reply to Leonid V. FedorenchikChange obscure line endings to less obscure ones. (improve readability)
--- drivers/staging/cx25821/cx25821-audio-upstream.c | 54 ++++++++++------------ 1 files changed, 24 insertions(+), 30 deletions(-)
drivers/staging/cx25821/cx25821-audio-upstream.c +24 -30
@@ -175,10 +175,8 @@ int cx25821_risc_buffer_upstream_audio(struct cx25821_dev *dev, } rp =cx25821_risc_field_upstream_audio (dev, rp, - dev-> - _audiodata_buf_phys_addr - + databuf_offset, bpl, - fifo_enable); + dev->_audiodata_buf_phys_addr + databuf_offset, + bpl, fifo_enable);if (USE_RISC_NOOP_AUDIO ) {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++) { pos = file_offset; - vfs_read_retval = -vfs_read (myfile, mybuf, line_size, &pos); + vfs_read_retval =vfs_read (myfile, mybuf, line_size, + &pos);if (vfs_read_retval >0 && vfs_read_retval == line_size && dev->_audiodata_buf_virt_addr !=NULL ) {
@@ -328,8 +326,8 @@ int cx25821_get_audio_data(struct cx25821_dev *dev,if (i >0 ) dev->_audioframe_count++; - dev->_audiofile_status = - (vfs_read_retval == line_size) ?IN_PROGRESS :END_OF_FILE ; + dev->_audiofile_status = (vfs_read_retval == line_size) ? +IN_PROGRESS :END_OF_FILE ;set_fs (old_fs);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) { -struct cx25821_dev *dev = - container_of(work, struct cx25821_dev, _audio_work_entry); + struct cx25821_dev *dev = container_of(work, struct cx25821_dev, + _audio_work_entry);if (!dev) { 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++) { pos = offset; - vfs_read_retval = -vfs_read (myfile, mybuf, line_size, &pos); + vfs_read_retval =vfs_read (myfile, mybuf, + line_size, &pos); if (vfs_read_retval > 0 && vfs_read_retval == line_size &&
@@ -423,8 +421,8 @@ int cx25821_openfile_audio(struct cx25821_dev *dev,break ; } - dev->_audiofile_status = - (vfs_read_retval == line_size) ?IN_PROGRESS :END_OF_FILE ; + dev->_audiofile_status = (vfs_read_retval == line_size) ? +IN_PROGRESS :END_OF_FILE ;set_fs (old_fs); myfile->f_pos =0 ;
@@ -444,9 +442,8 @@ static int cx25821_audio_upstream_buffer_prepare(struct cx25821_dev *dev,cx25821_free_memory_audio (dev); - dev->_risc_virt_addr = -pci_alloc_consistent (dev->pci, dev->audio_upstream_riscbuf_size, - &dma_addr); + dev->_risc_virt_addr =pci_alloc_consistent (dev->pci, + dev->audio_upstream_riscbuf_size, &dma_addr); dev->_risc_virt_start_addr = dev->_risc_virt_addr; dev->_risc_phys_start_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);/* For Audio Data buffer allocation */ - dev->_audiodata_buf_virt_addr = -pci_alloc_consistent (dev->pci, dev->audio_upstream_databuf_size, - &data_dma_addr); + dev->_audiodata_buf_virt_addr =pci_alloc_consistent (dev->pci, + dev->audio_upstream_databuf_size, &data_dma_addr); dev->_audiodata_buf_phys_addr = data_dma_addr; 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;/* Creating RISC programs */ - ret = -cx25821_risc_buffer_upstream_audio (dev, dev->pci, bpl, - dev->_audio_lines_count); + ret =cx25821_risc_buffer_upstream_audio (dev, dev->pci, bpl, + dev->_audio_lines_count);if (ret <0 ) { printk(KERN_DEBUG 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 */ tmp =cx_read (sram_ch->aud_cfg); - tmp |= -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_SONY_MODE ; + tmp |=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_SONY_MODE ;cx_write (sram_ch->aud_cfg, tmp);/* 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);cx_write (sram_ch->int_msk, tmp |= _intr_msk); - err = -request_irq (dev->pci->irq, cx25821_upstream_irq_audio, + err =request_irq (dev->pci->irq, cx25821_upstream_irq_audio,IRQF_SHARED |IRQF_DISABLED , dev->name, dev);if (err <0 ) { -pr_err ("%s: can't get upstream IRQ %d\n" , - dev->name, dev->pci->irq); +pr_err ("%s: can't get upstream IRQ %d\n" , dev->name, + dev->pci->irq); goto fail_irq; }
Signature · 1 line
1.7.0.4
PATCH 8/36 Staging: cx25821: cx25821-audio.h: Line up defines
In reply to Leonid V. FedorenchikLine up defines to the same column.
--- drivers/staging/cx25821/cx25821-audio.h | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
drivers/staging/cx25821/cx25821-audio.h +4 -4
@@ -23,12 +23,12 @@#ifndef __CX25821_AUDIO_H__#define __CX25821_AUDIO_H__ -#define USE_RISC_NOOP 1 -#define LINES_PER_BUFFER 15 -#define AUDIO_LINE_SIZE 128 +#define USE_RISC_NOOP 1 +#define LINES_PER_BUFFER 15 +#define AUDIO_LINE_SIZE 128/* Number of buffer programs to use at once. */ -#define NUMBER_OF_PROGRAMS 8 +#define NUMBER_OF_PROGRAMS 8/* * Max size of the RISC program for a buffer. - worst case is 2 writes per line
Signature · 1 line
1.7.0.4
PATCH 9/36 Staging: cx25821: cx25821-audio.h: Fix multiline defines
In reply to Leonid V. FedorenchikChange column of line continuation character ('\') and fix indent of multiline defines.
Also line up remaining constant defines.
--- drivers/staging/cx25821/cx25821-audio.h | 31 ++++++++++++++++--------------- 1 files changed, 16 insertions(+), 15 deletions(-)
drivers/staging/cx25821/cx25821-audio.h +16 -15
@@ -35,27 +35,28 @@* Space is also added for the 4 no-op instructions added on the end. */ #ifndef USE_RISC_NOOP -#define MAX_BUFFER_PROGRAM_SIZE \ - (2 * LINES_PER_BUFFER * RISC_WRITE_INSTRUCTION_SIZE + \ - RISC_WRITECR_INSTRUCTION_SIZE * 4) +#define MAX_BUFFER_PROGRAM_SIZE \ + (2 * LINES_PER_BUFFER * RISC_WRITE_INSTRUCTION_SIZE + \ + RISC_WRITECR_INSTRUCTION_SIZE * 4)#endif /* MAE 12 July 2005 Try to use NOOP RISC instruction instead */ #ifdef USE_RISC_NOOP -#define MAX_BUFFER_PROGRAM_SIZE \ - (2 * LINES_PER_BUFFER * RISC_WRITE_INSTRUCTION_SIZE + \ - RISC_NOOP_INSTRUCTION_SIZE * 4) +#define MAX_BUFFER_PROGRAM_SIZE \ + (2 * LINES_PER_BUFFER * RISC_WRITE_INSTRUCTION_SIZE + \ + RISC_NOOP_INSTRUCTION_SIZE * 4)#endif /* Sizes of various instructions in bytes. Used when adding instructions. */ -#define RISC_WRITE_INSTRUCTION_SIZE 12 -#define RISC_JUMP_INSTRUCTION_SIZE 12 -#define RISC_SKIP_INSTRUCTION_SIZE 4 -#define RISC_SYNC_INSTRUCTION_SIZE 4 -#define RISC_WRITECR_INSTRUCTION_SIZE 16 -#define RISC_NOOP_INSTRUCTION_SIZE 4 - -#define MAX_AUDIO_DMA_BUFFER_SIZE \ -(MAX_BUFFER_PROGRAM_SIZE * NUMBER_OF_PROGRAMS + RISC_SYNC_INSTRUCTION_SIZE) +#define RISC_WRITE_INSTRUCTION_SIZE 12 +#define RISC_JUMP_INSTRUCTION_SIZE 12 +#define RISC_SKIP_INSTRUCTION_SIZE 4 +#define RISC_SYNC_INSTRUCTION_SIZE 4 +#define RISC_WRITECR_INSTRUCTION_SIZE 16 +#define RISC_NOOP_INSTRUCTION_SIZE 4 + +#define MAX_AUDIO_DMA_BUFFER_SIZE \ + (MAX_BUFFER_PROGRAM_SIZE * NUMBER_OF_PROGRAMS + \ + RISC_SYNC_INSTRUCTION_SIZE)#endif
Signature · 1 line
1.7.0.4
PATCH 10/36 Staging: cx25821: cx25821-cards.c: Fix indent
In reply to Leonid V. FedorenchikFix indent of statement to use tab instead of spaces.
--- drivers/staging/cx25821/cx25821-cards.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/staging/cx25821/cx25821-cards.c +1 -1
@@ -67,6 +67,6 @@ void cx25821_card_setup(struct cx25821_dev *dev)if (dev->i2c_bus[0 ].i2c_rc ==0 ) { dev->i2c_bus[0 ].i2c_client.addr =0xa0 >>1 ;tveeprom_read (&dev->i2c_bus[0 ].i2c_client, eeprom, -sizeof (eeprom)); +sizeof (eeprom)); } }
Signature · 1 line
1.7.0.4
PATCH 11/36 Staging: cx25821: cx25821-core.c: Delete empty line
In reply to Leonid V. FedorenchikDelete redundant empty line.
--- drivers/staging/cx25821/cx25821-core.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
drivers/staging/cx25821/cx25821-core.c +0 -1
@@ -1512,6 +1512,5 @@ static void __exit cx25821_fini(void)pci_unregister_driver (&cx25821_pci_driver); } -module_init (cx25821_init);module_exit (cx25821_fini);
Signature · 1 line
1.7.0.4
PATCH 12/36 Staging: cx25821: cx25821-core.c: Fix indent
In reply to Leonid V. FedorenchikChange indent of statements that indented with spaces to indent with tabs.
--- drivers/staging/cx25821/cx25821-core.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
drivers/staging/cx25821/cx25821-core.c +4 -4
@@ -869,7 +869,7 @@ static int cx25821_get_resources(struct cx25821_dev *dev)return 0 ;pr_err ("%s: can't get MMIO memory @ 0x%llx\n" , - dev->name, (unsigned long long )pci_resource_start (dev->pci,0 )); + dev->name, (unsigned long long )pci_resource_start (dev->pci,0 ));return -EBUSY ; }
@@ -994,7 +994,7 @@ static int cx25821_dev_setup(struct cx25821_dev *dev)* cx25821_i2c_register(&dev->i2c_bus[2]); */ CX25821_INFO ("i2c register! bus->i2c_rc = %d\n" , - dev->i2c_bus[0 ].i2c_rc); + dev->i2c_bus[0 ].i2c_rc);cx25821_card_setup (dev);
@@ -1224,7 +1224,7 @@ static __le32 *cx25821_risc_field_audio(__le32 * rp, struct scatterlist *sglist,/* scanline needs to be split */ todo = bpl; *(rp++) =cpu_to_le32 (RISC_WRITE | sol | - (sg_dma_len (sg) - offset)); + (sg_dma_len (sg) - offset)); *(rp++) =cpu_to_le32 (sg_dma_address (sg) + offset); *(rp++) =cpu_to_le32 (0 );/* bits 63-32 */ todo -= (sg_dma_len (sg) - offset);
@@ -1232,7 +1232,7 @@ static __le32 *cx25821_risc_field_audio(__le32 * rp, struct scatterlist *sglist, sg++;while (todo >sg_dma_len (sg)) { *(rp++) =cpu_to_le32 (RISC_WRITE | -sg_dma_len (sg)); +sg_dma_len (sg)); *(rp++) =cpu_to_le32 (sg_dma_address (sg)); *(rp++) =cpu_to_le32 (0 );/* bits 63-32 */ todo -=sg_dma_len (sg);
Signature · 1 line
1.7.0.4
PATCH 13/36 Staging: cx25821: cx25821-core.c: Change line endings
In reply to Leonid V. FedorenchikChange obscure line endings to less obscure ones. (improve readability)
--- drivers/staging/cx25821/cx25821-core.c | 48 ++++++++++++++------------------ 1 files changed, 21 insertions(+), 27 deletions(-)
drivers/staging/cx25821/cx25821-core.c +21 -27
@@ -804,8 +804,8 @@ void cx25821_set_pixel_format(struct cx25821_dev *dev, int channel_select, u32 format) {if (channel_select <=7 && channel_select >=0 ) { -cx_write (dev->channels[channel_select]. - sram_channels->pix_frmt, format); +cx_write (dev->channels[channel_select].sram_channels->pix_frmt, + format); dev->channels[channel_select].pixel_formats = format; } }
@@ -855,17 +855,15 @@ static void cx25821_initialize(struct cx25821_dev *dev) }cx25821_sram_channel_setup_audio (dev, - dev->channels[SRAM_CH08 ].sram_channels, -128 ,0 ); + dev->channels[SRAM_CH08 ].sram_channels,128 ,0 );cx25821_gpio_init (dev); }static int cx25821_get_resources (struct cx25821_dev *dev) { -if (request_mem_region - (pci_resource_start (dev->pci,0 ),pci_resource_len (dev->pci,0 ), - dev->name)) +if (request_mem_region (pci_resource_start (dev->pci,0 ), +pci_resource_len (dev->pci,0 ), dev->name))return 0 ; pr_err("%s: can't get MMIO memory @ 0x%llx\n",
@@ -972,8 +970,7 @@ static int cx25821_dev_setup(struct cx25821_dev *dev) dev->lmmio =ioremap (dev->base_io_addr,pci_resource_len (dev->pci,0 ));if (!dev->lmmio) { -CX25821_ERR - ("ioremap failed, maybe increasing __VMALLOC_RESERVE in page.h\n" ); +CX25821_ERR ("ioremap failed, maybe increasing __VMALLOC_RESERVE in page.h\n" );cx25821_iounmap (dev);return -ENOMEM ; }
@@ -1004,9 +1001,8 @@ static int cx25821_dev_setup(struct cx25821_dev *dev)cx25821_video_register (dev);/* register IOCTL device */ - dev->ioctl_dev = -cx25821_vdev_init (dev, dev->pci, &cx25821_videoioctl_template, -"video" ); + dev->ioctl_dev =cx25821_vdev_init (dev, dev->pci, + &cx25821_videoioctl_template,"video" );if (video_register_device (dev->ioctl_dev,VFL_TYPE_GRABBER ,VIDEO_IOCTL_CH ) <0 ) {
@@ -1103,16 +1099,15 @@ static __le32 *cx25821_risc_field(__le32 * rp, struct scatterlist *sglist, }if (bpl <=sg_dma_len (sg) - offset) {/* fits into current chunk */ - *(rp++) = -cpu_to_le32 (RISC_WRITE |RISC_SOL |RISC_EOL | bpl); + *(rp++) =cpu_to_le32 (RISC_WRITE |RISC_SOL |RISC_EOL | + bpl); *(rp++) =cpu_to_le32 (sg_dma_address (sg) + offset); *(rp++) =cpu_to_le32 (0 );/* bits 63-32 */ offset += bpl; }else {/* scanline needs to be split */ todo = bpl; - *(rp++) = -cpu_to_le32 (RISC_WRITE |RISC_SOL | + *(rp++) =cpu_to_le32 (RISC_WRITE |RISC_SOL | (sg_dma_len (sg) - offset)); *(rp++) =cpu_to_le32 (sg_dma_address (sg) + offset); *(rp++) =cpu_to_le32 (0 );/* bits 63-32 */
@@ -1120,8 +1115,8 @@ static __le32 *cx25821_risc_field(__le32 * rp, struct scatterlist *sglist, offset =0 ; sg++;while (todo >sg_dma_len (sg)) { - *(rp++) = -cpu_to_le32 (RISC_WRITE |sg_dma_len (sg)); + *(rp++) =cpu_to_le32 (RISC_WRITE | +sg_dma_len (sg)); *(rp++) =cpu_to_le32 (sg_dma_address (sg)); *(rp++) =cpu_to_le32 (0 );/* bits 63-32 */ todo -=sg_dma_len (sg);
@@ -1160,8 +1155,8 @@ int cx25821_risc_buffer(struct pci_dev *pci, struct btcx_riscmem *risc,can cause next bpl to start close to a page border. First DMA region may be smaller than PAGE_SIZE */ /* write and jump need and extra dword */ - instructions = - fields * (1 + ((bpl + padding) * lines) /PAGE_SIZE + lines); + instructions = fields * (1 + ((bpl + padding) * lines) /PAGE_SIZE + + lines); instructions +=2 ; rc =btcx_riscmem_alloc (pci, risc, instructions *12 );
@@ -1215,8 +1210,8 @@ static __le32 *cx25821_risc_field_audio(__le32 * rp, struct scatterlist *sglist,if (bpl <=sg_dma_len (sg) - offset) {/* fits into current chunk */ - *(rp++) = -cpu_to_le32 (RISC_WRITE | sol |RISC_EOL | bpl); + *(rp++) =cpu_to_le32 (RISC_WRITE | sol |RISC_EOL | + bpl); *(rp++) =cpu_to_le32 (sg_dma_address (sg) + offset); *(rp++) =cpu_to_le32 (0 );/* bits 63-32 */ offset += bpl;
@@ -1339,8 +1334,8 @@ static irqreturn_t cx25821_irq(int irq, void *dev_id) sram_channels->int_stat);if (vid_status) - handled += -cx25821_video_irq (dev, i, vid_status); + handled +=cx25821_video_irq (dev, i, + vid_status);cx_write (PCI_INT_STAT , mask[i]); }
@@ -1427,9 +1422,8 @@ static int __devinit cx25821_initdev(struct pci_dev *pci_dev, goto fail_irq; } - err = -request_irq (pci_dev->irq, cx25821_irq,IRQF_SHARED |IRQF_DISABLED , - dev->name, dev); + err =request_irq (pci_dev->irq, cx25821_irq, +IRQF_SHARED |IRQF_DISABLED , dev->name, dev);if (err <0 ) {pr_err ("%s: can't get IRQ %d\n" , dev->name, pci_dev->irq);
Signature · 1 line
1.7.0.4
PATCH 14/36 Staging: cx25821: cx25821-i2c.c: Change line endings
In reply to Leonid V. FedorenchikChange obscure line endings to less obscure ones. (improve readability)
--- drivers/staging/cx25821/cx25821-i2c.c | 10 ++++------ 1 files changed, 4 insertions(+), 6 deletions(-)
drivers/staging/cx25821/cx25821-i2c.c +4 -6
@@ -252,8 +252,8 @@ static int i2c_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg *msgs, int num) }else if (i +1 < num && (msgs[i +1 ].flags &I2C_M_RD ) && msgs[i].addr == msgs[i +1 ].addr) {/* write then read from same address */ - retval = -i2c_sendbytes (i2c_adap, &msgs[i], msgs[i +1 ].len); + retval =i2c_sendbytes (i2c_adap, &msgs[i], + msgs[i +1 ].len);if (retval <0 ) goto err;
@@ -276,10 +276,8 @@ err:static u32 cx25821_functionality (struct i2c_adapter *adap) { -return I2C_FUNC_SMBUS_EMUL | -I2C_FUNC_I2C | -I2C_FUNC_SMBUS_WORD_DATA | -I2C_FUNC_SMBUS_READ_WORD_DATA |I2C_FUNC_SMBUS_WRITE_WORD_DATA ; +return I2C_FUNC_SMBUS_EMUL |I2C_FUNC_I2C |I2C_FUNC_SMBUS_WORD_DATA | +I2C_FUNC_SMBUS_READ_WORD_DATA |I2C_FUNC_SMBUS_WRITE_WORD_DATA ; }static struct i2c_algorithm cx25821_i2c_algo_template = {
Signature · 1 line
1.7.0.4
PATCH 15/36 Staging: cx25821: cx25821-medusa-defines.h: Fix typo
In reply to Leonid V. FedorenchikFix typo in comment in word 'decoder'.
--- drivers/staging/cx25821/cx25821-medusa-defines.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/staging/cx25821/cx25821-medusa-defines.h +1 -1
@@ -23,7 +23,7 @@#ifndef _MEDUSA_DEF_H_#define _MEDUSA_DEF_H_ -/* Video deocder that we supported */ +/* Video decoder that we supported */ #define VDEC_A 0#define VDEC_B 1#define VDEC_C 2
Signature · 1 line
1.7.0.4
PATCH 16/36 Staging: cx25821: cx25821-medusa-defines.h: Line up defines
In reply to Leonid V. FedorenchikLine up constant defines to the same column.
--- drivers/staging/cx25821/cx25821-medusa-defines.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/staging/cx25821/cx25821-medusa-defines.h +2 -2
@@ -34,9 +34,9 @@#define VDEC_H 7/* end of display sequence */ -#define END_OF_SEQ 0xF; +#define END_OF_SEQ 0xF;/* registry string size */ -#define MAX_REGISTRY_SZ 40; +#define MAX_REGISTRY_SZ 40;#endif
Signature · 1 line
1.7.0.4
PATCH 17/36 Staging: cx25821: cx25821-medusa-reg.h: Line up defines
In reply to Leonid V. FedorenchikLine up constant defines to the same column. (also delete unnecessary spaces in comments)
--- drivers/staging/cx25821/cx25821-medusa-reg.h | 518 +++++++++++++------------- 1 files changed, 259 insertions(+), 259 deletions(-)
drivers/staging/cx25821/cx25821-medusa-reg.h +259 -259
@@ -28,22 +28,22 @@#define HOST_REGISTER2 0x0001/* Chip Configuration Registers */ -#define CHIP_CTRL 0x0100 -#define AFE_AB_CTRL 0x0104 -#define AFE_CD_CTRL 0x0108 -#define AFE_EF_CTRL 0x010C -#define AFE_GH_CTRL 0x0110 +#define CHIP_CTRL 0x0100 +#define AFE_AB_CTRL 0x0104 +#define AFE_CD_CTRL 0x0108 +#define AFE_EF_CTRL 0x010C +#define AFE_GH_CTRL 0x0110#define DENC_AB_CTRL 0x0114 -#define BYP_AB_CTRL 0x0118 -#define MON_A_CTRL 0x011C -#define DISP_SEQ_A 0x0120 -#define DISP_SEQ_B 0x0124 -#define DISP_AB_CNT 0x0128 -#define DISP_CD_CNT 0x012C -#define DISP_EF_CNT 0x0130 -#define DISP_GH_CNT 0x0134 -#define DISP_IJ_CNT 0x0138 -#define PIN_OE_CTRL 0x013C +#define BYP_AB_CTRL 0x0118 +#define MON_A_CTRL 0x011C +#define DISP_SEQ_A 0x0120 +#define DISP_SEQ_B 0x0124 +#define DISP_AB_CNT 0x0128 +#define DISP_CD_CNT 0x012C +#define DISP_EF_CNT 0x0130 +#define DISP_GH_CNT 0x0134 +#define DISP_IJ_CNT 0x0138 +#define PIN_OE_CTRL 0x013C#define PIN_SPD_CTRL 0x0140#define PIN_SPD_CTRL2 0x0144#define IRQ_STAT_CTRL 0x0148
@@ -51,8 +51,8 @@#define POWER_CTRL_CD 0x0150#define POWER_CTRL_EF 0x0154#define POWER_CTRL_GH 0x0158 -#define TUNE_CTRL 0x015C -#define BIAS_CTRL 0x0160 +#define TUNE_CTRL 0x015C +#define BIAS_CTRL 0x0160#define AFE_AB_DIAG_CTRL 0x0164#define AFE_CD_DIAG_CTRL 0x0168#define AFE_EF_DIAG_CTRL 0x016C
@@ -61,17 +61,17 @@#define PLL_CD_DIAG_CTRL 0x0178#define PLL_EF_DIAG_CTRL 0x017C#define PLL_GH_DIAG_CTRL 0x0180 -#define TEST_CTRL 0x0184 -#define BIST_STAT 0x0188 -#define BIST_STAT2 0x018C -#define BIST_VID_PLL_AB_STAT 0x0190 -#define BIST_VID_PLL_CD_STAT 0x0194 -#define BIST_VID_PLL_EF_STAT 0x0198 -#define BIST_VID_PLL_GH_STAT 0x019C +#define TEST_CTRL 0x0184 +#define BIST_STAT 0x0188 +#define BIST_STAT2 0x018C +#define BIST_VID_PLL_AB_STAT 0x0190 +#define BIST_VID_PLL_CD_STAT 0x0194 +#define BIST_VID_PLL_EF_STAT 0x0198 +#define BIST_VID_PLL_GH_STAT 0x019C#define DLL_DIAG_CTRL 0x01A0#define DEV_CH_ID_CTRL 0x01A4#define ABIST_CTRL_STATUS 0x01A8 -#define ABIST_FREQ 0x01AC +#define ABIST_FREQ 0x01AC#define ABIST_GOERT_SHIFT 0x01B0#define ABIST_COEF12 0x01B4#define ABIST_COEF34 0x01B8
@@ -92,357 +92,357 @@#define ABIST_CLAMP_E 0x01F4#define ABIST_CLAMP_F 0x01F8 -/* Digital Video Encoder A Registers */ -#define DENC_A_REG_1 0x0200 -#define DENC_A_REG_2 0x0204 -#define DENC_A_REG_3 0x0208 -#define DENC_A_REG_4 0x020C -#define DENC_A_REG_5 0x0210 -#define DENC_A_REG_6 0x0214 -#define DENC_A_REG_7 0x0218 -#define DENC_A_REG_8 0x021C +/* Digital Video Encoder A Registers */ +#define DENC_A_REG_1 0x0200 +#define DENC_A_REG_2 0x0204 +#define DENC_A_REG_3 0x0208 +#define DENC_A_REG_4 0x020C +#define DENC_A_REG_5 0x0210 +#define DENC_A_REG_6 0x0214 +#define DENC_A_REG_7 0x0218 +#define DENC_A_REG_8 0x021C -/* Digital Video Encoder B Registers */ -#define DENC_B_REG_1 0x0300 -#define DENC_B_REG_2 0x0304 -#define DENC_B_REG_3 0x0308 -#define DENC_B_REG_4 0x030C -#define DENC_B_REG_5 0x0310 -#define DENC_B_REG_6 0x0314 -#define DENC_B_REG_7 0x0318 -#define DENC_B_REG_8 0x031C +/* Digital Video Encoder B Registers */ +#define DENC_B_REG_1 0x0300 +#define DENC_B_REG_2 0x0304 +#define DENC_B_REG_3 0x0308 +#define DENC_B_REG_4 0x030C +#define DENC_B_REG_5 0x0310 +#define DENC_B_REG_6 0x0314 +#define DENC_B_REG_7 0x0318 +#define DENC_B_REG_8 0x031C -/* Video Decoder A Registers */ -#define MODE_CTRL 0x1000 -#define OUT_CTRL1 0x1004 -#define OUT_CTRL_NS 0x1008 -#define GEN_STAT 0x100C -#define INT_STAT_MASK 0x1010 -#define LUMA_CTRL 0x1014 -#define CHROMA_CTRL 0x1018 -#define CRUSH_CTRL 0x101C -#define HORIZ_TIM_CTRL 0x1020 -#define VERT_TIM_CTRL 0x1024 -#define MISC_TIM_CTRL 0x1028 -#define FIELD_COUNT 0x102C -#define HSCALE_CTRL 0x1030 -#define VSCALE_CTRL 0x1034 -#define MAN_VGA_CTRL 0x1038 -#define MAN_AGC_CTRL 0x103C -#define DFE_CTRL1 0x1040 -#define DFE_CTRL2 0x1044 -#define DFE_CTRL3 0x1048 -#define PLL_CTRL 0x104C -#define PLL_CTRL_FAST 0x1050 -#define HTL_CTRL 0x1054 -#define SRC_CFG 0x1058 -#define SC_STEP_SIZE 0x105C -#define SC_CONVERGE_CTRL 0x1060 -#define SC_LOOP_CTRL 0x1064 -#define COMB_2D_HFS_CFG 0x1068 -#define COMB_2D_HFD_CFG 0x106C -#define COMB_2D_LF_CFG 0x1070 -#define COMB_2D_BLEND 0x1074 -#define COMB_MISC_CTRL 0x1078 +/* Video Decoder A Registers */ +#define MODE_CTRL 0x1000 +#define OUT_CTRL1 0x1004 +#define OUT_CTRL_NS 0x1008 +#define GEN_STAT 0x100C +#define INT_STAT_MASK 0x1010 +#define LUMA_CTRL 0x1014 +#define CHROMA_CTRL 0x1018 +#define CRUSH_CTRL 0x101C +#define HORIZ_TIM_CTRL 0x1020 +#define VERT_TIM_CTRL 0x1024 +#define MISC_TIM_CTRL 0x1028 +#define FIELD_COUNT 0x102C +#define HSCALE_CTRL 0x1030 +#define VSCALE_CTRL 0x1034 +#define MAN_VGA_CTRL 0x1038 +#define MAN_AGC_CTRL 0x103C +#define DFE_CTRL1 0x1040 +#define DFE_CTRL2 0x1044 +#define DFE_CTRL3 0x1048 +#define PLL_CTRL 0x104C +#define PLL_CTRL_FAST 0x1050 +#define HTL_CTRL 0x1054 +#define SRC_CFG 0x1058 +#define SC_STEP_SIZE 0x105C +#define SC_CONVERGE_CTRL 0x1060 +#define SC_LOOP_CTRL 0x1064 +#define COMB_2D_HFS_CFG 0x1068 +#define COMB_2D_HFD_CFG 0x106C +#define COMB_2D_LF_CFG 0x1070 +#define COMB_2D_BLEND 0x1074 +#define COMB_MISC_CTRL 0x1078#define COMB_FLAT_THRESH_CTRL 0x107C -#define COMB_TEST 0x1080 -#define BP_MISC_CTRL 0x1084 -#define VCR_DET_CTRL 0x1088 -#define NOISE_DET_CTRL 0x108C +#define COMB_TEST 0x1080 +#define BP_MISC_CTRL 0x1084 +#define VCR_DET_CTRL 0x1088 +#define NOISE_DET_CTRL 0x108C#define COMB_FLAT_NOISE_CTRL 0x1090 -#define VERSION 0x11F8 -#define SOFT_RST_CTRL 0x11FC +#define VERSION 0x11F8 +#define SOFT_RST_CTRL 0x11FC -/* Video Decoder B Registers */ -#define VDEC_B_MODE_CTRL 0x1200 -#define VDEC_B_OUT_CTRL1 0x1204 -#define VDEC_B_OUT_CTRL_NS 0x1208 -#define VDEC_B_GEN_STAT 0x120C +/* Video Decoder B Registers */ +#define VDEC_B_MODE_CTRL 0x1200 +#define VDEC_B_OUT_CTRL1 0x1204 +#define VDEC_B_OUT_CTRL_NS 0x1208 +#define VDEC_B_GEN_STAT 0x120C#define VDEC_B_INT_STAT_MASK 0x1210 -#define VDEC_B_LUMA_CTRL 0x1214 -#define VDEC_B_CHROMA_CTRL 0x1218 -#define VDEC_B_CRUSH_CTRL 0x121C +#define VDEC_B_LUMA_CTRL 0x1214 +#define VDEC_B_CHROMA_CTRL 0x1218 +#define VDEC_B_CRUSH_CTRL 0x121C#define VDEC_B_HORIZ_TIM_CTRL 0x1220#define VDEC_B_VERT_TIM_CTRL 0x1224#define VDEC_B_MISC_TIM_CTRL 0x1228 -#define VDEC_B_FIELD_COUNT 0x122C -#define VDEC_B_HSCALE_CTRL 0x1230 -#define VDEC_B_VSCALE_CTRL 0x1234 -#define VDEC_B_MAN_VGA_CTRL 0x1238 -#define VDEC_B_MAN_AGC_CTRL 0x123C -#define VDEC_B_DFE_CTRL1 0x1240 -#define VDEC_B_DFE_CTRL2 0x1244 -#define VDEC_B_DFE_CTRL3 0x1248 -#define VDEC_B_PLL_CTRL 0x124C +#define VDEC_B_FIELD_COUNT 0x122C +#define VDEC_B_HSCALE_CTRL 0x1230 +#define VDEC_B_VSCALE_CTRL 0x1234 +#define VDEC_B_MAN_VGA_CTRL 0x1238 +#define VDEC_B_MAN_AGC_CTRL 0x123C +#define VDEC_B_DFE_CTRL1 0x1240 +#define VDEC_B_DFE_CTRL2 0x1244 +#define VDEC_B_DFE_CTRL3 0x1248 +#define VDEC_B_PLL_CTRL 0x124C#define VDEC_B_PLL_CTRL_FAST 0x1250 -#define VDEC_B_HTL_CTRL 0x1254 -#define VDEC_B_SRC_CFG 0x1258 -#define VDEC_B_SC_STEP_SIZE 0x125C +#define VDEC_B_HTL_CTRL 0x1254 +#define VDEC_B_SRC_CFG 0x1258 +#define VDEC_B_SC_STEP_SIZE 0x125C#define VDEC_B_SC_CONVERGE_CTRL 0x1260 -#define VDEC_B_SC_LOOP_CTRL 0x1264 +#define VDEC_B_SC_LOOP_CTRL 0x1264#define VDEC_B_COMB_2D_HFS_CFG 0x1268#define VDEC_B_COMB_2D_HFD_CFG 0x126C#define VDEC_B_COMB_2D_LF_CFG 0x1270#define VDEC_B_COMB_2D_BLEND 0x1274#define VDEC_B_COMB_MISC_CTRL 0x1278 -#define VDEC_B_COMB_FLAT_THRESH_CTRL 0x127C -#define VDEC_B_COMB_TEST 0x1280 -#define VDEC_B_BP_MISC_CTRL 0x1284 -#define VDEC_B_VCR_DET_CTRL 0x1288 +#define VDEC_B_COMB_FLAT_THRESH_CTRL 0x127C +#define VDEC_B_COMB_TEST 0x1280 +#define VDEC_B_BP_MISC_CTRL 0x1284 +#define VDEC_B_VCR_DET_CTRL 0x1288#define VDEC_B_NOISE_DET_CTRL 0x128C#define VDEC_B_COMB_FLAT_NOISE_CTRL 0x1290 -#define VDEC_B_VERSION 0x13F8 +#define VDEC_B_VERSION 0x13F8#define VDEC_B_SOFT_RST_CTRL 0x13FC/* Video Decoder C Registers */ -#define VDEC_C_MODE_CTRL 0x1400 -#define VDEC_C_OUT_CTRL1 0x1404 -#define VDEC_C_OUT_CTRL_NS 0x1408 -#define VDEC_C_GEN_STAT 0x140C +#define VDEC_C_MODE_CTRL 0x1400 +#define VDEC_C_OUT_CTRL1 0x1404 +#define VDEC_C_OUT_CTRL_NS 0x1408 +#define VDEC_C_GEN_STAT 0x140C#define VDEC_C_INT_STAT_MASK 0x1410 -#define VDEC_C_LUMA_CTRL 0x1414 -#define VDEC_C_CHROMA_CTRL 0x1418 -#define VDEC_C_CRUSH_CTRL 0x141C +#define VDEC_C_LUMA_CTRL 0x1414 +#define VDEC_C_CHROMA_CTRL 0x1418 +#define VDEC_C_CRUSH_CTRL 0x141C#define VDEC_C_HORIZ_TIM_CTRL 0x1420#define VDEC_C_VERT_TIM_CTRL 0x1424#define VDEC_C_MISC_TIM_CTRL 0x1428 -#define VDEC_C_FIELD_COUNT 0x142C -#define VDEC_C_HSCALE_CTRL 0x1430 -#define VDEC_C_VSCALE_CTRL 0x1434 -#define VDEC_C_MAN_VGA_CTRL 0x1438 -#define VDEC_C_MAN_AGC_CTRL 0x143C -#define VDEC_C_DFE_CTRL1 0x1440 -#define VDEC_C_DFE_CTRL2 0x1444 -#define VDEC_C_DFE_CTRL3 0x1448 -#define VDEC_C_PLL_CTRL 0x144C +#define VDEC_C_FIELD_COUNT 0x142C +#define VDEC_C_HSCALE_CTRL 0x1430 +#define VDEC_C_VSCALE_CTRL 0x1434 +#define VDEC_C_MAN_VGA_CTRL 0x1438 +#define VDEC_C_MAN_AGC_CTRL 0x143C +#define VDEC_C_DFE_CTRL1 0x1440 +#define VDEC_C_DFE_CTRL2 0x1444 +#define VDEC_C_DFE_CTRL3 0x1448 +#define VDEC_C_PLL_CTRL 0x144C#define VDEC_C_PLL_CTRL_FAST 0x1450 -#define VDEC_C_HTL_CTRL 0x1454 -#define VDEC_C_SRC_CFG 0x1458 -#define VDEC_C_SC_STEP_SIZE 0x145C +#define VDEC_C_HTL_CTRL 0x1454 +#define VDEC_C_SRC_CFG 0x1458 +#define VDEC_C_SC_STEP_SIZE 0x145C#define VDEC_C_SC_CONVERGE_CTRL 0x1460 -#define VDEC_C_SC_LOOP_CTRL 0x1464 +#define VDEC_C_SC_LOOP_CTRL 0x1464#define VDEC_C_COMB_2D_HFS_CFG 0x1468#define VDEC_C_COMB_2D_HFD_CFG 0x146C#define VDEC_C_COMB_2D_LF_CFG 0x1470#define VDEC_C_COMB_2D_BLEND 0x1474#define VDEC_C_COMB_MISC_CTRL 0x1478 -#define VDEC_C_COMB_FLAT_THRESH_CTRL 0x147C -#define VDEC_C_COMB_TEST 0x1480 -#define VDEC_C_BP_MISC_CTRL 0x1484 -#define VDEC_C_VCR_DET_CTRL 0x1488 +#define VDEC_C_COMB_FLAT_THRESH_CTRL 0x147C +#define VDEC_C_COMB_TEST 0x1480 +#define VDEC_C_BP_MISC_CTRL 0x1484 +#define VDEC_C_VCR_DET_CTRL 0x1488#define VDEC_C_NOISE_DET_CTRL 0x148C#define VDEC_C_COMB_FLAT_NOISE_CTRL 0x1490 -#define VDEC_C_VERSION 0x15F8 +#define VDEC_C_VERSION 0x15F8#define VDEC_C_SOFT_RST_CTRL 0x15FC/* Video Decoder D Registers */ -#define VDEC_D_MODE_CTRL 0x1600 -#define VDEC_D_OUT_CTRL1 0x1604 -#define VDEC_D_OUT_CTRL_NS 0x1608 -#define VDEC_D_GEN_STAT 0x160C +#define VDEC_D_MODE_CTRL 0x1600 +#define VDEC_D_OUT_CTRL1 0x1604 +#define VDEC_D_OUT_CTRL_NS 0x1608 +#define VDEC_D_GEN_STAT 0x160C#define VDEC_D_INT_STAT_MASK 0x1610 -#define VDEC_D_LUMA_CTRL 0x1614 -#define VDEC_D_CHROMA_CTRL 0x1618 -#define VDEC_D_CRUSH_CTRL 0x161C +#define VDEC_D_LUMA_CTRL 0x1614 +#define VDEC_D_CHROMA_CTRL 0x1618 +#define VDEC_D_CRUSH_CTRL 0x161C#define VDEC_D_HORIZ_TIM_CTRL 0x1620#define VDEC_D_VERT_TIM_CTRL 0x1624#define VDEC_D_MISC_TIM_CTRL 0x1628 -#define VDEC_D_FIELD_COUNT 0x162C -#define VDEC_D_HSCALE_CTRL 0x1630 -#define VDEC_D_VSCALE_CTRL 0x1634 -#define VDEC_D_MAN_VGA_CTRL 0x1638 -#define VDEC_D_MAN_AGC_CTRL 0x163C -#define VDEC_D_DFE_CTRL1 0x1640 -#define VDEC_D_DFE_CTRL2 0x1644 -#define VDEC_D_DFE_CTRL3 0x1648 -#define VDEC_D_PLL_CTRL 0x164C +#define VDEC_D_FIELD_COUNT 0x162C +#define VDEC_D_HSCALE_CTRL 0x1630 +#define VDEC_D_VSCALE_CTRL 0x1634 +#define VDEC_D_MAN_VGA_CTRL 0x1638 +#define VDEC_D_MAN_AGC_CTRL 0x163C +#define VDEC_D_DFE_CTRL1 0x1640 +#define VDEC_D_DFE_CTRL2 0x1644 +#define VDEC_D_DFE_CTRL3 0x1648 +#define VDEC_D_PLL_CTRL 0x164C#define VDEC_D_PLL_CTRL_FAST 0x1650 -#define VDEC_D_HTL_CTRL 0x1654 -#define VDEC_D_SRC_CFG 0x1658 -#define VDEC_D_SC_STEP_SIZE 0x165C +#define VDEC_D_HTL_CTRL 0x1654 +#define VDEC_D_SRC_CFG 0x1658 +#define VDEC_D_SC_STEP_SIZE 0x165C#define VDEC_D_SC_CONVERGE_CTRL 0x1660 -#define VDEC_D_SC_LOOP_CTRL 0x1664 +#define VDEC_D_SC_LOOP_CTRL 0x1664#define VDEC_D_COMB_2D_HFS_CFG 0x1668#define VDEC_D_COMB_2D_HFD_CFG 0x166C#define VDEC_D_COMB_2D_LF_CFG 0x1670#define VDEC_D_COMB_2D_BLEND 0x1674#define VDEC_D_COMB_MISC_CTRL 0x1678 -#define VDEC_D_COMB_FLAT_THRESH_CTRL 0x167C -#define VDEC_D_COMB_TEST 0x1680 -#define VDEC_D_BP_MISC_CTRL 0x1684 -#define VDEC_D_VCR_DET_CTRL 0x1688 +#define VDEC_D_COMB_FLAT_THRESH_CTRL 0x167C +#define VDEC_D_COMB_TEST 0x1680 +#define VDEC_D_BP_MISC_CTRL 0x1684 +#define VDEC_D_VCR_DET_CTRL 0x1688#define VDEC_D_NOISE_DET_CTRL 0x168C#define VDEC_D_COMB_FLAT_NOISE_CTRL 0x1690 -#define VDEC_D_VERSION 0x17F8 +#define VDEC_D_VERSION 0x17F8#define VDEC_D_SOFT_RST_CTRL 0x17FC/* Video Decoder E Registers */ -#define VDEC_E_MODE_CTRL 0x1800 -#define VDEC_E_OUT_CTRL1 0x1804 -#define VDEC_E_OUT_CTRL_NS 0x1808 -#define VDEC_E_GEN_STAT 0x180C +#define VDEC_E_MODE_CTRL 0x1800 +#define VDEC_E_OUT_CTRL1 0x1804 +#define VDEC_E_OUT_CTRL_NS 0x1808 +#define VDEC_E_GEN_STAT 0x180C#define VDEC_E_INT_STAT_MASK 0x1810 -#define VDEC_E_LUMA_CTRL 0x1814 -#define VDEC_E_CHROMA_CTRL 0x1818 -#define VDEC_E_CRUSH_CTRL 0x181C +#define VDEC_E_LUMA_CTRL 0x1814 +#define VDEC_E_CHROMA_CTRL 0x1818 +#define VDEC_E_CRUSH_CTRL 0x181C#define VDEC_E_HORIZ_TIM_CTRL 0x1820#define VDEC_E_VERT_TIM_CTRL 0x1824#define VDEC_E_MISC_TIM_CTRL 0x1828 -#define VDEC_E_FIELD_COUNT 0x182C -#define VDEC_E_HSCALE_CTRL 0x1830 -#define VDEC_E_VSCALE_CTRL 0x1834 -#define VDEC_E_MAN_VGA_CTRL 0x1838 -#define VDEC_E_MAN_AGC_CTRL 0x183C -#define VDEC_E_DFE_CTRL1 0x1840 -#define VDEC_E_DFE_CTRL2 0x1844 -#define VDEC_E_DFE_CTRL3 0x1848 -#define VDEC_E_PLL_CTRL 0x184C +#define VDEC_E_FIELD_COUNT 0x182C +#define VDEC_E_HSCALE_CTRL 0x1830 +#define VDEC_E_VSCALE_CTRL 0x1834 +#define VDEC_E_MAN_VGA_CTRL 0x1838 +#define VDEC_E_MAN_AGC_CTRL 0x183C +#define VDEC_E_DFE_CTRL1 0x1840 +#define VDEC_E_DFE_CTRL2 0x1844 +#define VDEC_E_DFE_CTRL3 0x1848 +#define VDEC_E_PLL_CTRL 0x184C#define VDEC_E_PLL_CTRL_FAST 0x1850 -#define VDEC_E_HTL_CTRL 0x1854 -#define VDEC_E_SRC_CFG 0x1858 -#define VDEC_E_SC_STEP_SIZE 0x185C +#define VDEC_E_HTL_CTRL 0x1854 +#define VDEC_E_SRC_CFG 0x1858 +#define VDEC_E_SC_STEP_SIZE 0x185C#define VDEC_E_SC_CONVERGE_CTRL 0x1860 -#define VDEC_E_SC_LOOP_CTRL 0x1864 +#define VDEC_E_SC_LOOP_CTRL 0x1864#define VDEC_E_COMB_2D_HFS_CFG 0x1868#define VDEC_E_COMB_2D_HFD_CFG 0x186C#define VDEC_E_COMB_2D_LF_CFG 0x1870#define VDEC_E_COMB_2D_BLEND 0x1874#define VDEC_E_COMB_MISC_CTRL 0x1878 -#define VDEC_E_COMB_FLAT_THRESH_CTRL 0x187C -#define VDEC_E_COMB_TEST 0x1880 -#define VDEC_E_BP_MISC_CTRL 0x1884 -#define VDEC_E_VCR_DET_CTRL 0x1888 +#define VDEC_E_COMB_FLAT_THRESH_CTRL 0x187C +#define VDEC_E_COMB_TEST 0x1880 +#define VDEC_E_BP_MISC_CTRL 0x1884 +#define VDEC_E_VCR_DET_CTRL 0x1888#define VDEC_E_NOISE_DET_CTRL 0x188C#define VDEC_E_COMB_FLAT_NOISE_CTRL 0x1890 -#define VDEC_E_VERSION 0x19F8 +#define VDEC_E_VERSION 0x19F8#define VDEC_E_SOFT_RST_CTRL 0x19FC/* Video Decoder F Registers */ -#define VDEC_F_MODE_CTRL 0x1A00 -#define VDEC_F_OUT_CTRL1 0x1A04 -#define VDEC_F_OUT_CTRL_NS 0x1A08 -#define VDEC_F_GEN_STAT 0x1A0C +#define VDEC_F_MODE_CTRL 0x1A00 +#define VDEC_F_OUT_CTRL1 0x1A04 +#define VDEC_F_OUT_CTRL_NS 0x1A08 +#define VDEC_F_GEN_STAT 0x1A0C#define VDEC_F_INT_STAT_MASK 0x1A10 -#define VDEC_F_LUMA_CTRL 0x1A14 -#define VDEC_F_CHROMA_CTRL 0x1A18 -#define VDEC_F_CRUSH_CTRL 0x1A1C +#define VDEC_F_LUMA_CTRL 0x1A14 +#define VDEC_F_CHROMA_CTRL 0x1A18 +#define VDEC_F_CRUSH_CTRL 0x1A1C#define VDEC_F_HORIZ_TIM_CTRL 0x1A20#define VDEC_F_VERT_TIM_CTRL 0x1A24#define VDEC_F_MISC_TIM_CTRL 0x1A28 -#define VDEC_F_FIELD_COUNT 0x1A2C -#define VDEC_F_HSCALE_CTRL 0x1A30 -#define VDEC_F_VSCALE_CTRL 0x1A34 -#define VDEC_F_MAN_VGA_CTRL 0x1A38 -#define VDEC_F_MAN_AGC_CTRL 0x1A3C -#define VDEC_F_DFE_CTRL1 0x1A40 -#define VDEC_F_DFE_CTRL2 0x1A44 -#define VDEC_F_DFE_CTRL3 0x1A48 -#define VDEC_F_PLL_CTRL 0x1A4C +#define VDEC_F_FIELD_COUNT 0x1A2C +#define VDEC_F_HSCALE_CTRL 0x1A30 +#define VDEC_F_VSCALE_CTRL 0x1A34 +#define VDEC_F_MAN_VGA_CTRL 0x1A38 +#define VDEC_F_MAN_AGC_CTRL 0x1A3C +#define VDEC_F_DFE_CTRL1 0x1A40 +#define VDEC_F_DFE_CTRL2 0x1A44 +#define VDEC_F_DFE_CTRL3 0x1A48 +#define VDEC_F_PLL_CTRL 0x1A4C#define VDEC_F_PLL_CTRL_FAST 0x1A50 -#define VDEC_F_HTL_CTRL 0x1A54 -#define VDEC_F_SRC_CFG 0x1A58 -#define VDEC_F_SC_STEP_SIZE 0x1A5C +#define VDEC_F_HTL_CTRL 0x1A54 +#define VDEC_F_SRC_CFG 0x1A58 +#define VDEC_F_SC_STEP_SIZE 0x1A5C#define VDEC_F_SC_CONVERGE_CTRL 0x1A60 -#define VDEC_F_SC_LOOP_CTRL 0x1A64 +#define VDEC_F_SC_LOOP_CTRL 0x1A64#define VDEC_F_COMB_2D_HFS_CFG 0x1A68#define VDEC_F_COMB_2D_HFD_CFG 0x1A6C#define VDEC_F_COMB_2D_LF_CFG 0x1A70#define VDEC_F_COMB_2D_BLEND 0x1A74#define VDEC_F_COMB_MISC_CTRL 0x1A78 -#define VDEC_F_COMB_FLAT_THRESH_CTRL 0x1A7C -#define VDEC_F_COMB_TEST 0x1A80 -#define VDEC_F_BP_MISC_CTRL 0x1A84 -#define VDEC_F_VCR_DET_CTRL 0x1A88 +#define VDEC_F_COMB_FLAT_THRESH_CTRL 0x1A7C +#define VDEC_F_COMB_TEST 0x1A80 +#define VDEC_F_BP_MISC_CTRL 0x1A84 +#define VDEC_F_VCR_DET_CTRL 0x1A88#define VDEC_F_NOISE_DET_CTRL 0x1A8C#define VDEC_F_COMB_FLAT_NOISE_CTRL 0x1A90 -#define VDEC_F_VERSION 0x1BF8 +#define VDEC_F_VERSION 0x1BF8#define VDEC_F_SOFT_RST_CTRL 0x1BFC/* Video Decoder G Registers */ -#define VDEC_G_MODE_CTRL 0x1C00 -#define VDEC_G_OUT_CTRL1 0x1C04 -#define VDEC_G_OUT_CTRL_NS 0x1C08 -#define VDEC_G_GEN_STAT 0x1C0C +#define VDEC_G_MODE_CTRL 0x1C00 +#define VDEC_G_OUT_CTRL1 0x1C04 +#define VDEC_G_OUT_CTRL_NS 0x1C08 +#define VDEC_G_GEN_STAT 0x1C0C#define VDEC_G_INT_STAT_MASK 0x1C10 -#define VDEC_G_LUMA_CTRL 0x1C14 -#define VDEC_G_CHROMA_CTRL 0x1C18 -#define VDEC_G_CRUSH_CTRL 0x1C1C +#define VDEC_G_LUMA_CTRL 0x1C14 +#define VDEC_G_CHROMA_CTRL 0x1C18 +#define VDEC_G_CRUSH_CTRL 0x1C1C#define VDEC_G_HORIZ_TIM_CTRL 0x1C20#define VDEC_G_VERT_TIM_CTRL 0x1C24#define VDEC_G_MISC_TIM_CTRL 0x1C28 -#define VDEC_G_FIELD_COUNT 0x1C2C -#define VDEC_G_HSCALE_CTRL 0x1C30 -#define VDEC_G_VSCALE_CTRL 0x1C34 -#define VDEC_G_MAN_VGA_CTRL 0x1C38 -#define VDEC_G_MAN_AGC_CTRL 0x1C3C -#define VDEC_G_DFE_CTRL1 0x1C40 -#define VDEC_G_DFE_CTRL2 0x1C44 -#define VDEC_G_DFE_CTRL3 0x1C48 -#define VDEC_G_PLL_CTRL 0x1C4C +#define VDEC_G_FIELD_COUNT 0x1C2C +#define VDEC_G_HSCALE_CTRL 0x1C30 +#define VDEC_G_VSCALE_CTRL 0x1C34 +#define VDEC_G_MAN_VGA_CTRL 0x1C38 +#define VDEC_G_MAN_AGC_CTRL 0x1C3C +#define VDEC_G_DFE_CTRL1 0x1C40 +#define VDEC_G_DFE_CTRL2 0x1C44 +#define VDEC_G_DFE_CTRL3 0x1C48 +#define VDEC_G_PLL_CTRL 0x1C4C#define VDEC_G_PLL_CTRL_FAST 0x1C50 -#define VDEC_G_HTL_CTRL 0x1C54 -#define VDEC_G_SRC_CFG 0x1C58 -#define VDEC_G_SC_STEP_SIZE 0x1C5C +#define VDEC_G_HTL_CTRL 0x1C54 +#define VDEC_G_SRC_CFG 0x1C58 +#define VDEC_G_SC_STEP_SIZE 0x1C5C#define VDEC_G_SC_CONVERGE_CTRL 0x1C60 -#define VDEC_G_SC_LOOP_CTRL 0x1C64 +#define VDEC_G_SC_LOOP_CTRL 0x1C64#define VDEC_G_COMB_2D_HFS_CFG 0x1C68#define VDEC_G_COMB_2D_HFD_CFG 0x1C6C#define VDEC_G_COMB_2D_LF_CFG 0x1C70#define VDEC_G_COMB_2D_BLEND 0x1C74#define VDEC_G_COMB_MISC_CTRL 0x1C78 -#define VDEC_G_COMB_FLAT_THRESH_CTRL 0x1C7C -#define VDEC_G_COMB_TEST 0x1C80 -#define VDEC_G_BP_MISC_CTRL 0x1C84 -#define VDEC_G_VCR_DET_CTRL 0x1C88 +#define VDEC_G_COMB_FLAT_THRESH_CTRL 0x1C7C +#define VDEC_G_COMB_TEST 0x1C80 +#define VDEC_G_BP_MISC_CTRL 0x1C84 +#define VDEC_G_VCR_DET_CTRL 0x1C88#define VDEC_G_NOISE_DET_CTRL 0x1C8C#define VDEC_G_COMB_FLAT_NOISE_CTRL 0x1C90 -#define VDEC_G_VERSION 0x1DF8 +#define VDEC_G_VERSION 0x1DF8#define VDEC_G_SOFT_RST_CTRL 0x1DFC -/* Video Decoder H Registers */ -#define VDEC_H_MODE_CTRL 0x1E00 -#define VDEC_H_OUT_CTRL1 0x1E04 -#define VDEC_H_OUT_CTRL_NS 0x1E08 -#define VDEC_H_GEN_STAT 0x1E0C +/* Video Decoder H Registers */ +#define VDEC_H_MODE_CTRL 0x1E00 +#define VDEC_H_OUT_CTRL1 0x1E04 +#define VDEC_H_OUT_CTRL_NS 0x1E08 +#define VDEC_H_GEN_STAT 0x1E0C#define VDEC_H_INT_STAT_MASK 0x1E1E -#define VDEC_H_LUMA_CTRL 0x1E14 -#define VDEC_H_CHROMA_CTRL 0x1E18 -#define VDEC_H_CRUSH_CTRL 0x1E1C +#define VDEC_H_LUMA_CTRL 0x1E14 +#define VDEC_H_CHROMA_CTRL 0x1E18 +#define VDEC_H_CRUSH_CTRL 0x1E1C#define VDEC_H_HORIZ_TIM_CTRL 0x1E20#define VDEC_H_VERT_TIM_CTRL 0x1E24#define VDEC_H_MISC_TIM_CTRL 0x1E28 -#define VDEC_H_FIELD_COUNT 0x1E2C -#define VDEC_H_HSCALE_CTRL 0x1E30 -#define VDEC_H_VSCALE_CTRL 0x1E34 -#define VDEC_H_MAN_VGA_CTRL 0x1E38 -#define VDEC_H_MAN_AGC_CTRL 0x1E3C -#define VDEC_H_DFE_CTRL1 0x1E40 -#define VDEC_H_DFE_CTRL2 0x1E44 -#define VDEC_H_DFE_CTRL3 0x1E48 -#define VDEC_H_PLL_CTRL 0x1E4C +#define VDEC_H_FIELD_COUNT 0x1E2C +#define VDEC_H_HSCALE_CTRL 0x1E30 +#define VDEC_H_VSCALE_CTRL 0x1E34 +#define VDEC_H_MAN_VGA_CTRL 0x1E38 +#define VDEC_H_MAN_AGC_CTRL 0x1E3C +#define VDEC_H_DFE_CTRL1 0x1E40 +#define VDEC_H_DFE_CTRL2 0x1E44 +#define VDEC_H_DFE_CTRL3 0x1E48 +#define VDEC_H_PLL_CTRL 0x1E4C#define VDEC_H_PLL_CTRL_FAST 0x1E50 -#define VDEC_H_HTL_CTRL 0x1E54 -#define VDEC_H_SRC_CFG 0x1E58 -#define VDEC_H_SC_STEP_SIZE 0x1E5C +#define VDEC_H_HTL_CTRL 0x1E54 +#define VDEC_H_SRC_CFG 0x1E58 +#define VDEC_H_SC_STEP_SIZE 0x1E5C#define VDEC_H_SC_CONVERGE_CTRL 0x1E60 -#define VDEC_H_SC_LOOP_CTRL 0x1E64 +#define VDEC_H_SC_LOOP_CTRL 0x1E64#define VDEC_H_COMB_2D_HFS_CFG 0x1E68#define VDEC_H_COMB_2D_HFD_CFG 0x1E6C#define VDEC_H_COMB_2D_LF_CFG 0x1E70#define VDEC_H_COMB_2D_BLEND 0x1E74#define VDEC_H_COMB_MISC_CTRL 0x1E78 -#define VDEC_H_COMB_FLAT_THRESH_CTRL 0x1E7C -#define VDEC_H_COMB_TEST 0x1E80 -#define VDEC_H_BP_MISC_CTRL 0x1E84 -#define VDEC_H_VCR_DET_CTRL 0x1E88 +#define VDEC_H_COMB_FLAT_THRESH_CTRL 0x1E7C +#define VDEC_H_COMB_TEST 0x1E80 +#define VDEC_H_BP_MISC_CTRL 0x1E84 +#define VDEC_H_VCR_DET_CTRL 0x1E88#define VDEC_H_NOISE_DET_CTRL 0x1E8C#define VDEC_H_COMB_FLAT_NOISE_CTRL 0x1E90 -#define VDEC_H_VERSION 0x1FF8 +#define VDEC_H_VERSION 0x1FF8#define VDEC_H_SOFT_RST_CTRL 0x1FFC/*****************************************************************************/ /* LUMA_CTRL register fields */ -#define VDEC_A_BRITE_CTRL 0x1014 +#define VDEC_A_BRITE_CTRL 0x1014#define VDEC_A_CNTRST_CTRL 0x1015#define VDEC_A_PEAK_SEL 0x1016
Signature · 1 line
1.7.0.4
PATCH 18/36 Staging: cx25821: cx25821-medusa-video.c: Fix comment
In reply to Leonid V. FedorenchikDelete part of the comment that is not checked in code.
--- drivers/staging/cx25821/cx25821-medusa-video.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/staging/cx25821/cx25821-medusa-video.c +1 -1
@@ -499,7 +499,7 @@ void medusa_set_resolution(struct cx25821_dev *dev, int width,mutex_lock (&dev->lock); -/* validate the width - cannot be negative */ +/* validate the width */ if (width >MAX_WIDTH ) {pr_info ("%s(): width %d > MAX_WIDTH %d ! resetting to MAX_WIDTH\n" , __func__, width,MAX_WIDTH );
Signature · 1 line
1.7.0.4
PATCH 19/36 Staging: cx25821: cx25821-medusa-video.c: Move operators
In reply to Leonid V. FedorenchikPlase operators in complex expressions at the end of the lines to preserve consistency.
--- drivers/staging/cx25821/cx25821-medusa-video.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
drivers/staging/cx25821/cx25821-medusa-video.c +4 -4
@@ -654,8 +654,8 @@ int medusa_set_brightness(struct cx25821_dev *dev, int brightness, int decoder)u32 val =0 , tmp =0 ;mutex_lock (&dev->lock); -if ((brightness >VIDEO_PROCAMP_MAX ) - || (brightness <VIDEO_PROCAMP_MIN )) { +if ((brightness >VIDEO_PROCAMP_MAX ) || + (brightness <VIDEO_PROCAMP_MIN )) {mutex_unlock (&dev->lock);return -1 ; }
@@ -743,8 +743,8 @@ int medusa_set_saturation(struct cx25821_dev *dev, int saturation, int decoder)mutex_lock (&dev->lock); -if ((saturation >VIDEO_PROCAMP_MAX ) - || (saturation <VIDEO_PROCAMP_MIN )) { +if ((saturation >VIDEO_PROCAMP_MAX ) || + (saturation <VIDEO_PROCAMP_MIN )) {mutex_unlock (&dev->lock);return -1 ; }
Signature · 1 line
1.7.0.4
PATCH 20/36 Staging: cx25821: cx25821-medusa-video.c: Change line endings
In reply to Leonid V. FedorenchikChange obscure line endings to less obscure ones. (improve readability)
--- drivers/staging/cx25821/cx25821-medusa-video.c | 400 ++++++++++-------------- 1 files changed, 159 insertions(+), 241 deletions(-)
drivers/staging/cx25821/cx25821-medusa-video.c +159 -241
@@ -99,82 +99,67 @@ static int medusa_initialize_ntsc(struct cx25821_dev *dev)for (i =0 ; i <MAX_DECODERS ; i++) {/* set video format NTSC-M */ - value = -cx25821_i2c_read (&dev->i2c_bus[0 ],MODE_CTRL + (0x200 * i), - &tmp); + value =cx25821_i2c_read (&dev->i2c_bus[0 ], +MODE_CTRL + (0x200 * i), &tmp); value &=0xFFFFFFF0 ;/* enable the fast locking mode bit[16] */ value |=0x10001 ; - ret_val = -cx25821_i2c_write (&dev->i2c_bus[0 ],MODE_CTRL + (0x200 * i), - value); + ret_val =cx25821_i2c_write (&dev->i2c_bus[0 ], +MODE_CTRL + (0x200 * i), value);/* resolution NTSC 720x480 */ - value = -cx25821_i2c_read (&dev->i2c_bus[0 ], -HORIZ_TIM_CTRL + (0x200 * i), &tmp); + value =cx25821_i2c_read (&dev->i2c_bus[0 ], +HORIZ_TIM_CTRL + (0x200 * i), &tmp); value &=0x00C00C00 ; value |=0x612D0074 ; - ret_val = -cx25821_i2c_write (&dev->i2c_bus[0 ], -HORIZ_TIM_CTRL + (0x200 * i), value); + ret_val =cx25821_i2c_write (&dev->i2c_bus[0 ], +HORIZ_TIM_CTRL + (0x200 * i), value); - value = -cx25821_i2c_read (&dev->i2c_bus[0 ], -VERT_TIM_CTRL + (0x200 * i), &tmp); + value =cx25821_i2c_read (&dev->i2c_bus[0 ], +VERT_TIM_CTRL + (0x200 * i), &tmp); value &=0x00C00C00 ; value |=0x1C1E001A ;/* vblank_cnt + 2 to get camera ID */ - ret_val = -cx25821_i2c_write (&dev->i2c_bus[0 ], -VERT_TIM_CTRL + (0x200 * i), value); + ret_val =cx25821_i2c_write (&dev->i2c_bus[0 ], +VERT_TIM_CTRL + (0x200 * i), value);/* chroma subcarrier step size */ - ret_val = -cx25821_i2c_write (&dev->i2c_bus[0 ], -SC_STEP_SIZE + (0x200 * i),0x43E00000 ); + ret_val =cx25821_i2c_write (&dev->i2c_bus[0 ], +SC_STEP_SIZE + (0x200 * i),0x43E00000 );/* enable VIP optional active */ - value = -cx25821_i2c_read (&dev->i2c_bus[0 ], -OUT_CTRL_NS + (0x200 * i), &tmp); + value =cx25821_i2c_read (&dev->i2c_bus[0 ], +OUT_CTRL_NS + (0x200 * i), &tmp); value &=0xFFFBFFFF ; value |=0x00040000 ; - ret_val = -cx25821_i2c_write (&dev->i2c_bus[0 ], -OUT_CTRL_NS + (0x200 * i), value); + ret_val =cx25821_i2c_write (&dev->i2c_bus[0 ], +OUT_CTRL_NS + (0x200 * i), value);/* enable VIP optional active (VIP_OPT_AL) for direct output. */ - value = -cx25821_i2c_read (&dev->i2c_bus[0 ],OUT_CTRL1 + (0x200 * i), - &tmp); + value =cx25821_i2c_read (&dev->i2c_bus[0 ], +OUT_CTRL1 + (0x200 * i), &tmp); value &=0xFFFBFFFF ; value |=0x00040000 ; - ret_val = -cx25821_i2c_write (&dev->i2c_bus[0 ],OUT_CTRL1 + (0x200 * i), - value); + ret_val =cx25821_i2c_write (&dev->i2c_bus[0 ], +OUT_CTRL1 + (0x200 * i), value);/* * clear VPRES_VERT_EN bit, fixes the chroma run away problem * when the input switching rate < 16 fields */ - value = -cx25821_i2c_read (&dev->i2c_bus[0 ], -MISC_TIM_CTRL + (0x200 * i), &tmp); + value =cx25821_i2c_read (&dev->i2c_bus[0 ], +MISC_TIM_CTRL + (0x200 * i), &tmp);/* disable special play detection */ value =setBitAtPos (value,14 ); value =clearBitAtPos (value,15 ); - ret_val = -cx25821_i2c_write (&dev->i2c_bus[0 ], -MISC_TIM_CTRL + (0x200 * i), value); + ret_val =cx25821_i2c_write (&dev->i2c_bus[0 ], +MISC_TIM_CTRL + (0x200 * i), value);/* set vbi_gate_en to 0 */ - value = -cx25821_i2c_read (&dev->i2c_bus[0 ],DFE_CTRL1 + (0x200 * i), - &tmp); + value =cx25821_i2c_read (&dev->i2c_bus[0 ], +DFE_CTRL1 + (0x200 * i), &tmp); value =clearBitAtPos (value,29 ); - ret_val = -cx25821_i2c_write (&dev->i2c_bus[0 ],DFE_CTRL1 + (0x200 * i), - value); + ret_val =cx25821_i2c_write (&dev->i2c_bus[0 ], +DFE_CTRL1 + (0x200 * i), value);/* Enable the generation of blue field output if no video */ medusa_enable_bluefield_output (dev, i,1 );
@@ -182,61 +167,49 @@ static int medusa_initialize_ntsc(struct cx25821_dev *dev)for (i =0 ; i <MAX_ENCODERS ; i++) {/* NTSC hclock */ - value = -cx25821_i2c_read (&dev->i2c_bus[0 ], -DENC_A_REG_1 + (0x100 * i), &tmp); + value =cx25821_i2c_read (&dev->i2c_bus[0 ], +DENC_A_REG_1 + (0x100 * i), &tmp); value &=0xF000FC00 ; value |=0x06B402D0 ; - ret_val = -cx25821_i2c_write (&dev->i2c_bus[0 ], -DENC_A_REG_1 + (0x100 * i), value); + ret_val =cx25821_i2c_write (&dev->i2c_bus[0 ], +DENC_A_REG_1 + (0x100 * i), value);/* burst begin and burst end */ - value = -cx25821_i2c_read (&dev->i2c_bus[0 ], -DENC_A_REG_2 + (0x100 * i), &tmp); + value =cx25821_i2c_read (&dev->i2c_bus[0 ], +DENC_A_REG_2 + (0x100 * i), &tmp); value &=0xFF000000 ; value |=0x007E9054 ; - ret_val = -cx25821_i2c_write (&dev->i2c_bus[0 ], -DENC_A_REG_2 + (0x100 * i), value); + ret_val =cx25821_i2c_write (&dev->i2c_bus[0 ], +DENC_A_REG_2 + (0x100 * i), value); - value = -cx25821_i2c_read (&dev->i2c_bus[0 ], -DENC_A_REG_3 + (0x100 * i), &tmp); + value =cx25821_i2c_read (&dev->i2c_bus[0 ], +DENC_A_REG_3 + (0x100 * i), &tmp); value &=0xFC00FE00 ; value |=0x00EC00F0 ; - ret_val = -cx25821_i2c_write (&dev->i2c_bus[0 ], -DENC_A_REG_3 + (0x100 * i), value); + ret_val =cx25821_i2c_write (&dev->i2c_bus[0 ], +DENC_A_REG_3 + (0x100 * i), value);/* set NTSC vblank, no phase alternation, 7.5 IRE pedestal */ - value = -cx25821_i2c_read (&dev->i2c_bus[0 ], -DENC_A_REG_4 + (0x100 * i), &tmp); + value =cx25821_i2c_read (&dev->i2c_bus[0 ], +DENC_A_REG_4 + (0x100 * i), &tmp); value &=0x00FCFFFF ; value |=0x13020000 ; - ret_val = -cx25821_i2c_write (&dev->i2c_bus[0 ], -DENC_A_REG_4 + (0x100 * i), value); + ret_val =cx25821_i2c_write (&dev->i2c_bus[0 ], +DENC_A_REG_4 + (0x100 * i), value); - value = -cx25821_i2c_read (&dev->i2c_bus[0 ], -DENC_A_REG_5 + (0x100 * i), &tmp); + value =cx25821_i2c_read (&dev->i2c_bus[0 ], +DENC_A_REG_5 + (0x100 * i), &tmp); value &=0xFFFF0000 ; value |=0x0000E575 ; - ret_val = -cx25821_i2c_write (&dev->i2c_bus[0 ], -DENC_A_REG_5 + (0x100 * i), value); + ret_val =cx25821_i2c_write (&dev->i2c_bus[0 ], +DENC_A_REG_5 + (0x100 * i), value); - ret_val = -cx25821_i2c_write (&dev->i2c_bus[0 ], -DENC_A_REG_6 + (0x100 * i),0x009A89C1 ); + ret_val =cx25821_i2c_write (&dev->i2c_bus[0 ], +DENC_A_REG_6 + (0x100 * i),0x009A89C1 );/* Subcarrier Increment */ - ret_val = -cx25821_i2c_write (&dev->i2c_bus[0 ], -DENC_A_REG_7 + (0x100 * i),0x21F07C1F ); + ret_val =cx25821_i2c_write (&dev->i2c_bus[0 ], +DENC_A_REG_7 + (0x100 * i),0x21F07C1F ); }/* set picture resolutions */
@@ -261,34 +234,27 @@ static int medusa_PALCombInit(struct cx25821_dev *dev, int dec)u32 value =0 , tmp =0 ;/* Setup for 2D threshold */ - ret_val = -cx25821_i2c_write (&dev->i2c_bus[0 ],COMB_2D_HFS_CFG + (0x200 * dec), -0x20002861 ); - ret_val = -cx25821_i2c_write (&dev->i2c_bus[0 ],COMB_2D_HFD_CFG + (0x200 * dec), -0x20002861 ); - ret_val = -cx25821_i2c_write (&dev->i2c_bus[0 ],COMB_2D_LF_CFG + (0x200 * dec), -0x200A1023 ); + ret_val =cx25821_i2c_write (&dev->i2c_bus[0 ], +COMB_2D_HFS_CFG + (0x200 * dec),0x20002861 ); + ret_val =cx25821_i2c_write (&dev->i2c_bus[0 ], +COMB_2D_HFD_CFG + (0x200 * dec),0x20002861 ); + ret_val =cx25821_i2c_write (&dev->i2c_bus[0 ], +COMB_2D_LF_CFG + (0x200 * dec),0x200A1023 );/* Setup flat chroma and luma thresholds */ - value = -cx25821_i2c_read (&dev->i2c_bus[0 ], -COMB_FLAT_THRESH_CTRL + (0x200 * dec), &tmp); + value =cx25821_i2c_read (&dev->i2c_bus[0 ], +COMB_FLAT_THRESH_CTRL + (0x200 * dec), &tmp); value &=0x06230000 ; - ret_val = -cx25821_i2c_write (&dev->i2c_bus[0 ], -COMB_FLAT_THRESH_CTRL + (0x200 * dec), value); + ret_val =cx25821_i2c_write (&dev->i2c_bus[0 ], +COMB_FLAT_THRESH_CTRL + (0x200 * dec), value);/* set comb 2D blend */ - ret_val = -cx25821_i2c_write (&dev->i2c_bus[0 ],COMB_2D_BLEND + (0x200 * dec), -0x210F0F0F ); + ret_val =cx25821_i2c_write (&dev->i2c_bus[0 ], +COMB_2D_BLEND + (0x200 * dec),0x210F0F0F );/* COMB MISC CONTROL */ - ret_val = -cx25821_i2c_write (&dev->i2c_bus[0 ],COMB_MISC_CTRL + (0x200 * dec), -0x41120A7F ); + ret_val =cx25821_i2c_write (&dev->i2c_bus[0 ], +COMB_MISC_CTRL + (0x200 * dec),0x41120A7F );return ret_val; }
@@ -304,83 +270,68 @@ static int medusa_initialize_pal(struct cx25821_dev *dev)for (i =0 ; i <MAX_DECODERS ; i++) {/* set video format PAL-BDGHI */ - value = -cx25821_i2c_read (&dev->i2c_bus[0 ],MODE_CTRL + (0x200 * i), - &tmp); + value =cx25821_i2c_read (&dev->i2c_bus[0 ], +MODE_CTRL + (0x200 * i), &tmp); value &=0xFFFFFFF0 ;/* enable the fast locking mode bit[16] */ value |=0x10004 ; - ret_val = -cx25821_i2c_write (&dev->i2c_bus[0 ],MODE_CTRL + (0x200 * i), - value); + ret_val =cx25821_i2c_write (&dev->i2c_bus[0 ], +MODE_CTRL + (0x200 * i), value);/* resolution PAL 720x576 */ - value = -cx25821_i2c_read (&dev->i2c_bus[0 ], -HORIZ_TIM_CTRL + (0x200 * i), &tmp); + value =cx25821_i2c_read (&dev->i2c_bus[0 ], +HORIZ_TIM_CTRL + (0x200 * i), &tmp); value &=0x00C00C00 ; value |=0x632D007D ; - ret_val = -cx25821_i2c_write (&dev->i2c_bus[0 ], -HORIZ_TIM_CTRL + (0x200 * i), value); + ret_val =cx25821_i2c_write (&dev->i2c_bus[0 ], +HORIZ_TIM_CTRL + (0x200 * i), value);/* vblank656_cnt=x26, vactive_cnt=240h, vblank_cnt=x24 */ - value = -cx25821_i2c_read (&dev->i2c_bus[0 ], -VERT_TIM_CTRL + (0x200 * i), &tmp); + value =cx25821_i2c_read (&dev->i2c_bus[0 ], +VERT_TIM_CTRL + (0x200 * i), &tmp); value &=0x00C00C00 ; value |=0x28240026 ;/* vblank_cnt + 2 to get camera ID */ - ret_val = -cx25821_i2c_write (&dev->i2c_bus[0 ], -VERT_TIM_CTRL + (0x200 * i), value); + ret_val =cx25821_i2c_write (&dev->i2c_bus[0 ], +VERT_TIM_CTRL + (0x200 * i), value);/* chroma subcarrier step size */ - ret_val = -cx25821_i2c_write (&dev->i2c_bus[0 ], -SC_STEP_SIZE + (0x200 * i),0x5411E2D0 ); + ret_val =cx25821_i2c_write (&dev->i2c_bus[0 ], +SC_STEP_SIZE + (0x200 * i),0x5411E2D0 );/* enable VIP optional active */ - value = -cx25821_i2c_read (&dev->i2c_bus[0 ], -OUT_CTRL_NS + (0x200 * i), &tmp); + value =cx25821_i2c_read (&dev->i2c_bus[0 ], +OUT_CTRL_NS + (0x200 * i), &tmp); value &=0xFFFBFFFF ; value |=0x00040000 ; - ret_val = -cx25821_i2c_write (&dev->i2c_bus[0 ], -OUT_CTRL_NS + (0x200 * i), value); + ret_val =cx25821_i2c_write (&dev->i2c_bus[0 ], +OUT_CTRL_NS + (0x200 * i), value);/* enable VIP optional active (VIP_OPT_AL) for direct output. */ - value = -cx25821_i2c_read (&dev->i2c_bus[0 ],OUT_CTRL1 + (0x200 * i), - &tmp); + value =cx25821_i2c_read (&dev->i2c_bus[0 ], +OUT_CTRL1 + (0x200 * i), &tmp); value &=0xFFFBFFFF ; value |=0x00040000 ; - ret_val = -cx25821_i2c_write (&dev->i2c_bus[0 ],OUT_CTRL1 + (0x200 * i), - value); + ret_val =cx25821_i2c_write (&dev->i2c_bus[0 ], +OUT_CTRL1 + (0x200 * i), value);/* * clear VPRES_VERT_EN bit, fixes the chroma run away problem * when the input switching rate < 16 fields */ - value = -cx25821_i2c_read (&dev->i2c_bus[0 ], -MISC_TIM_CTRL + (0x200 * i), &tmp); + value =cx25821_i2c_read (&dev->i2c_bus[0 ], +MISC_TIM_CTRL + (0x200 * i), &tmp);/* disable special play detection */ value =setBitAtPos (value,14 ); value =clearBitAtPos (value,15 ); - ret_val = -cx25821_i2c_write (&dev->i2c_bus[0 ], -MISC_TIM_CTRL + (0x200 * i), value); + ret_val =cx25821_i2c_write (&dev->i2c_bus[0 ], +MISC_TIM_CTRL + (0x200 * i), value);/* set vbi_gate_en to 0 */ - value = -cx25821_i2c_read (&dev->i2c_bus[0 ],DFE_CTRL1 + (0x200 * i), - &tmp); + value =cx25821_i2c_read (&dev->i2c_bus[0 ], +DFE_CTRL1 + (0x200 * i), &tmp); value =clearBitAtPos (value,29 ); - ret_val = -cx25821_i2c_write (&dev->i2c_bus[0 ],DFE_CTRL1 + (0x200 * i), - value); + ret_val =cx25821_i2c_write (&dev->i2c_bus[0 ], +DFE_CTRL1 + (0x200 * i), value);medusa_PALCombInit (dev, i);
@@ -390,62 +341,50 @@ static int medusa_initialize_pal(struct cx25821_dev *dev)for (i =0 ; i <MAX_ENCODERS ; i++) {/* PAL hclock */ - value = -cx25821_i2c_read (&dev->i2c_bus[0 ], -DENC_A_REG_1 + (0x100 * i), &tmp); + value =cx25821_i2c_read (&dev->i2c_bus[0 ], +DENC_A_REG_1 + (0x100 * i), &tmp); value &=0xF000FC00 ; value |=0x06C002D0 ; - ret_val = -cx25821_i2c_write (&dev->i2c_bus[0 ], -DENC_A_REG_1 + (0x100 * i), value); + ret_val =cx25821_i2c_write (&dev->i2c_bus[0 ], +DENC_A_REG_1 + (0x100 * i), value);/* burst begin and burst end */ - value = -cx25821_i2c_read (&dev->i2c_bus[0 ], -DENC_A_REG_2 + (0x100 * i), &tmp); + value =cx25821_i2c_read (&dev->i2c_bus[0 ], +DENC_A_REG_2 + (0x100 * i), &tmp); value &=0xFF000000 ; value |=0x007E9754 ; - ret_val = -cx25821_i2c_write (&dev->i2c_bus[0 ], -DENC_A_REG_2 + (0x100 * i), value); + ret_val =cx25821_i2c_write (&dev->i2c_bus[0 ], +DENC_A_REG_2 + (0x100 * i), value);/* hblank and vactive */ - value = -cx25821_i2c_read (&dev->i2c_bus[0 ], -DENC_A_REG_3 + (0x100 * i), &tmp); + value =cx25821_i2c_read (&dev->i2c_bus[0 ], +DENC_A_REG_3 + (0x100 * i), &tmp); value &=0xFC00FE00 ; value |=0x00FC0120 ; - ret_val = -cx25821_i2c_write (&dev->i2c_bus[0 ], -DENC_A_REG_3 + (0x100 * i), value); + ret_val =cx25821_i2c_write (&dev->i2c_bus[0 ], +DENC_A_REG_3 + (0x100 * i), value);/* set PAL vblank, phase alternation, 0 IRE pedestal */ - value = -cx25821_i2c_read (&dev->i2c_bus[0 ], -DENC_A_REG_4 + (0x100 * i), &tmp); + value =cx25821_i2c_read (&dev->i2c_bus[0 ], +DENC_A_REG_4 + (0x100 * i), &tmp); value &=0x00FCFFFF ; value |=0x14010000 ; - ret_val = -cx25821_i2c_write (&dev->i2c_bus[0 ], -DENC_A_REG_4 + (0x100 * i), value); + ret_val =cx25821_i2c_write (&dev->i2c_bus[0 ], +DENC_A_REG_4 + (0x100 * i), value); - value = -cx25821_i2c_read (&dev->i2c_bus[0 ], -DENC_A_REG_5 + (0x100 * i), &tmp); + value =cx25821_i2c_read (&dev->i2c_bus[0 ], +DENC_A_REG_5 + (0x100 * i), &tmp); value &=0xFFFF0000 ; value |=0x0000F078 ; - ret_val = -cx25821_i2c_write (&dev->i2c_bus[0 ], -DENC_A_REG_5 + (0x100 * i), value); + ret_val =cx25821_i2c_write (&dev->i2c_bus[0 ], +DENC_A_REG_5 + (0x100 * i), value); - ret_val = -cx25821_i2c_write (&dev->i2c_bus[0 ], -DENC_A_REG_6 + (0x100 * i),0x00A493CF ); + ret_val =cx25821_i2c_write (&dev->i2c_bus[0 ], +DENC_A_REG_6 + (0x100 * i),0x00A493CF );/* Subcarrier Increment */ - ret_val = -cx25821_i2c_write (&dev->i2c_bus[0 ], -DENC_A_REG_7 + (0x100 * i),0x2A098ACB ); + ret_val =cx25821_i2c_write (&dev->i2c_bus[0 ], +DENC_A_REG_7 + (0x100 * i),0x2A098ACB ); }/* set picture resolutions */
@@ -543,12 +482,10 @@ void medusa_set_resolution(struct cx25821_dev *dev, int width,for (; decoder < decoder_count; decoder++) {/* write scaling values for each decoder */ - ret_val = -cx25821_i2c_write (&dev->i2c_bus[0 ], -HSCALE_CTRL + (0x200 * decoder), hscale); - ret_val = -cx25821_i2c_write (&dev->i2c_bus[0 ], -VSCALE_CTRL + (0x200 * decoder), vscale); + ret_val =cx25821_i2c_write (&dev->i2c_bus[0 ], +HSCALE_CTRL + (0x200 * decoder), hscale); + ret_val =cx25821_i2c_write (&dev->i2c_bus[0 ], +VSCALE_CTRL + (0x200 * decoder), vscale); }mutex_unlock (&dev->lock);
@@ -606,8 +543,8 @@ static void medusa_set_decoderduration(struct cx25821_dev *dev, int decoder, }/* Map to Medusa register setting */ -static int mapM (int srcMin, -int srcMax,int srcVal,int dstMin,int dstMax,int *dstVal) +static int mapM (int srcMin,int srcMax,int srcVal,int dstMin,int dstMax, +int *dstVal) {int numerator;int denominator;
@@ -659,18 +596,14 @@ int medusa_set_brightness(struct cx25821_dev *dev, int brightness, int decoder)mutex_unlock (&dev->lock);return -1 ; } - ret_val = -mapM (VIDEO_PROCAMP_MIN ,VIDEO_PROCAMP_MAX , brightness, -SIGNED_BYTE_MIN ,SIGNED_BYTE_MAX , &value); + ret_val =mapM (VIDEO_PROCAMP_MIN ,VIDEO_PROCAMP_MAX , brightness, +SIGNED_BYTE_MIN ,SIGNED_BYTE_MAX , &value); value =convert_to_twos (value,8 ); - val = -cx25821_i2c_read (&dev->i2c_bus[0 ], -VDEC_A_BRITE_CTRL + (0x200 * decoder), &tmp); + val =cx25821_i2c_read (&dev->i2c_bus[0 ], +VDEC_A_BRITE_CTRL + (0x200 * decoder), &tmp); val &=0xFFFFFF00 ; - ret_val |= -cx25821_i2c_write (&dev->i2c_bus[0 ], -VDEC_A_BRITE_CTRL + (0x200 * decoder), - val | value); + ret_val |=cx25821_i2c_write (&dev->i2c_bus[0 ], +VDEC_A_BRITE_CTRL + (0x200 * decoder), val | value);mutex_unlock (&dev->lock);return ret_val; }
@@ -688,17 +621,13 @@ int medusa_set_contrast(struct cx25821_dev *dev, int contrast, int decoder)return -1 ; } - ret_val = -mapM (VIDEO_PROCAMP_MIN ,VIDEO_PROCAMP_MAX , contrast, -UNSIGNED_BYTE_MIN ,UNSIGNED_BYTE_MAX , &value); - val = -cx25821_i2c_read (&dev->i2c_bus[0 ], -VDEC_A_CNTRST_CTRL + (0x200 * decoder), &tmp); + ret_val =mapM (VIDEO_PROCAMP_MIN ,VIDEO_PROCAMP_MAX , contrast, +UNSIGNED_BYTE_MIN ,UNSIGNED_BYTE_MAX , &value); + val =cx25821_i2c_read (&dev->i2c_bus[0 ], +VDEC_A_CNTRST_CTRL + (0x200 * decoder), &tmp); val &=0xFFFFFF00 ; - ret_val |= -cx25821_i2c_write (&dev->i2c_bus[0 ], -VDEC_A_CNTRST_CTRL + (0x200 * decoder), - val | value); + ret_val |=cx25821_i2c_write (&dev->i2c_bus[0 ], +VDEC_A_CNTRST_CTRL + (0x200 * decoder), val | value);mutex_unlock (&dev->lock);return ret_val;
@@ -717,19 +646,16 @@ int medusa_set_hue(struct cx25821_dev *dev, int hue, int decoder)return -1 ; } - ret_val = -mapM (VIDEO_PROCAMP_MIN ,VIDEO_PROCAMP_MAX , hue,SIGNED_BYTE_MIN , -SIGNED_BYTE_MAX , &value); + ret_val =mapM (VIDEO_PROCAMP_MIN ,VIDEO_PROCAMP_MAX , hue, +SIGNED_BYTE_MIN ,SIGNED_BYTE_MAX , &value); value =convert_to_twos (value,8 ); - val = -cx25821_i2c_read (&dev->i2c_bus[0 ], -VDEC_A_HUE_CTRL + (0x200 * decoder), &tmp); + val =cx25821_i2c_read (&dev->i2c_bus[0 ], +VDEC_A_HUE_CTRL + (0x200 * decoder), &tmp); val &=0xFFFFFF00 ; - ret_val |= -cx25821_i2c_write (&dev->i2c_bus[0 ], -VDEC_A_HUE_CTRL + (0x200 * decoder), val | value); + ret_val |=cx25821_i2c_write (&dev->i2c_bus[0 ], +VDEC_A_HUE_CTRL + (0x200 * decoder), val | value);mutex_unlock (&dev->lock);return ret_val;
@@ -749,27 +675,20 @@ int medusa_set_saturation(struct cx25821_dev *dev, int saturation, int decoder)return -1 ; } - ret_val = -mapM (VIDEO_PROCAMP_MIN ,VIDEO_PROCAMP_MAX , saturation, -UNSIGNED_BYTE_MIN ,UNSIGNED_BYTE_MAX , &value); + ret_val =mapM (VIDEO_PROCAMP_MIN ,VIDEO_PROCAMP_MAX , saturation, +UNSIGNED_BYTE_MIN ,UNSIGNED_BYTE_MAX , &value); - val = -cx25821_i2c_read (&dev->i2c_bus[0 ], -VDEC_A_USAT_CTRL + (0x200 * decoder), &tmp); + val =cx25821_i2c_read (&dev->i2c_bus[0 ], +VDEC_A_USAT_CTRL + (0x200 * decoder), &tmp); val &=0xFFFFFF00 ; - ret_val |= -cx25821_i2c_write (&dev->i2c_bus[0 ], -VDEC_A_USAT_CTRL + (0x200 * decoder), - val | value); - - val = -cx25821_i2c_read (&dev->i2c_bus[0 ], -VDEC_A_VSAT_CTRL + (0x200 * decoder), &tmp); + ret_val |=cx25821_i2c_write (&dev->i2c_bus[0 ], +VDEC_A_USAT_CTRL + (0x200 * decoder), val | value); + + val =cx25821_i2c_read (&dev->i2c_bus[0 ], +VDEC_A_VSAT_CTRL + (0x200 * decoder), &tmp); val &=0xFFFFFF00 ; - ret_val |= -cx25821_i2c_write (&dev->i2c_bus[0 ], -VDEC_A_VSAT_CTRL + (0x200 * decoder), - val | value); + ret_val |=cx25821_i2c_write (&dev->i2c_bus[0 ], +VDEC_A_VSAT_CTRL + (0x200 * decoder), val | value);mutex_unlock (&dev->lock);return ret_val;
@@ -830,9 +749,8 @@ int medusa_video_init(struct cx25821_dev *dev)/* select AFE clock to output mode */ value =cx25821_i2c_read (&dev->i2c_bus[0 ],AFE_AB_DIAG_CTRL , &tmp); value &=0x83FFFFFF ; - ret_val = -cx25821_i2c_write (&dev->i2c_bus[0 ],AFE_AB_DIAG_CTRL , - value |0x10000000 ); + ret_val =cx25821_i2c_write (&dev->i2c_bus[0 ],AFE_AB_DIAG_CTRL , + value |0x10000000 );if (ret_val <0 ) goto error;
Signature · 1 line
1.7.0.4
PATCH 21/36 Staging: cx25821: cx25821-video-upstream-ch2.c: Line up comments
In reply to Leonid V. FedorenchikLine up comments to match indent of surrounding statements.
--- .../staging/cx25821/cx25821-video-upstream-ch2.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
drivers/staging/cx25821/cx25821-video-upstream-ch2.c +4 -4
@@ -173,7 +173,7 @@ int cx25821_risc_buffer_upstream_ch2(struct cx25821_dev *dev, fifo_enable =FIFO_DISABLE ; -/* Even field */ +/* Even field */ rp = cx25821_risc_field_upstream_ch2(dev, rp, dev->_data_buf_phys_addr_ch2 + databuf_offset, bottom_offset, 0x200, bpl, singlefield_lines,
@@ -189,9 +189,9 @@ int cx25821_risc_buffer_upstream_ch2(struct cx25821_dev *dev, }/* -Loop to 2ndFrameRISC or to Start of -Risc program & generate IRQ -*/ +* Loop to 2ndFrameRISC or to Start of +* Risc program & generate IRQ +*/ *(rp++) =cpu_to_le32 (RISC_JUMP |RISC_IRQ1 | risc_flag); *(rp++) =cpu_to_le32 (risc_phys_jump_addr); *(rp++) =cpu_to_le32 (0 );
Signature · 1 line
1.7.0.4
PATCH 22/36 Staging: cx25821: cx25821-video-upstream-ch2.c: Fix indent
In reply to Leonid V. FedorenchikChange indent of statements with (less than 8) spaces to indent with tabs.
--- .../staging/cx25821/cx25821-video-upstream-ch2.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-)
drivers/staging/cx25821/cx25821-video-upstream-ch2.c +6 -6
@@ -85,7 +85,7 @@ static __le32 *cx25821_risc_field_upstream_ch2(struct cx25821_dev *dev, {unsigned int line, i;struct sram_channel *sram_ch = - dev->channels[dev->_channel2_upstream_select].sram_channels; + dev->channels[dev->_channel2_upstream_select].sram_channels;int dist_betwn_starts = bpl *2 ;/* sync instruction */
@@ -203,7 +203,7 @@ int cx25821_risc_buffer_upstream_ch2(struct cx25821_dev *dev,void cx25821_stop_upstream_video_ch2 (struct cx25821_dev *dev) {struct sram_channel *sram_ch = - dev->channels[VID_UPSTREAM_SRAM_CHANNEL_J ].sram_channels; + dev->channels[VID_UPSTREAM_SRAM_CHANNEL_J ].sram_channels;u32 tmp =0 ;if (!dev->_is_running_ch2) {
@@ -325,7 +325,7 @@ int cx25821_get_frame_ch2(struct cx25821_dev *dev, struct sram_channel *sram_ch) && dev->_data_buf_virt_addr_ch2 != NULL) {memcpy ((void *)(dev->_data_buf_virt_addr_ch2 + frame_offset /4 ), mybuf, - vfs_read_retval); + vfs_read_retval); } file_offset += vfs_read_retval;
@@ -419,7 +419,7 @@ int cx25821_openfile_ch2(struct cx25821_dev *dev, struct sram_channel *sram_ch)memcpy ((void *)(dev-> _data_buf_virt_addr_ch2 + offset /4 ), mybuf, - vfs_read_retval); + vfs_read_retval); } offset += vfs_read_retval;
@@ -563,8 +563,8 @@ int cx25821_video_upstream_irq_ch2(struct cx25821_dev *dev, int chan_num,else line_size_in_bytes =Y422_LINE_SZ ; risc_phys_jump_addr = - dev->_dma_phys_start_addr_ch2 + - odd_risc_prog_size; + dev->_dma_phys_start_addr_ch2 + + odd_risc_prog_size; rp = cx25821_update_riscprogram_ch2(dev, dev->_dma_virt_start_addr_ch2,
Signature · 1 line
1.7.0.4
PATCH 23/36 Staging: cx25821: cx25821-video-upsstream-ch2.c: Move operators
In reply to Leonid V. FedorenchikMove operators in complex expressions to the end of the lines to preserve consistency.
--- .../staging/cx25821/cx25821-video-upstream-ch2.c | 16 +++++++--------- 1 files changed, 7 insertions(+), 9 deletions(-)
drivers/staging/cx25821/cx25821-video-upstream-ch2.c +7 -9
@@ -65,9 +65,8 @@ static __le32 *cx25821_update_riscprogram_ch2(struct cx25821_dev *dev, *(rp++) =cpu_to_le32 (dev->_data_buf_phys_addr_ch2 + offset); *(rp++) =cpu_to_le32 (0 );/* bits 63-32 */ -if ((lines <=NTSC_FIELD_HEIGHT ) - || (line < (NTSC_FIELD_HEIGHT -1 )) - || !(dev->_isNTSC_ch2)) { +if ((lines <=NTSC_FIELD_HEIGHT ) || + (line < (NTSC_FIELD_HEIGHT -1 )) || !(dev->_isNTSC_ch2)) { offset += dist_betwn_starts; } }
@@ -103,9 +102,8 @@ static __le32 *cx25821_risc_field_upstream_ch2(struct cx25821_dev *dev, *(rp++) =cpu_to_le32 (databuf_phys_addr + offset); *(rp++) =cpu_to_le32 (0 );/* bits 63-32 */ -if ((lines <=NTSC_FIELD_HEIGHT ) - || (line < (NTSC_FIELD_HEIGHT -1 )) - || !(dev->_isNTSC_ch2)) { +if ((lines <=NTSC_FIELD_HEIGHT ) || + (line < (NTSC_FIELD_HEIGHT -1 )) || !(dev->_isNTSC_ch2)) { offset += dist_betwn_starts; }
@@ -413,9 +411,9 @@ int cx25821_openfile_ch2(struct cx25821_dev *dev, struct sram_channel *sram_ch) vfs_read_retval =vfs_read (myfile, mybuf, line_size, &pos); -if (vfs_read_retval >0 - && vfs_read_retval == line_size - && dev->_data_buf_virt_addr_ch2 !=NULL ) { +if (vfs_read_retval >0 && + vfs_read_retval == line_size && + dev->_data_buf_virt_addr_ch2 !=NULL ) { memcpy((void *)(dev-> _data_buf_virt_addr_ch2 + offset / 4), mybuf,
Signature · 1 line
1.7.0.4
PATCH 24/36 Staging: cx25821: cx25821-video-upstream-ch2.c: Remove braces
In reply to Leonid V. FedorenchikRemove unnecessary curly braces around single if statement.
--- .../staging/cx25821/cx25821-video-upstream-ch2.c | 8 +++----- 1 files changed, 3 insertions(+), 5 deletions(-)
drivers/staging/cx25821/cx25821-video-upstream-ch2.c +3 -5
@@ -610,11 +610,9 @@ static irqreturn_t cx25821_upstream_irq_ch2(int irq, void *dev_id) vid_status =cx_read (sram_ch->int_stat);/* Only deal with our interrupt */ -if (vid_status) { - handled = -cx25821_video_upstream_irq_ch2 (dev, channel_num, - vid_status); - } +if (vid_status) + handled =cx25821_video_upstream_irq_ch2 (dev, channel_num, + vid_status);if (handled <0 )cx25821_stop_upstream_video_ch2 (dev);
Signature · 1 line
1.7.0.4
PATCH 25/36 Staging: cx25821: cx25821-video-upstream-ch2.c: Change line endings
In reply to Leonid V. FedorenchikChange obscure line endings to less obscure ones. (improve readability)
--- .../staging/cx25821/cx25821-video-upstream-ch2.c | 82 ++++++++----------- 1 files changed, 35 insertions(+), 47 deletions(-)
drivers/staging/cx25821/cx25821-video-upstream-ch2.c +35 -47
@@ -260,9 +260,8 @@ int cx25821_get_frame_ch2(struct cx25821_dev *dev, struct sram_channel *sram_ch)struct file *myfile;int frame_index_temp = dev->_frame_index_ch2;int i =0 ; -int line_size = - (dev->_pixel_format_ch2 == -PIXEL_FRMT_411 ) ?Y411_LINE_SZ :Y422_LINE_SZ ; +int line_size = (dev->_pixel_format_ch2 ==PIXEL_FRMT_411 ) ? +Y411_LINE_SZ :Y422_LINE_SZ ;int frame_size =0 ;int frame_offset =0 ;ssize_t vfs_read_retval =0 ;
@@ -275,14 +274,11 @@ int cx25821_get_frame_ch2(struct cx25821_dev *dev, struct sram_channel *sram_ch)return 0 ;if (dev->_isNTSC_ch2) { - frame_size = - (line_size == -Y411_LINE_SZ ) ?FRAME_SIZE_NTSC_Y411 : -FRAME_SIZE_NTSC_Y422 ; + frame_size = (line_size ==Y411_LINE_SZ ) ? +FRAME_SIZE_NTSC_Y411 :FRAME_SIZE_NTSC_Y422 ; }else { - frame_size = - (line_size == -Y411_LINE_SZ ) ?FRAME_SIZE_PAL_Y411 :FRAME_SIZE_PAL_Y422 ; + frame_size = (line_size ==Y411_LINE_SZ ) ? +FRAME_SIZE_PAL_Y411 :FRAME_SIZE_PAL_Y422 ; } frame_offset = (frame_index_temp >0 ) ? frame_size :0 ;
@@ -316,8 +312,8 @@ int cx25821_get_frame_ch2(struct cx25821_dev *dev, struct sram_channel *sram_ch)for (i =0 ; i < dev->_lines_count_ch2; i++) { pos = file_offset; - vfs_read_retval = -vfs_read (myfile, mybuf, line_size, &pos); + vfs_read_retval =vfs_read (myfile, mybuf, line_size, + &pos);if (vfs_read_retval >0 && vfs_read_retval == line_size && dev->_data_buf_virt_addr_ch2 !=NULL ) {
@@ -339,8 +335,8 @@ int cx25821_get_frame_ch2(struct cx25821_dev *dev, struct sram_channel *sram_ch)if (i >0 ) dev->_frame_count_ch2++; - dev->_file_status_ch2 = - (vfs_read_retval == line_size) ?IN_PROGRESS :END_OF_FILE ; + dev->_file_status_ch2 = (vfs_read_retval == line_size) ? +IN_PROGRESS :END_OF_FILE ;set_fs (old_fs);filp_close (myfile,NULL );
@@ -351,8 +347,8 @@ int cx25821_get_frame_ch2(struct cx25821_dev *dev, struct sram_channel *sram_ch)static void cx25821_vidups_handler_ch2 (struct work_struct *work) { -struct cx25821_dev *dev = - container_of(work, struct cx25821_dev, _irq_work_entry_ch2); + struct cx25821_dev *dev = container_of(work, struct cx25821_dev, + _irq_work_entry_ch2);if (!dev) { pr_err("ERROR %s(): since container_of(work_struct) FAILED!\n",
@@ -360,18 +356,16 @@ static void cx25821_vidups_handler_ch2(struct work_struct *work)return ; } -cx25821_get_frame_ch2 (dev, - dev->channels[dev-> - _channel2_upstream_select].sram_channels); +cx25821_get_frame_ch2 (dev, dev->channels[dev-> + _channel2_upstream_select].sram_channels); }int cx25821_openfile_ch2 (struct cx25821_dev *dev,struct sram_channel *sram_ch) {struct file *myfile;int i =0 , j =0 ; -int line_size = - (dev->_pixel_format_ch2 == -PIXEL_FRMT_411 ) ?Y411_LINE_SZ :Y422_LINE_SZ ; +int line_size = (dev->_pixel_format_ch2 ==PIXEL_FRMT_411 ) ? +Y411_LINE_SZ :Y422_LINE_SZ ;ssize_t vfs_read_retval =0 ;char mybuf[line_size];loff_t pos;
@@ -408,8 +402,8 @@ int cx25821_openfile_ch2(struct cx25821_dev *dev, struct sram_channel *sram_ch)for (i =0 ; i < dev->_lines_count_ch2; i++) { pos = offset; - vfs_read_retval = -vfs_read (myfile, mybuf, line_size, &pos); + vfs_read_retval =vfs_read (myfile, mybuf, + line_size, &pos); if (vfs_read_retval > 0 && vfs_read_retval == line_size &&
@@ -436,8 +430,8 @@ int cx25821_openfile_ch2(struct cx25821_dev *dev, struct sram_channel *sram_ch)break ; } - dev->_file_status_ch2 = - (vfs_read_retval == line_size) ?IN_PROGRESS :END_OF_FILE ; + dev->_file_status_ch2 = (vfs_read_retval == line_size) ? +IN_PROGRESS :END_OF_FILE ;set_fs (old_fs); myfile->f_pos =0 ;
@@ -461,9 +455,8 @@ static int cx25821_upstream_buffer_prepare_ch2(struct cx25821_dev *dev, dev->_dma_phys_addr_ch2); } - dev->_dma_virt_addr_ch2 = -pci_alloc_consistent (dev->pci, dev->upstream_riscbuf_size_ch2, - &dma_addr); + dev->_dma_virt_addr_ch2 =pci_alloc_consistent (dev->pci, + dev->upstream_riscbuf_size_ch2, &dma_addr); dev->_dma_virt_start_addr_ch2 = dev->_dma_virt_addr_ch2; dev->_dma_phys_start_addr_ch2 = dma_addr; dev->_dma_phys_addr_ch2 = dma_addr;
@@ -483,9 +476,8 @@ static int cx25821_upstream_buffer_prepare_ch2(struct cx25821_dev *dev, dev->_data_buf_phys_addr_ch2); }/* For Video Data buffer allocation */ - dev->_data_buf_virt_addr_ch2 = -pci_alloc_consistent (dev->pci, dev->upstream_databuf_size_ch2, - &data_dma_addr); + dev->_data_buf_virt_addr_ch2 =pci_alloc_consistent (dev->pci, + dev->upstream_databuf_size_ch2, &data_dma_addr); dev->_data_buf_phys_addr_ch2 = data_dma_addr; dev->_data_buf_size_ch2 = dev->upstream_databuf_size_ch2;
@@ -687,8 +679,7 @@ int cx25821_start_video_dma_upstream_ch2(struct cx25821_dev *dev, tmp =cx_read (sram_ch->int_msk);cx_write (sram_ch->int_msk, tmp |= _intr_msk); - err = -request_irq (dev->pci->irq, cx25821_upstream_irq_ch2, + err =request_irq (dev->pci->irq, cx25821_upstream_irq_ch2,IRQF_SHARED |IRQF_DISABLED , dev->name, dev);if (err <0 ) { pr_err("%s: can't get upstream IRQ %d\n",
@@ -748,12 +739,11 @@ int cx25821_vidupstream_init_ch2(struct cx25821_dev *dev, int channel_select, dev->_file_status_ch2 =RESET_STATUS ; dev->_lines_count_ch2 = dev->_isNTSC_ch2 ?480 :576 ; dev->_pixel_format_ch2 = pixel_format; - dev->_line_size_ch2 = - (dev->_pixel_format_ch2 == -PIXEL_FRMT_422 ) ? (WIDTH_D1 *2 ) : (WIDTH_D1 *3 ) /2 ; + dev->_line_size_ch2 = (dev->_pixel_format_ch2 ==PIXEL_FRMT_422 ) ? + (WIDTH_D1 *2 ) : (WIDTH_D1 *3 ) /2 ; data_frame_size = dev->_isNTSC_ch2 ?NTSC_DATA_BUF_SZ :PAL_DATA_BUF_SZ ; - risc_buffer_size = - dev->_isNTSC_ch2 ?NTSC_RISC_BUF_SIZE :PAL_RISC_BUF_SIZE ; + risc_buffer_size = dev->_isNTSC_ch2 ? +NTSC_RISC_BUF_SIZE :PAL_RISC_BUF_SIZE ;if (dev->input_filename_ch2) { str_length =strlen (dev->input_filename_ch2);
@@ -778,15 +768,13 @@ int cx25821_vidupstream_init_ch2(struct cx25821_dev *dev, int channel_select,/* Default if filename is empty string */ if (strcmp (dev->input_filename_ch2,"" ) ==0 ) {if (dev->_isNTSC_ch2) { - dev->_filename_ch2 = - (dev->_pixel_format_ch2 == -PIXEL_FRMT_411 ) ?"/root/vid411.yuv" : -"/root/vidtest.yuv" ; + dev->_filename_ch2 = (dev->_pixel_format_ch2 == +PIXEL_FRMT_411 ) ?"/root/vid411.yuv" : +"/root/vidtest.yuv" ; }else { - dev->_filename_ch2 = - (dev->_pixel_format_ch2 == -PIXEL_FRMT_411 ) ?"/root/pal411.yuv" : -"/root/pal422.yuv" ; + dev->_filename_ch2 = (dev->_pixel_format_ch2 == +PIXEL_FRMT_411 ) ?"/root/pal411.yuv" : +"/root/pal422.yuv" ; } }
Signature · 1 line
1.7.0.4
PATCH 26/36 Staging: cx25821: cx25821-video-upstream.c: Remove braces
In reply to Leonid V. FedorenchikDelete curly braces around single if-else statements.
--- drivers/staging/cx25821/cx25821-video-upstream.c | 35 +++++++++------------- 1 files changed, 14 insertions(+), 21 deletions(-)
drivers/staging/cx25821/cx25821-video-upstream.c +14 -21
@@ -326,16 +326,12 @@ int cx25821_get_frame(struct cx25821_dev *dev, struct sram_channel *sram_ch)if (dev->_file_status ==END_OF_FILE )return 0 ; -if (dev->_isNTSC) { - frame_size = - (line_size == -Y411_LINE_SZ ) ?FRAME_SIZE_NTSC_Y411 : -FRAME_SIZE_NTSC_Y422 ; - }else { - frame_size = - (line_size == -Y411_LINE_SZ ) ?FRAME_SIZE_PAL_Y411 :FRAME_SIZE_PAL_Y422 ; - } +if (dev->_isNTSC) + frame_size = (line_size ==Y411_LINE_SZ ) ? +FRAME_SIZE_NTSC_Y411 :FRAME_SIZE_NTSC_Y422 ; +else + frame_size = (line_size ==Y411_LINE_SZ ) ? +FRAME_SIZE_PAL_Y411 :FRAME_SIZE_PAL_Y422 ; frame_offset = (frame_index_temp >0 ) ? frame_size :0 ; file_offset = dev->_frame_count * frame_size;
@@ -507,10 +503,9 @@ int cx25821_upstream_buffer_prepare(struct cx25821_dev *dev,dma_addr_t dma_addr;dma_addr_t data_dma_addr; -if (dev->_dma_virt_addr !=NULL ) { +if (dev->_dma_virt_addr !=NULL )pci_free_consistent (dev->pci, dev->upstream_riscbuf_size, - dev->_dma_virt_addr, dev->_dma_phys_addr); - } + dev->_dma_virt_addr, dev->_dma_phys_addr); dev->_dma_virt_addr = pci_alloc_consistent(dev->pci, dev->upstream_riscbuf_size,
@@ -528,11 +523,10 @@ int cx25821_upstream_buffer_prepare(struct cx25821_dev *dev,/* Clear memory at address */ memset (dev->_dma_virt_addr,0 , dev->_risc_size); -if (dev->_data_buf_virt_addr !=NULL ) { +if (dev->_data_buf_virt_addr !=NULL )pci_free_consistent (dev->pci, dev->upstream_databuf_size, - dev->_data_buf_virt_addr, - dev->_data_buf_phys_addr); - } + dev->_data_buf_virt_addr, + dev->_data_buf_phys_addr);/* For Video Data buffer allocation */ dev->_data_buf_virt_addr = pci_alloc_consistent(dev->pci, dev->upstream_databuf_size,
@@ -672,10 +666,9 @@ static irqreturn_t cx25821_upstream_irq(int irq, void *dev_id) vid_status =cx_read (sram_ch->int_stat);/* Only deal with our interrupt */ -if (vid_status) { - handled = -cx25821_video_upstream_irq (dev, channel_num, vid_status); - } +if (vid_status) + handled =cx25821_video_upstream_irq (dev, channel_num, + vid_status);if (handled <0 )cx25821_stop_upstream_video_ch1 (dev);
Signature · 1 line
1.7.0.4
PATCH 27/36 Staging: cx25821: cx25821-video-upstream.c: Fix indent
In reply to Leonid V. FedorenchikChange indent of statements to use tabs and to improve readability.
--- drivers/staging/cx25821/cx25821-video-upstream.c | 24 ++++++++------------- 1 files changed, 9 insertions(+), 15 deletions(-)
drivers/staging/cx25821/cx25821-video-upstream.c +9 -15
@@ -136,7 +136,7 @@ static __le32 *cx25821_risc_field_upstream(struct cx25821_dev *dev, __le32 * rp, {unsigned int line, i;struct sram_channel *sram_ch = - dev->channels[dev->_channel_upstream_select].sram_channels; + dev->channels[dev->_channel_upstream_select].sram_channels;int dist_betwn_starts = bpl *2 ;/* sync instruction */
@@ -214,13 +214,9 @@ int cx25821_risc_buffer_upstream(struct cx25821_dev *dev,if (UNSET != top_offset) { fifo_enable = (frame ==0 ) ?FIFO_ENABLE :FIFO_DISABLE ; rp =cx25821_risc_field_upstream (dev, rp, - dev-> - _data_buf_phys_addr + - databuf_offset, - top_offset,0 , bpl, - odd_num_lines, - fifo_enable, -ODD_FIELD ); + dev->_data_buf_phys_addr + + databuf_offset, top_offset,0 , bpl, + odd_num_lines, fifo_enable,ODD_FIELD ); } fifo_enable =FIFO_DISABLE ;
@@ -255,7 +251,7 @@ int cx25821_risc_buffer_upstream(struct cx25821_dev *dev,void cx25821_stop_upstream_video_ch1 (struct cx25821_dev *dev) {struct sram_channel *sram_ch = - dev->channels[VID_UPSTREAM_SRAM_CHANNEL_I ].sram_channels; + dev->channels[VID_UPSTREAM_SRAM_CHANNEL_I ].sram_channels;u32 tmp =0 ;if (!dev->_is_running) {
@@ -829,14 +825,12 @@ int cx25821_vidupstream_init_ch1(struct cx25821_dev *dev, int channel_select,if (strcmp (dev->input_filename,"" ) ==0 ) {if (dev->_isNTSC) { dev->_filename = - (dev->_pixel_format == -PIXEL_FRMT_411 ) ?"/root/vid411.yuv" : -"/root/vidtest.yuv" ; + (dev->_pixel_format ==PIXEL_FRMT_411 ) ? +"/root/vid411.yuv" :"/root/vidtest.yuv" ; }else { dev->_filename = - (dev->_pixel_format == -PIXEL_FRMT_411 ) ?"/root/pal411.yuv" : -"/root/pal422.yuv" ; + (dev->_pixel_format ==PIXEL_FRMT_411 ) ? +"/root/pal411.yuv" :"/root/pal422.yuv" ; } }
Signature · 1 line
1.7.0.4
PATCH 28/36 Staging: cx25821: cx25821-video-upstream.c: Change line endings
In reply to Leonid V. FedorenchikChange obscure line endings to less obscure ones. (improve readability)
--- drivers/staging/cx25821/cx25821-video-upstream.c | 87 +++++++++------------ 1 files changed, 37 insertions(+), 50 deletions(-)
drivers/staging/cx25821/cx25821-video-upstream.c +37 -50
@@ -194,15 +194,12 @@ int cx25821_risc_buffer_upstream(struct cx25821_dev *dev,if (dev->_isNTSC) { odd_num_lines = singlefield_lines +1 ; risc_program_size =FRAME1_VID_PROG_SIZE ; - frame_size = - (bpl == -Y411_LINE_SZ ) ?FRAME_SIZE_NTSC_Y411 : -FRAME_SIZE_NTSC_Y422 ; + frame_size = (bpl ==Y411_LINE_SZ ) ? +FRAME_SIZE_NTSC_Y411 :FRAME_SIZE_NTSC_Y422 ; }else { risc_program_size =PAL_VID_PROG_SIZE ; - frame_size = - (bpl == -Y411_LINE_SZ ) ?FRAME_SIZE_PAL_Y411 :FRAME_SIZE_PAL_Y422 ; + frame_size = (bpl ==Y411_LINE_SZ ) ? +FRAME_SIZE_PAL_Y411 :FRAME_SIZE_PAL_Y422 ; }/* Virtual address of Risc buffer program */
@@ -230,8 +227,8 @@ int cx25821_risc_buffer_upstream(struct cx25821_dev *dev,if (frame ==0 ) { risc_flag =RISC_CNT_RESET ; - risc_phys_jump_addr = - dev->_dma_phys_start_addr + risc_program_size; + risc_phys_jump_addr = dev->_dma_phys_start_addr + + risc_program_size; }else { risc_phys_jump_addr = dev->_dma_phys_start_addr; risc_flag =RISC_CNT_INC ;
@@ -308,9 +305,8 @@ int cx25821_get_frame(struct cx25821_dev *dev, struct sram_channel *sram_ch)struct file *myfile;int frame_index_temp = dev->_frame_index;int i =0 ; -int line_size = - (dev->_pixel_format == -PIXEL_FRMT_411 ) ?Y411_LINE_SZ :Y422_LINE_SZ ; +int line_size = (dev->_pixel_format ==PIXEL_FRMT_411 ) ? +Y411_LINE_SZ :Y422_LINE_SZ ;int frame_size =0 ;int frame_offset =0 ;ssize_t vfs_read_retval =0 ;
@@ -361,8 +357,8 @@ int cx25821_get_frame(struct cx25821_dev *dev, struct sram_channel *sram_ch)for (i =0 ; i < dev->_lines_count; i++) { pos = file_offset; - vfs_read_retval = -vfs_read (myfile, mybuf, line_size, &pos); + vfs_read_retval =vfs_read (myfile, mybuf, line_size, + &pos);if (vfs_read_retval >0 && vfs_read_retval == line_size && dev->_data_buf_virt_addr !=NULL ) {
@@ -384,8 +380,8 @@ int cx25821_get_frame(struct cx25821_dev *dev, struct sram_channel *sram_ch)if (i >0 ) dev->_frame_count++; - dev->_file_status = - (vfs_read_retval == line_size) ?IN_PROGRESS :END_OF_FILE ; + dev->_file_status = (vfs_read_retval == line_size) ? +IN_PROGRESS :END_OF_FILE ;set_fs (old_fs);filp_close (myfile,NULL );
@@ -396,8 +392,8 @@ int cx25821_get_frame(struct cx25821_dev *dev, struct sram_channel *sram_ch)static void cx25821_vidups_handler (struct work_struct *work) { -struct cx25821_dev *dev = - container_of(work, struct cx25821_dev, _irq_work_entry); + struct cx25821_dev *dev = container_of(work, struct cx25821_dev, + _irq_work_entry);if (!dev) { pr_err("ERROR %s(): since container_of(work_struct) FAILED!\n",
@@ -405,18 +401,16 @@ static void cx25821_vidups_handler(struct work_struct *work)return ; } -cx25821_get_frame (dev, - dev->channels[dev->_channel_upstream_select]. - sram_channels); +cx25821_get_frame (dev, dev->channels[dev->_channel_upstream_select]. + sram_channels); }int cx25821_openfile (struct cx25821_dev *dev,struct sram_channel *sram_ch) {struct file *myfile;int i =0 , j =0 ; -int line_size = - (dev->_pixel_format == -PIXEL_FRMT_411 ) ?Y411_LINE_SZ :Y422_LINE_SZ ; +int line_size = (dev->_pixel_format ==PIXEL_FRMT_411 ) ? +Y411_LINE_SZ :Y422_LINE_SZ ;ssize_t vfs_read_retval =0 ;char mybuf[line_size];loff_t pos;
@@ -453,8 +447,8 @@ int cx25821_openfile(struct cx25821_dev *dev, struct sram_channel *sram_ch)for (i =0 ; i < dev->_lines_count; i++) { pos = offset; - vfs_read_retval = -vfs_read (myfile, mybuf, line_size, &pos); + vfs_read_retval =vfs_read (myfile, mybuf, + line_size, &pos);if (vfs_read_retval >0 && vfs_read_retval == line_size
@@ -481,8 +475,8 @@ int cx25821_openfile(struct cx25821_dev *dev, struct sram_channel *sram_ch)break ; } - dev->_file_status = - (vfs_read_retval == line_size) ?IN_PROGRESS :END_OF_FILE ; + dev->_file_status = (vfs_read_retval == line_size) ? +IN_PROGRESS :END_OF_FILE ;set_fs (old_fs); myfile->f_pos =0 ;
@@ -503,9 +497,8 @@ int cx25821_upstream_buffer_prepare(struct cx25821_dev *dev,pci_free_consistent (dev->pci, dev->upstream_riscbuf_size, dev->_dma_virt_addr, dev->_dma_phys_addr); - dev->_dma_virt_addr = -pci_alloc_consistent (dev->pci, dev->upstream_riscbuf_size, - &dma_addr); + dev->_dma_virt_addr =pci_alloc_consistent (dev->pci, + dev->upstream_riscbuf_size, &dma_addr); dev->_dma_virt_start_addr = dev->_dma_virt_addr; dev->_dma_phys_start_addr = dma_addr; dev->_dma_phys_addr = dma_addr;
@@ -524,9 +517,8 @@ int cx25821_upstream_buffer_prepare(struct cx25821_dev *dev, dev->_data_buf_virt_addr, dev->_data_buf_phys_addr);/* For Video Data buffer allocation */ - dev->_data_buf_virt_addr = -pci_alloc_consistent (dev->pci, dev->upstream_databuf_size, - &data_dma_addr); + dev->_data_buf_virt_addr =pci_alloc_consistent (dev->pci, + dev->upstream_databuf_size, &data_dma_addr); dev->_data_buf_phys_addr = data_dma_addr; dev->_data_buf_size = dev->upstream_databuf_size;
@@ -543,9 +535,8 @@ int cx25821_upstream_buffer_prepare(struct cx25821_dev *dev,return ret;/* Create RISC programs */ - ret = -cx25821_risc_buffer_upstream (dev, dev->pci,0 , bpl, - dev->_lines_count); + ret =cx25821_risc_buffer_upstream (dev, dev->pci,0 , bpl, + dev->_lines_count);if (ret <0 ) {pr_info ("Failed creating Video Upstream Risc programs!\n" ); goto error;
@@ -736,8 +727,7 @@ int cx25821_start_video_dma_upstream(struct cx25821_dev *dev, tmp =cx_read (sram_ch->int_msk);cx_write (sram_ch->int_msk, tmp |= _intr_msk); - err = -request_irq (dev->pci->irq, cx25821_upstream_irq, + err =request_irq (dev->pci->irq, cx25821_upstream_irq,IRQF_SHARED |IRQF_DISABLED , dev->name, dev);if (err <0 ) { pr_err("%s: can't get upstream IRQ %d\n",
@@ -796,12 +786,11 @@ int cx25821_vidupstream_init_ch1(struct cx25821_dev *dev, int channel_select, dev->_file_status =RESET_STATUS ; dev->_lines_count = dev->_isNTSC ?480 :576 ; dev->_pixel_format = pixel_format; - dev->_line_size = - (dev->_pixel_format == -PIXEL_FRMT_422 ) ? (WIDTH_D1 *2 ) : (WIDTH_D1 *3 ) /2 ; + dev->_line_size = (dev->_pixel_format ==PIXEL_FRMT_422 ) ? + (WIDTH_D1 *2 ) : (WIDTH_D1 *3 ) /2 ; data_frame_size = dev->_isNTSC ?NTSC_DATA_BUF_SZ :PAL_DATA_BUF_SZ ; - risc_buffer_size = - dev->_isNTSC ?NTSC_RISC_BUF_SIZE :PAL_RISC_BUF_SIZE ; + risc_buffer_size = dev->_isNTSC ? +NTSC_RISC_BUF_SIZE :PAL_RISC_BUF_SIZE ;if (dev->input_filename) { str_length =strlen (dev->input_filename);
@@ -839,13 +828,11 @@ int cx25821_vidupstream_init_ch1(struct cx25821_dev *dev, int channel_select, dev->_file_status =RESET_STATUS ; dev->_lines_count = dev->_isNTSC ?480 :576 ; dev->_pixel_format = pixel_format; - dev->_line_size = - (dev->_pixel_format == -PIXEL_FRMT_422 ) ? (WIDTH_D1 *2 ) : (WIDTH_D1 *3 ) /2 ; + dev->_line_size = (dev->_pixel_format ==PIXEL_FRMT_422 ) ? + (WIDTH_D1 *2 ) : (WIDTH_D1 *3 ) /2 ; - retval = -cx25821_sram_channel_setup_upstream (dev, sram_ch, dev->_line_size, -0 ); + retval =cx25821_sram_channel_setup_upstream (dev, sram_ch, + dev->_line_size,0 );/* setup fifo + format */ cx25821_set_pixelengine (dev, sram_ch, dev->_pixel_format);
Signature · 1 line
1.7.0.4
PATCH 29/36 Staging: cx25821: cx25821-video.c: Delete empty line
In reply to Leonid V. FedorenchikDelete unnecessary empty line.
--- drivers/staging/cx25821/cx25821-video.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
drivers/staging/cx25821/cx25821-video.c +0 -1
@@ -528,7 +528,6 @@ int cx25821_video_register(struct cx25821_dev *dev)#endif mutex_unlock (&dev->lock); -return 0 ; fail_unreg:
Signature · 1 line
1.7.0.4
PATCH 30/36 Staging: cx25821: cx25821-video.c: Change spaces
In reply to Leonid V. FedorenchikChange double spaces between lexemes into single spaces.
--- drivers/staging/cx25821/cx25821-video.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/staging/cx25821/cx25821-video.c +2 -2
@@ -1931,9 +1931,9 @@ static long video_ioctl_set(struct file *file, unsigned int cmd,static long cx25821_video_ioctl (struct file *file,unsigned int cmd,unsigned long arg) { -int ret =0 ; +int ret =0 ; -struct cx25821_fh *fh = file->private_data; +struct cx25821_fh *fh = file->private_data;/* check to see if it's the video upstream */ if (fh->channel_id ==SRAM_CH09 ) {
Signature · 1 line
1.7.0.4
PATCH 31/36 Staging: cx25821: cx25821-video.c: Fix assignment
In reply to Leonid V. FedorenchikChange double assignment in one statement into two assignment statements.
--- drivers/staging/cx25821/cx25821-video.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/staging/cx25821/cx25821-video.c +2 -1
@@ -1622,7 +1622,8 @@ int cx25821_vidioc_cropcap(struct file *file, void *priv,if (cropcap->type !=V4L2_BUF_TYPE_VIDEO_CAPTURE )return -EINVAL ; - cropcap->bounds.top = cropcap->bounds.left =0 ; + cropcap->bounds.top =0 ; + cropcap->bounds.left =0 ; cropcap->bounds.width =720 ; cropcap->bounds.height = dev->tvnorm ==V4L2_STD_PAL_BG ?576 :480 ; cropcap->pixelaspect.numerator =
Signature · 1 line
1.7.0.4
PATCH 32/36 Staging: cx25821: cx25821-video.c: Fix definitions
In reply to Leonid V. FedorenchikChange multiple definitions in one statement into multiple statements with one definition per statement.
--- drivers/staging/cx25821/cx25821-video.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-)
drivers/staging/cx25821/cx25821-video.c +5 -2
@@ -1829,8 +1829,11 @@ static long video_ioctl_set(struct file *file, unsigned int cmd,struct downstream_user_struct *data_from_user;int command;int width =720 ; -int selected_channel =0 , pix_format =0 , i =0 ; -int cif_enable =0 , cif_width =0 ; +int selected_channel =0 ; +int pix_format =0 ; +int i =0 ; +int cif_enable =0 ; +int cif_width =0 ;u32 value =0 ; data_from_user = (struct downstream_user_struct *)arg;
Signature · 1 line
1.7.0.4
PATCH 33/36 Staging: cx25821: cx25821-video.c: Move operators
In reply to Leonid V. FedorenchikMove operator in complex expression to the end of the line to preserve consistency.
--- drivers/staging/cx25821/cx25821-video.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/staging/cx25821/cx25821-video.c +2 -2
@@ -616,8 +616,8 @@ int cx25821_buffer_prepare(struct videobuf_queue *q, struct videobuf_buffer *vb,if (channel_opened >=0 && channel_opened <=7 ) {if (dev->channels[channel_opened] .use_cif_resolution) { -if (dev->tvnorm &V4L2_STD_PAL_BG - || dev->tvnorm &V4L2_STD_PAL_DK ) +if (dev->tvnorm &V4L2_STD_PAL_BG || + dev->tvnorm &V4L2_STD_PAL_DK ) bpl_local =352 <<1 ;else bpl_local =
Signature · 1 line
1.7.0.4
PATCH 34/36 Staging: cx25821: cx25821-video.c: Fix indent
In reply to Leonid V. FedorenchikFix indent of statements to improve readability.
--- drivers/staging/cx25821/cx25821-video.c | 79 +++++++++++++++---------------- 1 files changed, 39 insertions(+), 40 deletions(-)
drivers/staging/cx25821/cx25821-video.c +39 -40
@@ -118,12 +118,12 @@ void cx25821_dump_video_queue(struct cx25821_dev *dev,if (!list_empty (&q->active)) {list_for_each (item, &q->active) - buf = list_entry(item, struct cx25821_buffer, vb.queue); + buf = list_entry(item, struct cx25821_buffer, vb.queue); }if (!list_empty (&q->queued)) {list_for_each (item, &q->queued) - buf = list_entry(item, struct cx25821_buffer, vb.queue); + buf = list_entry(item, struct cx25821_buffer, vb.queue); } }
@@ -484,8 +484,7 @@ int cx25821_video_register(struct cx25821_dev *dev)cx25821_init_controls (dev, i);cx25821_risc_stopper (dev->pci, &dev->channels[i].vidq.stopper, - dev->channels[i].sram_channels->dma_ctl, -0x11 ,0 ); + dev->channels[i].sram_channels->dma_ctl,0x11 ,0 ); dev->channels[i].sram_channels = &cx25821_sram_channels[i]; dev->channels[i].video_dev =NULL ;
@@ -557,7 +556,7 @@ int cx25821_buffer_prepare(struct videobuf_queue *q, struct videobuf_buffer *vb,struct cx25821_fh *fh = q->priv_data;struct cx25821_dev *dev = fh->dev;struct cx25821_buffer *buf = - container_of(vb, struct cx25821_buffer, vb); + container_of(vb, struct cx25821_buffer, vb);int rc, init_buffer =0 ;u32 line0_offset, line1_offset;struct videobuf_dmabuf *dma =videobuf_to_dma (&buf->vb);
@@ -684,7 +683,7 @@ void cx25821_buffer_release(struct videobuf_queue *q, struct videobuf_buffer *vb) {struct cx25821_buffer *buf = - container_of(vb, struct cx25821_buffer, vb); + container_of(vb, struct cx25821_buffer, vb);cx25821_free_buffer (q, buf); }
@@ -722,7 +721,7 @@ int cx25821_video_mmap(struct file *file, struct vm_area_struct *vma)static void buffer_queue (struct videobuf_queue *vq,struct videobuf_buffer *vb) {struct cx25821_buffer *buf = - container_of(vb, struct cx25821_buffer, vb); + container_of(vb, struct cx25821_buffer, vb);struct cx25821_buffer *prev;struct cx25821_fh *fh = vq->priv_data;struct cx25821_dev *dev = fh->dev;
@@ -813,7 +812,7 @@ static int video_open(struct file *file)for (i =0 ; i <MAX_VID_CHANNEL_NUM ; i++) {if (h->channels[i].video_dev && - h->channels[i].video_dev->minor == minor) { + h->channels[i].video_dev->minor == minor) { dev = h; ch_id = i; type =V4L2_BUF_TYPE_VIDEO_CAPTURE ;
@@ -1453,38 +1452,38 @@ static const struct v4l2_queryctrl no_ctl = {static struct v4l2_queryctrl cx25821_ctls[] = {/* --- video --- */ { - .id =V4L2_CID_BRIGHTNESS , - .name ="Brightness" , - .minimum =0 , - .maximum =10000 , - .step =1 , - .default_value =6200 , - .type =V4L2_CTRL_TYPE_INTEGER , - }, { - .id =V4L2_CID_CONTRAST , - .name ="Contrast" , - .minimum =0 , - .maximum =10000 , - .step =1 , - .default_value =5000 , - .type =V4L2_CTRL_TYPE_INTEGER , - }, { - .id =V4L2_CID_SATURATION , - .name ="Saturation" , - .minimum =0 , - .maximum =10000 , - .step =1 , - .default_value =5000 , - .type =V4L2_CTRL_TYPE_INTEGER , - }, { - .id =V4L2_CID_HUE , - .name ="Hue" , - .minimum =0 , - .maximum =10000 , - .step =1 , - .default_value =5000 , - .type =V4L2_CTRL_TYPE_INTEGER , - } + .id =V4L2_CID_BRIGHTNESS , + .name ="Brightness" , + .minimum =0 , + .maximum =10000 , + .step =1 , + .default_value =6200 , + .type =V4L2_CTRL_TYPE_INTEGER , + }, { + .id =V4L2_CID_CONTRAST , + .name ="Contrast" , + .minimum =0 , + .maximum =10000 , + .step =1 , + .default_value =5000 , + .type =V4L2_CTRL_TYPE_INTEGER , + }, { + .id =V4L2_CID_SATURATION , + .name ="Saturation" , + .minimum =0 , + .maximum =10000 , + .step =1 , + .default_value =5000 , + .type =V4L2_CTRL_TYPE_INTEGER , + }, { + .id =V4L2_CID_HUE , + .name ="Hue" , + .minimum =0 , + .maximum =10000 , + .step =1 , + .default_value =5000 , + .type =V4L2_CTRL_TYPE_INTEGER , + } };static const int CX25821_CTLS =ARRAY_SIZE (cx25821_ctls);
Signature · 1 line
1.7.0.4
PATCH 35/36 Staging: cx25821: cx25821-video.c: Change line endings
In reply to Leonid V. FedorenchikChange obscure line endings to less obscure ones. (improve readability)
--- drivers/staging/cx25821/cx25821-video.c | 47 ++++++++++++++---------------- 1 files changed, 22 insertions(+), 25 deletions(-)
drivers/staging/cx25821/cx25821-video.c +22 -25
@@ -140,8 +140,8 @@ void cx25821_video_wakeup(struct cx25821_dev *dev, struct cx25821_dmaqueue *q,break ; } - buf = - list_entry(q->active.next, struct cx25821_buffer, vb.queue); + buf = list_entry(q->active.next, struct cx25821_buffer, + vb.queue);/* count comes from the hw and it is 16bit wide -- * this trick handles wrap-arounds correctly for
@@ -318,8 +318,8 @@ int cx25821_restart_video_queue(struct cx25821_dev *dev,struct list_head *item;if (!list_empty (&q->active)) { - buf = - list_entry(q->active.next, struct cx25821_buffer, vb.queue); + buf = list_entry(q->active.next, struct cx25821_buffer, + vb.queue);cx25821_start_video_dma (dev, q, buf, channel);
@@ -337,8 +337,8 @@ int cx25821_restart_video_queue(struct cx25821_dev *dev,if (list_empty (&q->queued))return 0 ; - buf = - list_entry(q->queued.next, struct cx25821_buffer, vb.queue); + buf = list_entry(q->queued.next, struct cx25821_buffer, + vb.queue);if (NULL == prev) {list_move_tail (&buf->vb.queue, &q->active);
@@ -375,8 +375,8 @@ void cx25821_vid_timeout(unsigned long data)spin_lock_irqsave (&dev->slock, flags);while (!list_empty (&q->active)) { - buf = - list_entry(q->active.next, struct cx25821_buffer, vb.queue); + buf = list_entry(q->active.next, struct cx25821_buffer, + vb.queue);list_del (&buf->vb.queue); buf->vb.state =VIDEOBUF_ERROR ;
@@ -498,15 +498,14 @@ int cx25821_video_register(struct cx25821_dev *dev) dev->channels[i].timeout_data.dev = dev; dev->channels[i].timeout_data.channel = &cx25821_sram_channels[i]; - dev->channels[i].vidq.timeout.function = - cx25821_vid_timeout; + dev->channels[i].vidq.timeout.function = cx25821_vid_timeout; dev->channels[i].vidq.timeout.data = (unsigned long )&dev->channels[i].timeout_data;init_timer (&dev->channels[i].vidq.timeout);/* register v4l devices */ - dev->channels[i].video_dev =cx25821_vdev_init (dev, - dev->pci, &cx25821_video_device,"video" ); + dev->channels[i].video_dev =cx25821_vdev_init (dev, dev->pci, + &cx25821_video_device,"video" ); err =video_register_device (dev->channels[i].video_dev,VFL_TYPE_GRABBER , video_nr[dev->nr]);
@@ -619,10 +618,9 @@ int cx25821_buffer_prepare(struct videobuf_queue *q, struct videobuf_buffer *vb, dev->tvnorm & V4L2_STD_PAL_DK) bpl_local =352 <<1 ; else - bpl_local = - dev->channels[channel_opened]. - cif_width << -1 ; + bpl_local = dev->channels[ + channel_opened]. + cif_width <<1 ; } } }
@@ -846,11 +844,10 @@ static int video_open(struct file *file)v4l2_prio_open (&dev->channels[ch_id].prio, &fh->prio); -videobuf_queue_sg_init (&fh->vidq, &cx25821_video_qops, - &dev->pci->dev, &dev->slock, -V4L2_BUF_TYPE_VIDEO_CAPTURE , -V4L2_FIELD_INTERLACED , -sizeof (struct cx25821_buffer ), fh,NULL ); +videobuf_queue_sg_init (&fh->vidq, &cx25821_video_qops, &dev->pci->dev, + &dev->slock,V4L2_BUF_TYPE_VIDEO_CAPTURE , +V4L2_FIELD_INTERLACED ,sizeof (struct cx25821_buffer ), + fh,NULL );dprintk (1 ,"post videobuf_queue_init()\n" );mutex_unlock (&cx25821_devlist_mutex);
@@ -1166,8 +1163,8 @@ int cx25821_vidioc_querycap(struct file *file, void *priv,strlcpy (cap->card, cx25821_boards[dev->board].name,sizeof (cap->card));sprintf (cap->bus_info,"PCIe:%s" ,pci_name (dev->pci)); cap->version =CX25821_VERSION_CODE ; - cap->capabilities = -V4L2_CAP_VIDEO_CAPTURE |V4L2_CAP_READWRITE |V4L2_CAP_STREAMING ; + cap->capabilities =V4L2_CAP_VIDEO_CAPTURE |V4L2_CAP_READWRITE | +V4L2_CAP_STREAMING ;if (UNSET != dev->tuner_type) cap->capabilities |=V4L2_CAP_TUNER ;return 0 ;
@@ -1897,8 +1894,8 @@ static long video_ioctl_set(struct file *file, unsigned int cmd, }if (selected_channel <=7 && selected_channel >=0 ) { - dev->channels[selected_channel]. - use_cif_resolution = cif_enable; + dev->channels[selected_channel].use_cif_resolution = + cif_enable; dev->channels[selected_channel].cif_width = width; }else {for (i =0 ; i <VID_CHANNEL_NUM ; i++) {
Signature · 1 line
1.7.0.4
PATCH 36/36 Staging: cx25821: cx25821.h: Line up defines
In reply to Leonid V. FedorenchikLine up constant defines to the same column.
--- drivers/staging/cx25821/cx25821.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/staging/cx25821/cx25821.h +2 -2
@@ -67,7 +67,7 @@#define MAX_CAMERAS 16/* Max number of inputs by card */ -#define MAX_CX25821_INPUT 8 +#define MAX_CX25821_INPUT 8#define INPUT (nr) (&cx25821_boards[dev->board].input[nr])#define RESOURCE_VIDEO0 1#define RESOURCE_VIDEO1 2
@@ -85,7 +85,7 @@#define BUFFER_TIMEOUT (HZ)/* 0.5 seconds */ -#define UNKNOWN_BOARD 0 +#define UNKNOWN_BOARD 0#define CX25821_BOARD 1/* Currently supported by the driver */
Signature · 1 line
1.7.0.4
Quoted 3 lines · Leonid V. Fedorenchik
This patch series fixes some style issues in
drivers/staging/cx25821Mostly I was hoping to improve readability and fix some issues found by checkpatch.pl script.
These are for Mauro to take through his tree.
greg k-h
Em 22-10-2011 10:19, Greg KH escreveu:
Quoted 6 lines · Leonid V. Fedorenchik
Quoted 3 lines
This patch series fixes some style issues in
drivers/staging/cx25821Mostly I was hoping to improve readability and fix some issues found by checkpatch.pl script.These are for Mauro to take through his tree.
Yes. I'll put them on my queue.
Thanks,
Mauro
Quoted 9 lines · On Sun, 23 Oct 2011 07:36:45 +0200 Mauro Carvalho Chehab <[email protected]>…
Em 22-10-2011 10:19, Greg KH escreveu:
Quoted 6 lines · Leonid V. Fedorenchik
Quoted 3 lines
This patch series fixes some style issues in
drivers/staging/cx25821Mostly I was hoping to improve readability and fix some issues found by checkpatch.pl script.These are for Mauro to take through his tree.
Yes. I'll put them on my queue.
Thank you. Should I send my future patches for this driver directly to you?
Quoted 3 lines
Thanks,
Mauro
Leonid V. Fedorenchik
Em 23-10-2011 17:24, Leonid V. Fedorenchik escreveu:
Quoted 9 lines
Quoted 6 lines · On Sun, 23 Oct 2011 07:36:45 +0200 Mauro Carvalho Chehab <[email protected]>…
Em 22-10-2011 10:19, Greg KH escreveu:
Quoted 5 lines · Leonid V. Fedorenchik
Quoted 3 lines
This patch series fixes some style issues in
drivers/staging/cx25821Mostly I was hoping to improve readability and fix some issues found by checkpatch.pl script.
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
These are for Mauro to take through his tree.
Yes. I'll put them on my queue.
Thank you. Should I send my future patches for this driver directly to you?
The better is if you could send them to [email protected]. Patchwork will catch them and put on my queue automatically.
Thanks,
Mauro
Quoted 6 lines
Quoted 4 lines
Thanks,
MauroLeonid V. Fedorenchik
Quoted 6 lines · On Sun, 23 Oct 2011 22:45:44 +0200 Mauro Carvalho Chehab <[email protected]>…
Em 23-10-2011 17:24, Leonid V. Fedorenchik escreveu:
Quoted 2 lines
Thank you. Should I send my future patches for this driver directly to you?
The better is if you could send them to [email protected]. Patchwork will catch them and put on my queue automatically.
OK, will do. :)
Quoted 3 lines
Thanks,
Mauro
Leonid V. Fedorenchik
PATCH 1/1 MAINTAINERS: Staging: cx25821: Add L: linux-media
Send patches to a mailing list.
---
Quoted 2 lines · On Sun, 23 Oct 2011 22:45:44 +0200 Mauro Carvalho Chehab <[email protected]>…
The better is if you could send them to [email protected]. Patchwork will catch them and put on my queue automatically.
MAINTAINERS | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
MAINTAINERS +5 -0
@@ -6262,6 +6262,11 @@ M: Mori Hess <[email protected]> S: Odd Fixes F: drivers/staging/comedi/ +STAGING - CONEXANT CX25821 PCIE BRIDGE +L: [email protected] +S: Odd Fixes +F: drivers/staging/cx25821/ + STAGING - CRYSTAL HD VIDEO DECODER M: Naren Sankar <[email protected]> M: Jarod Wilson <[email protected]>
Quoted 9 lines · On Sun, 23 Oct 2011 07:36:45 +0200 Mauro Carvalho Chehab <[email protected]>…
Em 22-10-2011 10:19, Greg KH escreveu:
Quoted 6 lines · Leonid V. Fedorenchik
Quoted 3 lines
This patch series fixes some style issues in
drivers/staging/cx25821Mostly I was hoping to improve readability and fix some issues found by checkpatch.pl script.These are for Mauro to take through his tree.
Yes. I'll put them on my queue.
I didn't find this patch series in any of linux, staging, linux-media, and media-next trees. Since you moved driver cx25821 out of staging, do you want me to resend this patch series rebased on top of media-next?
Or I missed it somewhere and you applied it?
Quoted 3 lines
Thanks,
Mauro
Thanks,
Leonid V. Fedorenchik
Em 19-11-2011 04:28, Leonid V. Fedorenchik escreveu:
Quoted 9 lines
Quoted 6 lines · On Sun, 23 Oct 2011 07:36:45 +0200 Mauro Carvalho Chehab <[email protected]>…
Em 22-10-2011 10:19, Greg KH escreveu:
Quoted 5 lines · Leonid V. Fedorenchik
Quoted 3 lines
This patch series fixes some style issues in
drivers/staging/cx25821Mostly I was hoping to improve readability and fix some issues found by checkpatch.pl script.
Quoted 7 lines
Quoted 3 lines
Quoted 1 line
These are for Mauro to take through his tree.
Yes. I'll put them on my queue.
I didn't find this patch series in any of linux, staging, linux-media, and media-next trees. Since you moved driver cx25821 out of staging, do you want me to resend this patch series rebased on top of media-next?
No need. I'll apply it with:
$ more `quilt next` | sed s,drivers/staging/cx25821/,drivers/media/video/cx25821/, >a && mv a `quilt next`
Quoted 1 line
Or I missed it somewhere and you applied it?
I was too busy those days due to KS and then LinuxCon Brazil. I'm handling your patches today.
Regards,
Mauro
Quoted 2 lines · On Thu, 24 Nov 2011 18:42:07 -0200 Mauro Carvalho Chehab <[email protected]>…
I was too busy those days due to KS and then LinuxCon Brazil. I'm handling your patches today.
Thank you. :)
Quoted 3 lines
Regards,
Mauro
Leonid V. Fedorenchik
Thanks Leonid!
Change in patch #18 is also ok.
Regards,
Palash
________________________________________
From: Leonid V. Fedorenchik [[email protected]]
Sent: Friday, October 21, 2011 10:43 PM
To: Greg Kroah-Hartman
Cc: Mauro Carvalho Chehab; Namhyung Kim; Palash Bandyopadhyay; Joe Perches; Ilia Mirkin; Youquan Song; Leonid V. Fedorenchik; [email protected]; [email protected]
Subject: [PATCH 00/36] Staging: cx25821: Clean up patch series
This patch series fixes some style issues in drivers/staging/cx25821 Mostly I was hoping to improve readability and fix some issues found by checkpatch.pl script.
There is one question, however, in patch no. 18:
I deleted part of the comment that contradicts to the code and in this case maybe I should edit the code to match the comment instead. I am not sure if in this case it makes sense to check if width > 0.
Leonid V. Fedorenchik (36):
Staging: cx25821: cx25821-alsa.c: Line up comments
Staging: cx25821: cx25821-alsa.c: Add braces to else clause
Staging: cx25821: cx25821-alsa.c: Fix indent
Staging: cx25821: cx25821-alsa.c: Change line endings
Staging: cx25821: cx25821-audio-upstream.c: Fix indent
Staging: cx25821: cx25821-audio-upstream.c: Move operators
Staging: cx25821: cx25821-audio-upstream.c: Change line endings
Staging: cx25821: cx25821-audio.h: Line up defines
Staging: cx25821: cx25821-audio.h: Fix multiline defines
Staging: cx25821: cx25821-cards.c: Fix indent
Staging: cx25821: cx25821-core.c: Delete empty line
Staging: cx25821: cx25821-core.c: Fix indent
Staging: cx25821: cx25821-core.c: Change line endings
Staging: cx25821: cx25821-i2c.c: Change line endings
Staging: cx25821: cx25821-medusa-defines.h: Fix typo
Staging: cx25821: cx25821-medusa-defines.h: Line up defines
Staging: cx25821: cx25821-medusa-reg.h: Line up defines
Staging: cx25821: cx25821-medusa-video.c: Fix comment
Staging: cx25821: cx25821-medusa-video.c: Move operators
Staging: cx25821: cx25821-medusa-video.c: Change line endings
Staging: cx25821: cx25821-video-upstream-ch2.c: Line up comments
Staging: cx25821: cx25821-video-upstream-ch2.c: Fix indent
Staging: cx25821: cx25821-video-upsstream-ch2.c: Move operators
Staging: cx25821: cx25821-video-upstream-ch2.c: Remove braces
Staging: cx25821: cx25821-video-upstream-ch2.c: Change line endings
Staging: cx25821: cx25821-video-upstream.c: Remove braces
Staging: cx25821: cx25821-video-upstream.c: Fix indent
Staging: cx25821: cx25821-video-upstream.c: Change line endings
Staging: cx25821: cx25821-video.c: Delete empty line
Staging: cx25821: cx25821-video.c: Change spaces
Staging: cx25821: cx25821-video.c: Fix assignment
Staging: cx25821: cx25821-video.c: Fix definitions
Staging: cx25821: cx25821-video.c: Move operators
Staging: cx25821: cx25821-video.c: Fix indent
Staging: cx25821: cx25821-video.c: Change line endings
Staging: cx25821: cx25821.h: Line up definesdrivers/staging/cx25821/cx25821-alsa.c | 73 ++-- drivers/staging/cx25821/cx25821-audio-upstream.c | 102 ++-- drivers/staging/cx25821/cx25821-audio.h | 39 +- drivers/staging/cx25821/cx25821-cards.c | 2 +- drivers/staging/cx25821/cx25821-core.c | 57 +-- drivers/staging/cx25821/cx25821-i2c.c | 10 +- drivers/staging/cx25821/cx25821-medusa-defines.h | 6 +- drivers/staging/cx25821/cx25821-medusa-reg.h | 518 ++++++++++---------- drivers/staging/cx25821/cx25821-medusa-video.c | 410 ++++++---------- .../staging/cx25821/cx25821-video-upstream-ch2.c | 126 ++--- drivers/staging/cx25821/cx25821-video-upstream.c | 146 +++---- drivers/staging/cx25821/cx25821-video.c | 145 +++--- drivers/staging/cx25821/cx25821.h | 4 +- 13 files changed, 745 insertions(+), 893 deletions(-)
Conexant E-mail Firewall (Conexant.Com) made the following annotations
---------------------------------------------------------------------
********************** Legal Disclaimer ****************************
"This email may contain confidential and privileged material for the sole use of the intended recipient. Any unauthorized review, use or distribution by others is strictly prohibited. If you have received the message in error, please advise the sender by reply email and delete the message. Thank you."
**********************************************************************
---------------------------------------------------------------------
Quoted 3 lines · On Sat, 22 Oct 2011 05:50:14 -0700 "Palash Bandyopadhyay"…
Thanks Leonid!
Change in patch #18 is also ok.
Thank you for review.
Quoted 76 lines
Regards,
Palash________________________________________
From: Leonid V. Fedorenchik [[email protected]]
Sent: Friday, October 21, 2011 10:43 PM
To: Greg Kroah-Hartman
Cc: Mauro Carvalho Chehab; Namhyung Kim; Palash Bandyopadhyay; Joe Perches; Ilia Mirkin; Youquan Song; Leonid V. Fedorenchik; [email protected]; [email protected]
Subject: [PATCH 00/36] Staging: cx25821: Clean up patch seriesThis patch series fixes some style issues in
drivers/staging/cx25821Mostly I was hoping to improve readability and fix some issues found by checkpatch.pl script.There is one question, however, in patch no. 18:
I deleted part of the comment that contradicts to the code and in this case maybe I should edit the code to match the comment instead. I am not sure if in this case it makes sense to check if width > 0.Leonid V. Fedorenchik (36):
Staging: cx25821: cx25821-alsa.c: Line up comments Staging: cx25821: cx25821-alsa.c: Add braces to else clause Staging: cx25821: cx25821-alsa.c: Fix indent Staging: cx25821: cx25821-alsa.c: Change line endings Staging: cx25821: cx25821-audio-upstream.c: Fix indent Staging: cx25821: cx25821-audio-upstream.c: Move operators Staging: cx25821: cx25821-audio-upstream.c: Change line endings Staging: cx25821: cx25821-audio.h: Line up defines Staging: cx25821: cx25821-audio.h: Fix multiline defines Staging: cx25821: cx25821-cards.c: Fix indent Staging: cx25821: cx25821-core.c: Delete empty line Staging: cx25821: cx25821-core.c: Fix indent Staging: cx25821: cx25821-core.c: Change line endings Staging: cx25821: cx25821-i2c.c: Change line endings Staging: cx25821: cx25821-medusa-defines.h: Fix typo Staging: cx25821: cx25821-medusa-defines.h: Line up defines Staging: cx25821: cx25821-medusa-reg.h: Line up defines Staging: cx25821: cx25821-medusa-video.c: Fix comment Staging: cx25821: cx25821-medusa-video.c: Move operators Staging: cx25821: cx25821-medusa-video.c: Change line endings Staging: cx25821: cx25821-video-upstream-ch2.c: Line up comments Staging: cx25821: cx25821-video-upstream-ch2.c: Fix indent Staging: cx25821: cx25821-video-upsstream-ch2.c: Move operators Staging: cx25821: cx25821-video-upstream-ch2.c: Remove braces Staging: cx25821: cx25821-video-upstream-ch2.c: Change line endings Staging: cx25821: cx25821-video-upstream.c: Remove braces Staging: cx25821: cx25821-video-upstream.c: Fix indent Staging: cx25821: cx25821-video-upstream.c: Change line endings Staging: cx25821: cx25821-video.c: Delete empty line Staging: cx25821: cx25821-video.c: Change spaces Staging: cx25821: cx25821-video.c: Fix assignment Staging: cx25821: cx25821-video.c: Fix definitions Staging: cx25821: cx25821-video.c: Move operators Staging: cx25821: cx25821-video.c: Fix indent Staging: cx25821: cx25821-video.c: Change line endings Staging: cx25821: cx25821.h: Line up definesdrivers/staging/cx25821/cx25821-alsa.c | 73 ++-- drivers/staging/cx25821/cx25821-audio-upstream.c | 102 ++-- drivers/staging/cx25821/cx25821-audio.h | 39 +- drivers/staging/cx25821/cx25821-cards.c | 2 +- drivers/staging/cx25821/cx25821-core.c | 57 +-- drivers/staging/cx25821/cx25821-i2c.c | 10 +- drivers/staging/cx25821/cx25821-medusa-defines.h | 6 +- drivers/staging/cx25821/cx25821-medusa-reg.h | 518 ++++++++++---------- drivers/staging/cx25821/cx25821-medusa-video.c | 410 ++++++---------- .../staging/cx25821/cx25821-video-upstream-ch2.c | 126 ++--- drivers/staging/cx25821/cx25821-video-upstream.c | 146 +++---- drivers/staging/cx25821/cx25821-video.c | 145 +++--- drivers/staging/cx25821/cx25821.h | 4 +- 13 files changed, 745 insertions(+), 893 deletions(-)Conexant E-mail Firewall (Conexant.Com) made the following annotations
---------------------------------------------------------------------
********************** Legal Disclaimer ****************************
Quoted 6 lines
"This email may contain confidential and privileged material for the sole use of the intended recipient. Any unauthorized review, use or distribution by others is strictly prohibited. If you have received the message in error, please advise the sender by reply email and delete the message. Thank you."
**********************************************************************
---------------------------------------------------------------------
Leonid V. Fedorenchik