Commit 63eea279 authored by Gerd Knorr's avatar Gerd Knorr Committed by Linus Torvalds

[PATCH] v4l: bttv whitespace cleanup

The patch just removes all trailing whitespaces, there are no actual code
changes.  I've a script to remove them from my sources now, that should kill
those no-op whitespace changes in my patches after merging this initial
cleanup.
Signed-off-by: default avatarGerd Knorr <kraxel@bytesex.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 026ff433
/*
/*
bt848.h - Bt848 register offsets
Copyright (C) 1996,97,98 Ralph Metzler (rjkm@thp.uni-koeln.de)
......@@ -22,10 +22,10 @@
#define _BT848_H_
#ifndef PCI_VENDOR_ID_BROOKTREE
#define PCI_VENDOR_ID_BROOKTREE 0x109e
#define PCI_VENDOR_ID_BROOKTREE 0x109e
#endif
#ifndef PCI_DEVICE_ID_BT848
#define PCI_DEVICE_ID_BT848 0x350
#define PCI_DEVICE_ID_BT848 0x350
#endif
#ifndef PCI_DEVICE_ID_BT849
#define PCI_DEVICE_ID_BT849 0x351
......@@ -50,7 +50,7 @@
#define BT848_DSTATUS_LOF (1<<1)
#define BT848_DSTATUS_COF (1<<0)
#define BT848_IFORM 0x004
#define BT848_IFORM 0x004
#define BT848_IFORM_HACTIVE (1<<7)
#define BT848_IFORM_MUXSEL (3<<5)
#define BT848_IFORM_MUX0 (2<<5)
......@@ -71,7 +71,7 @@
#define BT848_IFORM_AUTO 0
#define BT848_IFORM_NORM 7
#define BT848_TDEC 0x008
#define BT848_TDEC 0x008
#define BT848_TDEC_DEC_FIELD (1<<7)
#define BT848_TDEC_FLDALIGN (1<<6)
#define BT848_TDEC_DEC_RAT (0x1f)
......
/*
$Id: btcx-risc.c,v 1.2 2004/09/15 16:15:24 kraxel Exp $
$Id: btcx-risc.c,v 1.3 2004/10/13 10:39:00 kraxel Exp $
btcx-risc.c
......@@ -189,7 +189,7 @@ btcx_calc_skips(int line, int width, unsigned int *maxy,
{
unsigned int clip,skip;
int end,maxline;
skip=0;
maxline = 9999;
for (clip = 0; clip < nclips; clip++) {
......@@ -199,7 +199,7 @@ btcx_calc_skips(int line, int width, unsigned int *maxy,
continue;
if (clips[clip].c.left > (signed)width)
break;
/* vertical range */
if (line > clips[clip].c.top+clips[clip].c.height-1)
continue;
......
This diff is collapsed.
This diff is collapsed.
/*
$Id: bttv-gpio.c,v 1.3 2004/09/15 16:15:24 kraxel Exp $
$Id: bttv-gpio.c,v 1.4 2004/10/13 10:39:00 kraxel Exp $
bttv-gpio.c -- gpio sub drivers
......@@ -24,7 +24,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <linux/module.h>
......
/*
$Id: bttv-i2c.c,v 1.10 2004/10/06 17:30:51 kraxel Exp $
$Id: bttv-i2c.c,v 1.11 2004/10/13 10:39:00 kraxel Exp $
bttv-i2c.c -- all the i2c code is here
......@@ -22,7 +22,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <linux/module.h>
......@@ -83,7 +83,7 @@ static int bttv_bit_getscl(void *data)
{
struct bttv *btv = (struct bttv*)data;
int state;
state = btread(BT848_I2C) & 0x02 ? 1 : 0;
return state;
}
......@@ -126,7 +126,7 @@ static struct i2c_adapter bttv_i2c_adap_sw_template = {
/* ----------------------------------------------------------------------- */
/* I2C functions - hardware i2c */
static int algo_control(struct i2c_adapter *adapter,
static int algo_control(struct i2c_adapter *adapter,
unsigned int cmd, unsigned long arg)
{
return 0;
......@@ -142,7 +142,7 @@ bttv_i2c_wait_done(struct bttv *btv)
{
DECLARE_WAITQUEUE(wait, current);
int rc = 0;
add_wait_queue(&btv->i2c_queue, &wait);
if (0 == btv->i2c_done)
msleep_interruptible(20);
......@@ -352,7 +352,7 @@ static struct i2c_client bttv_i2c_client_template = {
/* read I2C */
int bttv_I2CRead(struct bttv *btv, unsigned char addr, char *probe_for)
int bttv_I2CRead(struct bttv *btv, unsigned char addr, char *probe_for)
{
unsigned char buffer = 0;
......@@ -397,7 +397,7 @@ int bttv_I2CWrite(struct bttv *btv, unsigned char addr, unsigned char b1,
void __devinit bttv_readee(struct bttv *btv, unsigned char *eedata, int addr)
{
int i;
if (bttv_I2CWrite(btv, addr, 0, -1, 0)<0) {
printk(KERN_WARNING "bttv: readee error\n");
return;
......
/*
$Id: bttv-if.c,v 1.2 2004/09/15 16:15:24 kraxel Exp $
$Id: bttv-if.c,v 1.3 2004/10/13 10:39:00 kraxel Exp $
bttv-if.c -- old gpio interface to other kernel modules
don't use in new code, will go away in 2.7
......@@ -24,7 +24,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <linux/module.h>
......@@ -82,7 +82,7 @@ int bttv_gpio_enable(unsigned int card, unsigned long mask, unsigned long data)
if (card >= bttv_num) {
return -EINVAL;
}
btv = &bttvs[card];
gpio_inout(mask,data);
if (bttv_gpio)
......@@ -93,7 +93,7 @@ int bttv_gpio_enable(unsigned int card, unsigned long mask, unsigned long data)
int bttv_read_gpio(unsigned int card, unsigned long *data)
{
struct bttv *btv;
if (card >= bttv_num) {
return -EINVAL;
}
......@@ -104,7 +104,7 @@ int bttv_read_gpio(unsigned int card, unsigned long *data)
return -ENODEV;
}
/* prior setting BT848_GPIO_REG_INP is (probably) not needed
/* prior setting BT848_GPIO_REG_INP is (probably) not needed
because we set direct input on init */
*data = gpio_read();
return 0;
......@@ -113,14 +113,14 @@ int bttv_read_gpio(unsigned int card, unsigned long *data)
int bttv_write_gpio(unsigned int card, unsigned long mask, unsigned long data)
{
struct bttv *btv;
if (card >= bttv_num) {
return -EINVAL;
}
btv = &bttvs[card];
/* prior setting BT848_GPIO_REG_INP is (probably) not needed
/* prior setting BT848_GPIO_REG_INP is (probably) not needed
because direct input is set on init */
gpio_bits(mask,data);
if (bttv_gpio)
......
/*
$Id: bttv-risc.c,v 1.8 2004/10/06 17:30:51 kraxel Exp $
$Id: bttv-risc.c,v 1.9 2004/10/13 10:39:00 kraxel Exp $
bttv-risc.c -- interfaces to other kernel modules
......@@ -240,7 +240,7 @@ bttv_risc_overlay(struct bttv *btv, struct btcx_riscmem *risc,
/* skip list for window clipping */
if (NULL == (skips = kmalloc(sizeof(*skips) * ov->nclips,GFP_KERNEL)))
return -ENOMEM;
/* estimate risc mem: worst case is (clip+1) * lines instructions
+ sync + jump (all 2 dwords) */
instructions = (ov->nclips + 1) *
......@@ -293,7 +293,7 @@ bttv_risc_overlay(struct bttv *btv, struct btcx_riscmem *risc,
ra = addr + (fmt->depth>>3)*start;
else
ra = 0;
if (0 == start)
ri |= BT848_RISC_SOL;
if (ov->w.width == end)
......@@ -413,7 +413,7 @@ bttv_set_dma(struct bttv *btv, int override)
btv->curr.top ? (unsigned long long)btv->curr.top->top.dma : 0,
btv->cvbi ? (unsigned long long)btv->cvbi->bottom.dma : 0,
btv->curr.bottom ? (unsigned long long)btv->curr.bottom->bottom.dma : 0);
cmd = BT848_RISC_JUMP;
if (btv->loop_irq) {
cmd |= BT848_RISC_IRQ;
......@@ -426,7 +426,7 @@ bttv_set_dma(struct bttv *btv, int override)
del_timer(&btv->timeout);
}
btv->main.cpu[RISC_SLOT_LOOP] = cpu_to_le32(cmd);
btaor(capctl, ~0x0f, BT848_CAP_CTL);
if (capctl) {
if (btv->dma_on)
......@@ -447,7 +447,7 @@ int
bttv_risc_init_main(struct bttv *btv)
{
int rc;
if ((rc = btcx_riscmem_alloc(btv->c.pci,&btv->main,PAGE_SIZE)) < 0)
return rc;
dprintk(KERN_DEBUG "bttv%d: risc main @ %08Lx\n",
......@@ -616,7 +616,7 @@ bttv_buffer_risc(struct bttv *btv, struct bttv_buffer *buf)
bttv_calc_geo(btv,&buf->geo,buf->vb.width,buf->vb.height,
V4L2_FIELD_HAS_BOTH(buf->vb.field),buf->tvnorm);
switch (buf->vb.field) {
case V4L2_FIELD_TOP:
bttv_risc_packed(btv,&buf->top,buf->vb.dma.sglist,
......
/*
$Id: bttv-vbi.c,v 1.5 2004/10/06 17:30:51 kraxel Exp $
$Id: bttv-vbi.c,v 1.6 2004/10/13 10:39:00 kraxel Exp $
bttv - Bt848 frame grabber driver
vbi interface
(c) 2002 Gerd Knorr <kraxel@bytesex.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
......@@ -83,7 +83,7 @@ static int vbi_buffer_prepare(void *priv, struct videobuf_buffer *vb,
struct bttv *btv = fh->btv;
struct bttv_buffer *buf = (struct bttv_buffer*)vb;
int rc;
buf->vb.size = fh->lines * 2 * 2048;
if (0 != buf->vb.baddr && buf->vb.bsize < buf->vb.size)
return -EINVAL;
......@@ -112,7 +112,7 @@ vbi_buffer_queue(void *priv, struct videobuf_buffer *vb)
struct bttv_fh *fh = priv;
struct bttv *btv = fh->btv;
struct bttv_buffer *buf = (struct bttv_buffer*)vb;
dprintk("queue %p\n",vb);
buf->vb.state = STATE_QUEUED;
list_add_tail(&buf->vb.queue,&btv->vcapture);
......@@ -127,7 +127,7 @@ static void vbi_buffer_release(void *priv, struct videobuf_buffer *vb)
struct bttv_fh *fh = priv;
struct bttv *btv = fh->btv;
struct bttv_buffer *buf = (struct bttv_buffer*)vb;
dprintk("free %p\n",vb);
bttv_dma_free(fh->btv,buf);
}
......
/*
* $Id: bttv.h,v 1.9 2004/09/15 16:15:24 kraxel Exp $
* $Id: bttv.h,v 1.10 2004/10/13 10:39:00 kraxel Exp $
*
* bttv - Bt848 frame grabber driver
*
......@@ -26,9 +26,9 @@
#define BTTV_HAUPPAUGE 0x02
#define BTTV_STB 0x03
#define BTTV_INTEL 0x04
#define BTTV_DIAMOND 0x05
#define BTTV_AVERMEDIA 0x06
#define BTTV_MATRIX_VISION 0x07
#define BTTV_DIAMOND 0x05
#define BTTV_AVERMEDIA 0x06
#define BTTV_MATRIX_VISION 0x07
#define BTTV_FLYVIDEO 0x08
#define BTTV_TURBOTV 0x09
#define BTTV_HAUPPAUGE878 0x0a
......@@ -245,7 +245,7 @@ extern int bttv_handle_chipset(struct bttv *btv);
/* returns card type + card ID (for bt878-based ones)
for possible values see lines below beginning with #define BTTV_UNKNOWN
returns negative value if error occurred
returns negative value if error occurred
*/
extern int bttv_get_cardinfo(unsigned int card, int *type,
unsigned int *cardid);
......@@ -268,18 +268,18 @@ extern int bttv_read_gpio(unsigned int card, unsigned long *data);
/* sets GPDATA register to new value:
(data & mask) | (current_GPDATA_value & ~mask)
returns negative value if error occurred
returns negative value if error occurred
*/
extern int bttv_write_gpio(unsigned int card,
unsigned long mask, unsigned long data);
/* returns pointer to task queue which can be used as parameter to
/* returns pointer to task queue which can be used as parameter to
interruptible_sleep_on
in interrupt handler if BT848_INT_GPINT bit is set - this queue is activated
(wake_up_interruptible) and following call to the function bttv_read_gpio
(wake_up_interruptible) and following call to the function bttv_read_gpio
should return new value of GPDATA,
returns NULL value if error occurred or queue is not available
WARNING: because there is no buffer for GPIO data, one MUST
WARNING: because there is no buffer for GPIO data, one MUST
process data ASAP
*/
extern wait_queue_head_t* bttv_get_gpio_queue(unsigned int card);
......
/*
$Id: bttvp.h,v 1.10 2004/10/06 17:30:51 kraxel Exp $
$Id: bttvp.h,v 1.11 2004/10/13 10:39:00 kraxel Exp $
bttv - Bt848 frame grabber driver
......@@ -145,7 +145,7 @@ struct bttv_overlay {
struct bttv_fh {
struct bttv *btv;
int resources;
#ifdef VIDIOC_G_PRIORITY
#ifdef VIDIOC_G_PRIORITY
enum v4l2_priority prio;
#endif
enum v4l2_buf_type type;
......@@ -334,10 +334,10 @@ struct bttv {
struct semaphore lock;
int resources;
struct semaphore reslock;
#ifdef VIDIOC_G_PRIORITY
#ifdef VIDIOC_G_PRIORITY
struct v4l2_prio_state prio;
#endif
/* video state */
unsigned int input;
unsigned int audio;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment