aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/common
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@brturbo.com.br>2005-12-12 03:37:27 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-12-12 11:57:44 -0500
commitafd1a0c9ac281eed3b22b293ccd92af7b0d60889 (patch)
tree686c03cf1a1a2efb1fba6dc6e682fbb48edc7c58 /drivers/media/common
parent808824b5f73e361503420ee318ca9689781da034 (diff)
[PATCH] V4L/DVB: (3086c) Whitespaces cleanups part 3
Clean up whitespaces at v4l/dvb files Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/media/common')
-rw-r--r--drivers/media/common/saa7146_core.c6
-rw-r--r--drivers/media/common/saa7146_fops.c32
-rw-r--r--drivers/media/common/saa7146_i2c.c16
-rw-r--r--drivers/media/common/saa7146_vbi.c4
-rw-r--r--drivers/media/common/saa7146_video.c46
5 files changed, 52 insertions, 52 deletions
diff --git a/drivers/media/common/saa7146_core.c b/drivers/media/common/saa7146_core.c
index 206cc2f61f26..2899d34e5f7e 100644
--- a/drivers/media/common/saa7146_core.c
+++ b/drivers/media/common/saa7146_core.c
@@ -174,8 +174,8 @@ void saa7146_pgtable_free(struct pci_dev *pci, struct saa7146_pgtable *pt)
174 174
175int saa7146_pgtable_alloc(struct pci_dev *pci, struct saa7146_pgtable *pt) 175int saa7146_pgtable_alloc(struct pci_dev *pci, struct saa7146_pgtable *pt)
176{ 176{
177 u32 *cpu; 177 u32 *cpu;
178 dma_addr_t dma_addr; 178 dma_addr_t dma_addr;
179 179
180 cpu = pci_alloc_consistent(pci, PAGE_SIZE, &dma_addr); 180 cpu = pci_alloc_consistent(pci, PAGE_SIZE, &dma_addr);
181 if (NULL == cpu) { 181 if (NULL == cpu) {
@@ -405,7 +405,7 @@ static int saa7146_init_one(struct pci_dev *pci, const struct pci_device_id *ent
405 405
406 pci_set_drvdata(pci, dev); 406 pci_set_drvdata(pci, dev);
407 407
408 init_MUTEX(&dev->lock); 408 init_MUTEX(&dev->lock);
409 spin_lock_init(&dev->int_slock); 409 spin_lock_init(&dev->int_slock);
410 spin_lock_init(&dev->slock); 410 spin_lock_init(&dev->slock);
411 411
diff --git a/drivers/media/common/saa7146_fops.c b/drivers/media/common/saa7146_fops.c
index 37888989ea2e..09ec964dec5c 100644
--- a/drivers/media/common/saa7146_fops.c
+++ b/drivers/media/common/saa7146_fops.c
@@ -1,6 +1,6 @@
1#include <media/saa7146_vv.h> 1#include <media/saa7146_vv.h>
2 2
3#define BOARD_CAN_DO_VBI(dev) (dev->revision != 0 && dev->vv_data->vbi_minor != -1) 3#define BOARD_CAN_DO_VBI(dev) (dev->revision != 0 && dev->vv_data->vbi_minor != -1)
4 4
5/****************************************************************************/ 5/****************************************************************************/
6/* resource management functions, shamelessly stolen from saa7134 driver */ 6/* resource management functions, shamelessly stolen from saa7134 driver */
@@ -102,9 +102,9 @@ void saa7146_buffer_finish(struct saa7146_dev *dev,
102 /* finish current buffer */ 102 /* finish current buffer */
103 if (NULL == q->curr) { 103 if (NULL == q->curr) {
104 DEB_D(("aiii. no current buffer\n")); 104 DEB_D(("aiii. no current buffer\n"));
105 return; 105 return;
106 } 106 }
107 107
108 q->curr->vb.state = state; 108 q->curr->vb.state = state;
109 do_gettimeofday(&q->curr->vb.ts); 109 do_gettimeofday(&q->curr->vb.ts);
110 wake_up(&q->curr->vb.done); 110 wake_up(&q->curr->vb.done);
@@ -143,13 +143,13 @@ void saa7146_buffer_next(struct saa7146_dev *dev,
143 // fixme: fix this for vflip != 0 143 // fixme: fix this for vflip != 0
144 144
145 saa7146_write(dev, PROT_ADDR1, 0); 145 saa7146_write(dev, PROT_ADDR1, 0);
146 saa7146_write(dev, MC2, (MASK_02|MASK_18)); 146 saa7146_write(dev, MC2, (MASK_02|MASK_18));
147 147
148 /* write the address of the rps-program */ 148 /* write the address of the rps-program */
149 saa7146_write(dev, RPS_ADDR0, dev->d_rps0.dma_handle); 149 saa7146_write(dev, RPS_ADDR0, dev->d_rps0.dma_handle);
150 /* turn on rps */ 150 /* turn on rps */
151 saa7146_write(dev, MC1, (MASK_12 | MASK_28)); 151 saa7146_write(dev, MC1, (MASK_12 | MASK_28));
152 152
153/* 153/*
154 printk("vdma%d.base_even: 0x%08x\n", 1,saa7146_read(dev,BASE_EVEN1)); 154 printk("vdma%d.base_even: 0x%08x\n", 1,saa7146_read(dev,BASE_EVEN1));
155 printk("vdma%d.base_odd: 0x%08x\n", 1,saa7146_read(dev,BASE_ODD1)); 155 printk("vdma%d.base_odd: 0x%08x\n", 1,saa7146_read(dev,BASE_ODD1));
@@ -246,7 +246,7 @@ static int fops_open(struct inode *inode, struct file *file)
246 goto out; 246 goto out;
247 } 247 }
248 memset(fh,0,sizeof(*fh)); 248 memset(fh,0,sizeof(*fh));
249 249
250 file->private_data = fh; 250 file->private_data = fh;
251 fh->dev = dev; 251 fh->dev = dev;
252 fh->type = type; 252 fh->type = type;
@@ -275,7 +275,7 @@ out:
275 file->private_data = NULL; 275 file->private_data = NULL;
276 } 276 }
277 up(&saa7146_devices_lock); 277 up(&saa7146_devices_lock);
278 return result; 278 return result;
279} 279}
280 280
281static int fops_release(struct inode *inode, struct file *file) 281static int fops_release(struct inode *inode, struct file *file)
@@ -405,7 +405,7 @@ static struct file_operations video_fops =
405static void vv_callback(struct saa7146_dev *dev, unsigned long status) 405static void vv_callback(struct saa7146_dev *dev, unsigned long status)
406{ 406{
407 u32 isr = status; 407 u32 isr = status;
408 408
409 DEB_INT(("dev:%p, isr:0x%08x\n",dev,(u32)status)); 409 DEB_INT(("dev:%p, isr:0x%08x\n",dev,(u32)status));
410 410
411 if (0 != (isr & (MASK_27))) { 411 if (0 != (isr & (MASK_27))) {
@@ -454,11 +454,11 @@ int saa7146_vv_init(struct saa7146_dev* dev, struct saa7146_ext_vv *ext_vv)
454 handle different devices that might need different 454 handle different devices that might need different
455 configuration data) */ 455 configuration data) */
456 dev->ext_vv_data = ext_vv; 456 dev->ext_vv_data = ext_vv;
457 457
458 vv->video_minor = -1; 458 vv->video_minor = -1;
459 vv->vbi_minor = -1; 459 vv->vbi_minor = -1;
460 460
461 vv->d_clipping.cpu_addr = pci_alloc_consistent(dev->pci, SAA7146_CLIPPING_MEM, &vv->d_clipping.dma_handle); 461 vv->d_clipping.cpu_addr = pci_alloc_consistent(dev->pci, SAA7146_CLIPPING_MEM, &vv->d_clipping.dma_handle);
462 if( NULL == vv->d_clipping.cpu_addr ) { 462 if( NULL == vv->d_clipping.cpu_addr ) {
463 ERR(("out of memory. aborting.\n")); 463 ERR(("out of memory. aborting.\n"));
464 kfree(vv); 464 kfree(vv);
@@ -468,7 +468,7 @@ int saa7146_vv_init(struct saa7146_dev* dev, struct saa7146_ext_vv *ext_vv)
468 468
469 saa7146_video_uops.init(dev,vv); 469 saa7146_video_uops.init(dev,vv);
470 saa7146_vbi_uops.init(dev,vv); 470 saa7146_vbi_uops.init(dev,vv);
471 471
472 dev->vv_data = vv; 472 dev->vv_data = vv;
473 dev->vv_callback = &vv_callback; 473 dev->vv_callback = &vv_callback;
474 474
@@ -480,12 +480,12 @@ int saa7146_vv_release(struct saa7146_dev* dev)
480 struct saa7146_vv *vv = dev->vv_data; 480 struct saa7146_vv *vv = dev->vv_data;
481 481
482 DEB_EE(("dev:%p\n",dev)); 482 DEB_EE(("dev:%p\n",dev));
483 483
484 pci_free_consistent(dev->pci, SAA7146_RPS_MEM, vv->d_clipping.cpu_addr, vv->d_clipping.dma_handle); 484 pci_free_consistent(dev->pci, SAA7146_RPS_MEM, vv->d_clipping.cpu_addr, vv->d_clipping.dma_handle);
485 kfree(vv); 485 kfree(vv);
486 dev->vv_data = NULL; 486 dev->vv_data = NULL;
487 dev->vv_callback = NULL; 487 dev->vv_callback = NULL;
488 488
489 return 0; 489 return 0;
490} 490}
491 491
@@ -498,7 +498,7 @@ int saa7146_register_device(struct video_device **vid, struct saa7146_dev* dev,
498 DEB_EE(("dev:%p, name:'%s', type:%d\n",dev,name,type)); 498 DEB_EE(("dev:%p, name:'%s', type:%d\n",dev,name,type));
499 499
500 // released by vfd->release 500 // released by vfd->release
501 vfd = video_device_alloc(); 501 vfd = video_device_alloc();
502 if (vfd == NULL) 502 if (vfd == NULL)
503 return -ENOMEM; 503 return -ENOMEM;
504 504
@@ -530,7 +530,7 @@ int saa7146_register_device(struct video_device **vid, struct saa7146_dev* dev,
530int saa7146_unregister_device(struct video_device **vid, struct saa7146_dev* dev) 530int saa7146_unregister_device(struct video_device **vid, struct saa7146_dev* dev)
531{ 531{
532 struct saa7146_vv *vv = dev->vv_data; 532 struct saa7146_vv *vv = dev->vv_data;
533 533
534 DEB_EE(("dev:%p\n",dev)); 534 DEB_EE(("dev:%p\n",dev));
535 535
536 if( VFL_TYPE_GRABBER == (*vid)->type ) { 536 if( VFL_TYPE_GRABBER == (*vid)->type ) {
diff --git a/drivers/media/common/saa7146_i2c.c b/drivers/media/common/saa7146_i2c.c
index fec6beab8c28..8aabdd8fb3c5 100644
--- a/drivers/media/common/saa7146_i2c.c
+++ b/drivers/media/common/saa7146_i2c.c
@@ -276,8 +276,8 @@ int saa7146_i2c_transfer(struct saa7146_dev *dev, const struct i2c_msg *msgs, in
276 int i = 0, count = 0; 276 int i = 0, count = 0;
277 u32* buffer = dev->d_i2c.cpu_addr; 277 u32* buffer = dev->d_i2c.cpu_addr;
278 int err = 0; 278 int err = 0;
279 int address_err = 0; 279 int address_err = 0;
280 int short_delay = 0; 280 int short_delay = 0;
281 281
282 if (down_interruptible (&dev->i2c_lock)) 282 if (down_interruptible (&dev->i2c_lock))
283 return -ERESTARTSYS; 283 return -ERESTARTSYS;
@@ -325,7 +325,7 @@ int saa7146_i2c_transfer(struct saa7146_dev *dev, const struct i2c_msg *msgs, in
325 if( 0 != (SAA7146_USE_I2C_IRQ & dev->ext->flags)) { 325 if( 0 != (SAA7146_USE_I2C_IRQ & dev->ext->flags)) {
326 goto out; 326 goto out;
327 } 327 }
328 address_err++; 328 address_err++;
329 } 329 }
330 DEB_I2C(("error while sending message(s). starting again.\n")); 330 DEB_I2C(("error while sending message(s). starting again.\n"));
331 break; 331 break;
@@ -336,14 +336,14 @@ int saa7146_i2c_transfer(struct saa7146_dev *dev, const struct i2c_msg *msgs, in
336 break; 336 break;
337 } 337 }
338 338
339 /* delay a bit before retrying */ 339 /* delay a bit before retrying */
340 msleep(10); 340 msleep(10);
341 341
342 } while (err != num && retries--); 342 } while (err != num && retries--);
343 343
344 /* if every retry had an address error, exit right away */ 344 /* if every retry had an address error, exit right away */
345 if (address_err == retries) { 345 if (address_err == retries) {
346 goto out; 346 goto out;
347 } 347 }
348 348
349 /* if any things had to be read, get the results */ 349 /* if any things had to be read, get the results */
diff --git a/drivers/media/common/saa7146_vbi.c b/drivers/media/common/saa7146_vbi.c
index cb86a97fda1f..063986ec16b5 100644
--- a/drivers/media/common/saa7146_vbi.c
+++ b/drivers/media/common/saa7146_vbi.c
@@ -6,8 +6,8 @@ static int vbi_workaround(struct saa7146_dev *dev)
6{ 6{
7 struct saa7146_vv *vv = dev->vv_data; 7 struct saa7146_vv *vv = dev->vv_data;
8 8
9 u32 *cpu; 9 u32 *cpu;
10 dma_addr_t dma_addr; 10 dma_addr_t dma_addr;
11 11
12 int count = 0; 12 int count = 0;
13 int i; 13 int i;
diff --git a/drivers/media/common/saa7146_video.c b/drivers/media/common/saa7146_video.c
index 8dd4d15ca36d..1d961023b837 100644
--- a/drivers/media/common/saa7146_video.c
+++ b/drivers/media/common/saa7146_video.c
@@ -150,23 +150,23 @@ static int try_win(struct saa7146_dev *dev, struct v4l2_window *win)
150 maxh = vv->standard->v_max_out; 150 maxh = vv->standard->v_max_out;
151 151
152 if (V4L2_FIELD_ANY == field) { 152 if (V4L2_FIELD_ANY == field) {
153 field = (win->w.height > maxh/2) 153 field = (win->w.height > maxh/2)
154 ? V4L2_FIELD_INTERLACED 154 ? V4L2_FIELD_INTERLACED
155 : V4L2_FIELD_TOP; 155 : V4L2_FIELD_TOP;
156 } 156 }
157 switch (field) { 157 switch (field) {
158 case V4L2_FIELD_TOP: 158 case V4L2_FIELD_TOP:
159 case V4L2_FIELD_BOTTOM: 159 case V4L2_FIELD_BOTTOM:
160 case V4L2_FIELD_ALTERNATE: 160 case V4L2_FIELD_ALTERNATE:
161 maxh = maxh / 2; 161 maxh = maxh / 2;
162 break; 162 break;
163 case V4L2_FIELD_INTERLACED: 163 case V4L2_FIELD_INTERLACED:
164 break; 164 break;
165 default: { 165 default: {
166 DEB_D(("no known field mode '%d'.\n",field)); 166 DEB_D(("no known field mode '%d'.\n",field));
167 return -EINVAL; 167 return -EINVAL;
168 }
168 } 169 }
169 }
170 170
171 win->field = field; 171 win->field = field;
172 if (win->w.width > maxw) 172 if (win->w.width > maxw)
@@ -887,7 +887,7 @@ int saa7146_video_do_ioctl(struct inode *inode, struct file *file, unsigned int
887 887
888 DEB_EE(("VIDIOC_QUERYCAP\n")); 888 DEB_EE(("VIDIOC_QUERYCAP\n"));
889 889
890 strcpy(cap->driver, "saa7146 v4l2"); 890 strcpy(cap->driver, "saa7146 v4l2");
891 strlcpy(cap->card, dev->ext->name, sizeof(cap->card)); 891 strlcpy(cap->card, dev->ext->name, sizeof(cap->card));
892 sprintf(cap->bus_info,"PCI:%s", pci_name(dev->pci)); 892 sprintf(cap->bus_info,"PCI:%s", pci_name(dev->pci));
893 cap->version = SAA7146_VERSION_CODE; 893 cap->version = SAA7146_VERSION_CODE;
@@ -1011,19 +1011,19 @@ int saa7146_video_do_ioctl(struct inode *inode, struct file *file, unsigned int
1011 err = set_control(fh,arg); 1011 err = set_control(fh,arg);
1012 return err; 1012 return err;
1013 } 1013 }
1014 case VIDIOC_G_PARM: 1014 case VIDIOC_G_PARM:
1015 { 1015 {
1016 struct v4l2_streamparm *parm = arg; 1016 struct v4l2_streamparm *parm = arg;
1017 if( parm->type != V4L2_BUF_TYPE_VIDEO_CAPTURE ) { 1017 if( parm->type != V4L2_BUF_TYPE_VIDEO_CAPTURE ) {
1018 return -EINVAL; 1018 return -EINVAL;
1019 } 1019 }
1020 memset(&parm->parm.capture,0,sizeof(struct v4l2_captureparm)); 1020 memset(&parm->parm.capture,0,sizeof(struct v4l2_captureparm));
1021 parm->parm.capture.readbuffers = 1; 1021 parm->parm.capture.readbuffers = 1;
1022 // fixme: only for PAL! 1022 // fixme: only for PAL!
1023 parm->parm.capture.timeperframe.numerator = 1; 1023 parm->parm.capture.timeperframe.numerator = 1;
1024 parm->parm.capture.timeperframe.denominator = 25; 1024 parm->parm.capture.timeperframe.denominator = 25;
1025 return 0; 1025 return 0;
1026 } 1026 }
1027 case VIDIOC_G_FMT: 1027 case VIDIOC_G_FMT:
1028 { 1028 {
1029 struct v4l2_format *f = arg; 1029 struct v4l2_format *f = arg;
@@ -1383,7 +1383,7 @@ static struct videobuf_queue_ops video_qops = {
1383 1383
1384static void video_init(struct saa7146_dev *dev, struct saa7146_vv *vv) 1384static void video_init(struct saa7146_dev *dev, struct saa7146_vv *vv)
1385{ 1385{
1386 INIT_LIST_HEAD(&vv->video_q.queue); 1386 INIT_LIST_HEAD(&vv->video_q.queue);
1387 1387
1388 init_timer(&vv->video_q.timeout); 1388 init_timer(&vv->video_q.timeout);
1389 vv->video_q.timeout.function = saa7146_buffer_timeout; 1389 vv->video_q.timeout.function = saa7146_buffer_timeout;