Browse Source

V4L/DVB: cx25821: Fix bad whitespacing

Should use tabs for identation, and not whitespace

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Mauro Carvalho Chehab 15 years ago
parent
commit
3e9442c6f1

+ 4 - 4
drivers/staging/cx25821/Makefile

@@ -1,8 +1,8 @@
 cx25821-objs   := cx25821-core.o cx25821-cards.o cx25821-i2c.o \
-                       cx25821-gpio.o cx25821-medusa-video.o \
-                       cx25821-video.o cx25821-video-upstream.o \
-                       cx25821-video-upstream-ch2.o \
-                       cx25821-audio-upstream.o
+		       cx25821-gpio.o cx25821-medusa-video.o \
+		       cx25821-video.o cx25821-video-upstream.o \
+		       cx25821-video-upstream-ch2.o \
+		       cx25821-audio-upstream.o
 
 obj-$(CONFIG_VIDEO_CX25821) += cx25821.o
 obj-$(CONFIG_VIDEO_CX25821_ALSA) += cx25821-alsa.o

+ 6 - 6
drivers/staging/cx25821/cx25821-audio-upstream.c

@@ -106,7 +106,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_select].sram_channels;
+	   dev->channels[dev->_audio_upstream_channel_select].sram_channels;
 	int offset = 0;
 
 	/* scan lines */
@@ -217,7 +217,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) {
@@ -353,9 +353,9 @@ static void cx25821_audioups_handler(struct work_struct *work)
 	}
 
 	cx25821_get_audio_data(dev,
-                              dev->channels[dev->
-                                       _audio_upstream_channel_select].
-                                       sram_channels);
+			      dev->channels[dev->
+				       _audio_upstream_channel_select].
+				       sram_channels);
 }
 
 int cx25821_openfile_audio(struct cx25821_dev *dev,
@@ -609,7 +609,7 @@ static irqreturn_t cx25821_upstream_irq_audio(int irq, void *dev_id)
 		return -1;
 
        sram_ch = dev->channels[dev->_audio_upstream_channel_select].
-                                       sram_channels;
+				       sram_channels;
 
 	msk_stat = cx_read(sram_ch->int_mstat);
 	audio_status = cx_read(sram_ch->int_stat);

+ 24 - 24
drivers/staging/cx25821/cx25821-core.c

@@ -781,14 +781,14 @@ static void cx25821_shutdown(struct cx25821_dev *dev)
 
 	/* Disable Video A/B activity */
 	for (i = 0; i < VID_CHANNEL_NUM; i++) {
-               cx_write(dev->channels[i].sram_channels->dma_ctl, 0);
-               cx_write(dev->channels[i].sram_channels->int_msk, 0);
+	       cx_write(dev->channels[i].sram_channels->dma_ctl, 0);
+	       cx_write(dev->channels[i].sram_channels->int_msk, 0);
 	}
 
 	for (i = VID_UPSTREAM_SRAM_CHANNEL_I; i <= VID_UPSTREAM_SRAM_CHANNEL_J;
 	     i++) {
-               cx_write(dev->channels[i].sram_channels->dma_ctl, 0);
-               cx_write(dev->channels[i].sram_channels->int_msk, 0);
+	       cx_write(dev->channels[i].sram_channels->dma_ctl, 0);
+	       cx_write(dev->channels[i].sram_channels->int_msk, 0);
 	}
 
 	/* Disable Audio activity */
@@ -806,9 +806,9 @@ 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);
-               dev->channels[channel_select].pixel_formats = format;
+	       cx_write(dev->channels[channel_select].
+			       sram_channels->pix_frmt, format);
+	       dev->channels[channel_select].pixel_formats = format;
 	}
 }
 
@@ -829,7 +829,7 @@ static void cx25821_initialize(struct cx25821_dev *dev)
 	cx_write(PCI_INT_STAT, 0xffffffff);
 
 	for (i = 0; i < VID_CHANNEL_NUM; i++)
-               cx_write(dev->channels[i].sram_channels->int_stat, 0xffffffff);
+	       cx_write(dev->channels[i].sram_channels->int_stat, 0xffffffff);
 
 	cx_write(AUD_A_INT_STAT, 0xffffffff);
 	cx_write(AUD_B_INT_STAT, 0xffffffff);
@@ -843,22 +843,22 @@ static void cx25821_initialize(struct cx25821_dev *dev)
 	mdelay(100);
 
 	for (i = 0; i < VID_CHANNEL_NUM; i++) {
-               cx25821_set_vip_mode(dev, dev->channels[i].sram_channels);
-               cx25821_sram_channel_setup(dev, dev->channels[i].sram_channels,
-                                               1440, 0);
-               dev->channels[i].pixel_formats = PIXEL_FRMT_422;
-               dev->channels[i].use_cif_resolution = FALSE;
+	       cx25821_set_vip_mode(dev, dev->channels[i].sram_channels);
+	       cx25821_sram_channel_setup(dev, dev->channels[i].sram_channels,
+					       1440, 0);
+	       dev->channels[i].pixel_formats = PIXEL_FRMT_422;
+	       dev->channels[i].use_cif_resolution = FALSE;
 	}
 
 	/* Probably only affect Downstream */
 	for (i = VID_UPSTREAM_SRAM_CHANNEL_I; i <= VID_UPSTREAM_SRAM_CHANNEL_J;
 	     i++) {
-               cx25821_set_vip_mode(dev, dev->channels[i].sram_channels);
+	       cx25821_set_vip_mode(dev, dev->channels[i].sram_channels);
 	}
 
        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);
 }
@@ -932,7 +932,7 @@ static int cx25821_dev_setup(struct cx25821_dev *dev)
 	/* Apply a sensible clock frequency for the PCIe bridge */
 	dev->clk_freq = 28000000;
        for (i = 0; i < MAX_VID_CHANNEL_NUM; i++)
-               dev->channels[i].sram_channels = &cx25821_sram_channels[i];
+	       dev->channels[i].sram_channels = &cx25821_sram_channels[i];
 
 	if (dev->nr > 1)
 		CX25821_INFO("dev->nr > 1!");
@@ -1004,22 +1004,22 @@ static int cx25821_dev_setup(struct cx25821_dev *dev)
 	cx25821_card_setup(dev);
 
        if (medusa_video_init(dev) < 0)
-               CX25821_ERR("%s() Failed to initialize medusa!\n"
-               , __func__);
+	       CX25821_ERR("%s() Failed to initialize medusa!\n"
+	       , __func__);
 
        cx25821_video_register(dev);
 
 	/* register IOCTL device */
 	dev->ioctl_dev =
-           cx25821_vdev_init(dev, dev->pci, &cx25821_videoioctl_template,
+	   cx25821_vdev_init(dev, dev->pci, &cx25821_videoioctl_template,
 			      "video");
 
 	if (video_register_device
 	    (dev->ioctl_dev, VFL_TYPE_GRABBER, VIDEO_IOCTL_CH) < 0) {
 		cx25821_videoioctl_unregister(dev);
 		printk(KERN_ERR
-                   "%s() Failed to register video adapter for IOCTL, so \
-                   unregistering videoioctl device.\n", __func__);
+		   "%s() Failed to register video adapter for IOCTL, so \
+		   unregistering videoioctl device.\n", __func__);
 	}
 
 	cx25821_dev_checkrevision(dev);
