Skip to content

Commit

Permalink
[PATCH] V4L/DVB: (3086c) Whitespaces cleanups part 3
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mauro Carvalho Chehab authored and Linus Torvalds committed Dec 12, 2005
1 parent 808824b commit afd1a0c
Show file tree
Hide file tree
Showing 35 changed files with 817 additions and 817 deletions.
6 changes: 3 additions & 3 deletions drivers/media/common/saa7146_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@ void saa7146_pgtable_free(struct pci_dev *pci, struct saa7146_pgtable *pt)

int saa7146_pgtable_alloc(struct pci_dev *pci, struct saa7146_pgtable *pt)
{
u32 *cpu;
dma_addr_t dma_addr;
u32 *cpu;
dma_addr_t dma_addr;

cpu = pci_alloc_consistent(pci, PAGE_SIZE, &dma_addr);
if (NULL == cpu) {
Expand Down Expand Up @@ -405,7 +405,7 @@ static int saa7146_init_one(struct pci_dev *pci, const struct pci_device_id *ent

pci_set_drvdata(pci, dev);

init_MUTEX(&dev->lock);
init_MUTEX(&dev->lock);
spin_lock_init(&dev->int_slock);
spin_lock_init(&dev->slock);

Expand Down
32 changes: 16 additions & 16 deletions drivers/media/common/saa7146_fops.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <media/saa7146_vv.h>

#define BOARD_CAN_DO_VBI(dev) (dev->revision != 0 && dev->vv_data->vbi_minor != -1)
#define BOARD_CAN_DO_VBI(dev) (dev->revision != 0 && dev->vv_data->vbi_minor != -1)

/****************************************************************************/
/* resource management functions, shamelessly stolen from saa7134 driver */
Expand Down Expand Up @@ -102,9 +102,9 @@ void saa7146_buffer_finish(struct saa7146_dev *dev,
/* finish current buffer */
if (NULL == q->curr) {
DEB_D(("aiii. no current buffer\n"));
return;
return;
}

q->curr->vb.state = state;
do_gettimeofday(&q->curr->vb.ts);
wake_up(&q->curr->vb.done);
Expand Down Expand Up @@ -143,13 +143,13 @@ void saa7146_buffer_next(struct saa7146_dev *dev,
// fixme: fix this for vflip != 0

saa7146_write(dev, PROT_ADDR1, 0);
saa7146_write(dev, MC2, (MASK_02|MASK_18));
saa7146_write(dev, MC2, (MASK_02|MASK_18));

/* write the address of the rps-program */
saa7146_write(dev, RPS_ADDR0, dev->d_rps0.dma_handle);
/* turn on rps */
saa7146_write(dev, MC1, (MASK_12 | MASK_28));

/*
printk("vdma%d.base_even: 0x%08x\n", 1,saa7146_read(dev,BASE_EVEN1));
printk("vdma%d.base_odd: 0x%08x\n", 1,saa7146_read(dev,BASE_ODD1));
Expand Down Expand Up @@ -246,7 +246,7 @@ static int fops_open(struct inode *inode, struct file *file)
goto out;
}
memset(fh,0,sizeof(*fh));

file->private_data = fh;
fh->dev = dev;
fh->type = type;
Expand Down Expand Up @@ -275,7 +275,7 @@ static int fops_open(struct inode *inode, struct file *file)
file->private_data = NULL;
}
up(&saa7146_devices_lock);
return result;
return result;
}

static int fops_release(struct inode *inode, struct file *file)
Expand Down Expand Up @@ -405,7 +405,7 @@ static struct file_operations video_fops =
static void vv_callback(struct saa7146_dev *dev, unsigned long status)
{
u32 isr = status;

DEB_INT(("dev:%p, isr:0x%08x\n",dev,(u32)status));

if (0 != (isr & (MASK_27))) {
Expand Down Expand Up @@ -454,11 +454,11 @@ int saa7146_vv_init(struct saa7146_dev* dev, struct saa7146_ext_vv *ext_vv)
handle different devices that might need different
configuration data) */
dev->ext_vv_data = ext_vv;

vv->video_minor = -1;
vv->vbi_minor = -1;

vv->d_clipping.cpu_addr = pci_alloc_consistent(dev->pci, SAA7146_CLIPPING_MEM, &vv->d_clipping.dma_handle);
vv->d_clipping.cpu_addr = pci_alloc_consistent(dev->pci, SAA7146_CLIPPING_MEM, &vv->d_clipping.dma_handle);
if( NULL == vv->d_clipping.cpu_addr ) {
ERR(("out of memory. aborting.\n"));
kfree(vv);
Expand All @@ -468,7 +468,7 @@ int saa7146_vv_init(struct saa7146_dev* dev, struct saa7146_ext_vv *ext_vv)

saa7146_video_uops.init(dev,vv);
saa7146_vbi_uops.init(dev,vv);

dev->vv_data = vv;
dev->vv_callback = &vv_callback;

Expand All @@ -480,12 +480,12 @@ int saa7146_vv_release(struct saa7146_dev* dev)
struct saa7146_vv *vv = dev->vv_data;

DEB_EE(("dev:%p\n",dev));

pci_free_consistent(dev->pci, SAA7146_RPS_MEM, vv->d_clipping.cpu_addr, vv->d_clipping.dma_handle);
kfree(vv);
kfree(vv);
dev->vv_data = NULL;
dev->vv_callback = NULL;

return 0;
}

Expand All @@ -498,7 +498,7 @@ int saa7146_register_device(struct video_device **vid, struct saa7146_dev* dev,
DEB_EE(("dev:%p, name:'%s', type:%d\n",dev,name,type));

// released by vfd->release
vfd = video_device_alloc();
vfd = video_device_alloc();
if (vfd == NULL)
return -ENOMEM;

Expand Down Expand Up @@ -530,7 +530,7 @@ int saa7146_register_device(struct video_device **vid, struct saa7146_dev* dev,
int saa7146_unregister_device(struct video_device **vid, struct saa7146_dev* dev)
{
struct saa7146_vv *vv = dev->vv_data;

DEB_EE(("dev:%p\n",dev));

if( VFL_TYPE_GRABBER == (*vid)->type ) {
Expand Down
16 changes: 8 additions & 8 deletions drivers/media/common/saa7146_i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,8 @@ int saa7146_i2c_transfer(struct saa7146_dev *dev, const struct i2c_msg *msgs, in
int i = 0, count = 0;
u32* buffer = dev->d_i2c.cpu_addr;
int err = 0;
int address_err = 0;
int short_delay = 0;
int address_err = 0;
int short_delay = 0;

if (down_interruptible (&dev->i2c_lock))
return -ERESTARTSYS;
Expand Down Expand Up @@ -325,7 +325,7 @@ int saa7146_i2c_transfer(struct saa7146_dev *dev, const struct i2c_msg *msgs, in
if( 0 != (SAA7146_USE_I2C_IRQ & dev->ext->flags)) {
goto out;
}
address_err++;
address_err++;
}
DEB_I2C(("error while sending message(s). starting again.\n"));
break;
Expand All @@ -336,14 +336,14 @@ int saa7146_i2c_transfer(struct saa7146_dev *dev, const struct i2c_msg *msgs, in
break;
}

/* delay a bit before retrying */
msleep(10);
/* delay a bit before retrying */
msleep(10);

} while (err != num && retries--);

/* if every retry had an address error, exit right away */
if (address_err == retries) {
goto out;
/* if every retry had an address error, exit right away */
if (address_err == retries) {
goto out;
}

/* if any things had to be read, get the results */
Expand Down
4 changes: 2 additions & 2 deletions drivers/media/common/saa7146_vbi.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ static int vbi_workaround(struct saa7146_dev *dev)
{
struct saa7146_vv *vv = dev->vv_data;

u32 *cpu;
dma_addr_t dma_addr;
u32 *cpu;
dma_addr_t dma_addr;

int count = 0;
int i;
Expand Down
46 changes: 23 additions & 23 deletions drivers/media/common/saa7146_video.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,23 +150,23 @@ static int try_win(struct saa7146_dev *dev, struct v4l2_window *win)
maxh = vv->standard->v_max_out;

if (V4L2_FIELD_ANY == field) {
field = (win->w.height > maxh/2)
? V4L2_FIELD_INTERLACED
: V4L2_FIELD_TOP;
}
switch (field) {
case V4L2_FIELD_TOP:
case V4L2_FIELD_BOTTOM:
case V4L2_FIELD_ALTERNATE:
maxh = maxh / 2;
break;
case V4L2_FIELD_INTERLACED:
break;
default: {
field = (win->w.height > maxh/2)
? V4L2_FIELD_INTERLACED
: V4L2_FIELD_TOP;
}
switch (field) {
case V4L2_FIELD_TOP:
case V4L2_FIELD_BOTTOM:
case V4L2_FIELD_ALTERNATE:
maxh = maxh / 2;
break;
case V4L2_FIELD_INTERLACED:
break;
default: {
DEB_D(("no known field mode '%d'.\n",field));
return -EINVAL;
return -EINVAL;
}
}
}

win->field = field;
if (win->w.width > maxw)
Expand Down Expand Up @@ -887,7 +887,7 @@ int saa7146_video_do_ioctl(struct inode *inode, struct file *file, unsigned int

DEB_EE(("VIDIOC_QUERYCAP\n"));

strcpy(cap->driver, "saa7146 v4l2");
strcpy(cap->driver, "saa7146 v4l2");
strlcpy(cap->card, dev->ext->name, sizeof(cap->card));
sprintf(cap->bus_info,"PCI:%s", pci_name(dev->pci));
cap->version = SAA7146_VERSION_CODE;
Expand Down Expand Up @@ -1011,19 +1011,19 @@ int saa7146_video_do_ioctl(struct inode *inode, struct file *file, unsigned int
err = set_control(fh,arg);
return err;
}
case VIDIOC_G_PARM:
{
struct v4l2_streamparm *parm = arg;
case VIDIOC_G_PARM:
{
struct v4l2_streamparm *parm = arg;
if( parm->type != V4L2_BUF_TYPE_VIDEO_CAPTURE ) {
return -EINVAL;
}
memset(&parm->parm.capture,0,sizeof(struct v4l2_captureparm));
memset(&parm->parm.capture,0,sizeof(struct v4l2_captureparm));
parm->parm.capture.readbuffers = 1;
// fixme: only for PAL!
parm->parm.capture.timeperframe.numerator = 1;
parm->parm.capture.timeperframe.denominator = 25;
return 0;
}
return 0;
}
case VIDIOC_G_FMT:
{
struct v4l2_format *f = arg;
Expand Down Expand Up @@ -1383,7 +1383,7 @@ static struct videobuf_queue_ops video_qops = {

static void video_init(struct saa7146_dev *dev, struct saa7146_vv *vv)
{
INIT_LIST_HEAD(&vv->video_q.queue);
INIT_LIST_HEAD(&vv->video_q.queue);

init_timer(&vv->video_q.timeout);
vv->video_q.timeout.function = saa7146_buffer_timeout;
Expand Down
Loading

0 comments on commit afd1a0c

Please sign in to comment.