@@ -1342,8 +1342,8 @@ static irqreturn_t cx25821_irq(int irq, void *dev_id)
 
 	for (i = 0; i < VID_CHANNEL_NUM; i++) {
 		if (pci_status & mask[i]) {
-                       vid_status = cx_read(dev->channels[i].
-                               sram_channels->int_stat);
+		       vid_status = cx_read(dev->channels[i].
+			       sram_channels->int_stat);
 
 			if (vid_status)
 				handled +=

+ 2 - 2
drivers/staging/cx25821/cx25821-medusa-video.c

@@ -830,8 +830,8 @@ int medusa_video_init(struct cx25821_dev *dev)
 	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);
+	   cx25821_i2c_write(&dev->i2c_bus[0], AFE_AB_DIAG_CTRL,
+			     value | 0x10000000);
 
 	if (ret_val < 0)
 		goto error;

+ 28 - 28
drivers/staging/cx25821/cx25821-video-upstream-ch2.c

@@ -84,7 +84,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 */
@@ -110,11 +110,11 @@ static __le32 *cx25821_risc_field_upstream_ch2(struct cx25821_dev *dev,
 			offset += dist_betwn_starts;
 		}
 
-               /*
-                 check if we need to enable the FIFO after the first 4 lines
-                  For the upstream video channel, the risc engine will enable
-                  the FIFO.
-               */
+	       /*
+		 check if we need to enable the FIFO after the first 4 lines
+		  For the upstream video channel, the risc engine will enable
+		  the FIFO.
+	       */
 		if (fifo_enable && line == 3) {
 			*(rp++) = RISC_WRITECR;
 			*(rp++) = sram_ch->dma_ctl;
@@ -177,7 +177,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 +
@@ -195,10 +195,10 @@ int cx25821_risc_buffer_upstream_ch2(struct cx25821_dev *dev,
 			risc_phys_jump_addr = dev->_dma_phys_start_addr_ch2;
 		}
 
-               /*
-                  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);
@@ -210,7 +210,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) {
@@ -377,8 +377,8 @@ static void cx25821_vidups_handler_ch2(struct work_struct *work)
 	}
 
 	cx25821_get_frame_ch2(dev,
-                             dev->channels[dev->
-                               _channel2_upstream_select].sram_channels);
+			     dev->channels[dev->
+			       _channel2_upstream_select].sram_channels);
 }
 
 int cx25821_openfile_ch2(struct cx25821_dev *dev, struct sram_channel *sram_ch)
@@ -550,13 +550,13 @@ int cx25821_video_upstream_irq_ch2(struct cx25821_dev *dev, int chan_num,
 	__le32 *rp;
 
 	if (status & FLD_VID_SRC_RISC1) {
-               /* We should only process one program per call */
+	       /* We should only process one program per call */
 		u32 prog_cnt = cx_read(channel->gpcnt);
 
-               /*
-                  Since we've identified our IRQ, clear our bits from the
-                  interrupt mask and interrupt status registers
-               */
+	       /*
+		  Since we've identified our IRQ, clear our bits from the
+		  interrupt mask and interrupt status registers
+	       */
 		int_msk_tmp = cx_read(channel->int_msk);
 		cx_write(channel->int_msk, int_msk_tmp & ~_intr_msk);
 		cx_write(channel->int_stat, _intr_msk);
@@ -597,7 +597,7 @@ int cx25821_video_upstream_irq_ch2(struct cx25821_dev *dev, int chan_num,
 								    FIFO_DISABLE,
 								    ODD_FIELD);
 
-                               /* Jump to Even Risc program of 1st Frame */
+			       /* Jump to Even Risc program of 1st Frame */
 				*(rp++) = cpu_to_le32(RISC_JUMP);
 				*(rp++) = cpu_to_le32(risc_phys_jump_addr);
 				*(rp++) = cpu_to_le32(0);
@@ -668,8 +668,8 @@ static void cx25821_set_pixelengine_ch2(struct cx25821_dev *dev,
 	cx_write(ch->vid_fmt_ctl, value);
 
        /*
-          set number of active pixels in each line. Default is 720
-          pixels in both NTSC and PAL format
+	  set number of active pixels in each line. Default is 720
+	  pixels in both NTSC and PAL format
        */
 	cx_write(ch->vid_active_ctl1, width);
 
@@ -695,15 +695,15 @@ int cx25821_start_video_dma_upstream_ch2(struct cx25821_dev *dev,
 	int err = 0;
 
        /*
-          656/VIP SRC Upstream Channel I & J and 7 - Host Bus Interface
-          for channel A-C
+	  656/VIP SRC Upstream Channel I & J and 7 - Host Bus Interface
+	  for channel A-C
        */
 	tmp = cx_read(VID_CH_MODE_SEL);
 	cx_write(VID_CH_MODE_SEL, tmp | 0x1B0001FF);
 
        /*
-          Set the physical start address of the RISC program in the initial
-          program counter(IPC) member of the cmds.
+	  Set the physical start address of the RISC program in the initial
+	  program counter(IPC) member of the cmds.
        */
 	cx_write(sram_ch->cmds_start + 0, dev->_dma_phys_addr_ch2);
        cx_write(sram_ch->cmds_start + 4, 0); /* Risc IPC High 64 bits 63-32 */
@@ -770,8 +770,8 @@ int cx25821_vidupstream_init_ch2(struct cx25821_dev *dev, int channel_select,
 		return -ENOMEM;
 	}
        /*
-          656/VIP SRC Upstream Channel I & J and 7 -
-          Host Bus Interface for channel A-C
+	  656/VIP SRC Upstream Channel I & J and 7 -
+	  Host Bus Interface for channel A-C
        */
 	tmp = cx_read(VID_CH_MODE_SEL);
 	cx_write(VID_CH_MODE_SEL, tmp | 0x1B0001FF);

+ 39 - 39
drivers/staging/cx25821/cx25821-video-upstream.c

@@ -134,7 +134,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 */
@@ -253,7 +253,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) {
@@ -346,23 +346,23 @@ int cx25821_get_frame(struct cx25821_dev *dev, struct sram_channel *sram_ch)
 
 	if (IS_ERR(myfile)) {
 		const int open_errno = -PTR_ERR(myfile);
-               printk(KERN_ERR
-                   "%s(): ERROR opening file(%s) with errno = %d!\n",
-                   __func__, dev->_filename, open_errno);
+	       printk(KERN_ERR
+		   "%s(): ERROR opening file(%s) with errno = %d!\n",
+		   __func__, dev->_filename, open_errno);
 		return PTR_ERR(myfile);
 	} else {
 		if (!(myfile->f_op)) {
-                       printk(KERN_ERR
-                           "%s: File has no file operations registered!",
-                           __func__);
+		       printk(KERN_ERR
+			   "%s: File has no file operations registered!",
+			   __func__);
 			filp_close(myfile, NULL);
 			return -EIO;
 		}
 
 		if (!myfile->f_op->read) {
-                       printk(KERN_ERR
-                           "%s: File has no READ operations registered!",
-                           __func__);
+		       printk(KERN_ERR
+			   "%s: File has no READ operations registered!",
+			   __func__);
 			filp_close(myfile, NULL);
 			return -EIO;
 		}
@@ -389,8 +389,8 @@ int cx25821_get_frame(struct cx25821_dev *dev, struct sram_channel *sram_ch)
 
 			if (vfs_read_retval < line_size) {
 				printk(KERN_INFO
-                                      "Done: exit %s() since no more bytes to \
-                                      read from Video file.\n",
+				      "Done: exit %s() since no more bytes to \
+				      read from Video file.\n",
 				       __func__);
 				break;
 			}
@@ -415,15 +415,15 @@ static void cx25821_vidups_handler(struct work_struct *work)
 	    container_of(work, struct cx25821_dev, _irq_work_entry);
 
 	if (!dev) {
-               printk(KERN_ERR
-                   "ERROR %s(): since container_of(work_struct) FAILED!\n",
-                   __func__);
+	       printk(KERN_ERR
+		   "ERROR %s(): since container_of(work_struct) FAILED!\n",
+		   __func__);
 		return;
 	}
 
 	cx25821_get_frame(dev,
-                         dev->channels[dev->_channel_upstream_select].
-                                               sram_channels);
+			 dev->channels[dev->_channel_upstream_select].
+					       sram_channels);
 }
 
 int cx25821_openfile(struct cx25821_dev *dev, struct sram_channel *sram_ch)
@@ -443,22 +443,22 @@ int cx25821_openfile(struct cx25821_dev *dev, struct sram_channel *sram_ch)
 
 	if (IS_ERR(myfile)) {
 		const int open_errno = -PTR_ERR(myfile);
-               printk(KERN_ERR  "%s(): ERROR opening file(%s) with errno = %d!\n",
+	       printk(KERN_ERR  "%s(): ERROR opening file(%s) with errno = %d!\n",
 		       __func__, dev->_filename, open_errno);
 		return PTR_ERR(myfile);
 	} else {
 		if (!(myfile->f_op)) {
-                       printk(KERN_ERR
-                           "%s: File has no file operations registered!",
-                           __func__);
+		       printk(KERN_ERR
+			   "%s: File has no file operations registered!",
+			   __func__);
 			filp_close(myfile, NULL);
 			return -EIO;
 		}
 
 		if (!myfile->f_op->read) {
-                       printk(KERN_ERR
-                           "%s: File has no READ operations registered!  \
-                           Returning.",
+		       printk(KERN_ERR
+			   "%s: File has no READ operations registered!  \
+			   Returning.",
 			     __func__);
 			filp_close(myfile, NULL);
 			return -EIO;
@@ -488,8 +488,8 @@ int cx25821_openfile(struct cx25821_dev *dev, struct sram_channel *sram_ch)
 
 				if (vfs_read_retval < line_size) {
 					printk(KERN_INFO
-                                            "Done: exit %s() since no more \
-                                            bytes to read from Video file.\n",
+					    "Done: exit %s() since no more \
+					    bytes to read from Video file.\n",
 					       __func__);
 					break;
 				}
@@ -535,8 +535,8 @@ int cx25821_upstream_buffer_prepare(struct cx25821_dev *dev,
 
 	if (!dev->_dma_virt_addr) {
 		printk
-                   (KERN_ERR "cx25821: FAILED to allocate memory for Risc \
-                   buffer! Returning.\n");
+		   (KERN_ERR "cx25821: FAILED to allocate memory for Risc \
+		   buffer! Returning.\n");
 		return -ENOMEM;
 	}
 
@@ -557,8 +557,8 @@ int cx25821_upstream_buffer_prepare(struct cx25821_dev *dev,
 
 	if (!dev->_data_buf_virt_addr) {
 		printk
-                   (KERN_ERR "cx25821: FAILED to allocate memory for data \
-                   buffer! Returning.\n");
+		   (KERN_ERR "cx25821: FAILED to allocate memory for data \
+		   buffer! Returning.\n");
 		return -ENOMEM;
 	}
 
@@ -653,16 +653,16 @@ int cx25821_video_upstream_irq(struct cx25821_dev *dev, int chan_num,
 	} else {
 		if (status & FLD_VID_SRC_UF)
 			printk
-                           (KERN_ERR "%s: Video Received Underflow Error \
-                           Interrupt!\n", __func__);
+			   (KERN_ERR "%s: Video Received Underflow Error \
+			   Interrupt!\n", __func__);
 
 		if (status & FLD_VID_SRC_SYNC)
-                       printk(KERN_ERR "%s: Video Received Sync Error \
-                       Interrupt!\n", __func__);
+		       printk(KERN_ERR "%s: Video Received Sync Error \
+		       Interrupt!\n", __func__);
 
 		if (status & FLD_VID_SRC_OPC_ERR)
-                       printk(KERN_ERR "%s: Video Received OpCode Error \
-                       Interrupt!\n", __func__);
+		       printk(KERN_ERR "%s: Video Received OpCode Error \
+		       Interrupt!\n", __func__);
 	}
 
 	if (dev->_file_status == END_OF_FILE) {
@@ -818,8 +818,8 @@ int cx25821_vidupstream_init_ch1(struct cx25821_dev *dev, int channel_select,
 
 	if (!dev->_irq_queues) {
 		printk
-                   (KERN_ERR "cx25821: create_singlethread_workqueue() for \
-                   Video FAILED!\n");
+		   (KERN_ERR "cx25821: create_singlethread_workqueue() for \
+		   Video FAILED!\n");
 		return -ENOMEM;
 	}
 	/* 656/VIP SRC Upstream Channel I & J and 7 - Host Bus Interface for

File diff suppressed because it is too large
+ 309 - 309
drivers/staging/cx25821/cx25821-video.c


Some files were not shown because too many files changed in this diff