summaryrefslogtreecommitdiff
path: root/linux/drivers/media/common
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/common')
-rw-r--r--linux/drivers/media/common/saa7146_core.c15
-rw-r--r--linux/drivers/media/common/saa7146_fops.c9
-rw-r--r--linux/drivers/media/common/saa7146_hlp.c60
-rw-r--r--linux/drivers/media/common/saa7146_i2c.c24
-rw-r--r--linux/drivers/media/common/saa7146_vbi.c69
-rw-r--r--linux/drivers/media/common/saa7146_video.c78
6 files changed, 85 insertions, 170 deletions
diff --git a/linux/drivers/media/common/saa7146_core.c b/linux/drivers/media/common/saa7146_core.c
index 45e7eec45..51013c6b9 100644
--- a/linux/drivers/media/common/saa7146_core.c
+++ b/linux/drivers/media/common/saa7146_core.c
@@ -49,8 +49,7 @@ static void dump_registers(struct saa7146_dev* dev)
****************************************************************************/
/* this is videobuf_vmalloc_to_sg() from video-buf.c */
-static
-struct scatterlist* vmalloc_to_sg(unsigned char *virt, int nr_pages)
+static struct scatterlist* vmalloc_to_sg(unsigned char *virt, int nr_pages)
{
struct scatterlist *sglist;
struct page *pg;
@@ -254,8 +253,7 @@ static irqreturn_t interrupt_hw(int irq, void *dev_id, struct pt_regs *regs)
/*********************************************************************************/
/* configuration-functions */
-static
-int saa7146_init_one(struct pci_dev *pci, const struct pci_device_id *ent)
+static int saa7146_init_one(struct pci_dev *pci, const struct pci_device_id *ent)
{
unsigned long adr = 0, len = 0;
struct saa7146_dev* dev = kmalloc (sizeof(struct saa7146_dev),GFP_KERNEL);
@@ -417,8 +415,7 @@ out:
return err;
}
-static
-void saa7146_remove_one(struct pci_dev *pdev)
+static void saa7146_remove_one(struct pci_dev *pdev)
{
struct saa7146_dev* dev = (struct saa7146_dev*) pci_get_drvdata(pdev);
DEB_EE(("dev:%p\n",dev));
@@ -477,8 +474,7 @@ int saa7146_unregister_extension(struct saa7146_extension* ext)
return 0;
}
-static
-int __init saa7146_init_module(void)
+static int __init saa7146_init_module(void)
{
if( 0 == initialized ) {
INIT_LIST_HEAD(&saa7146_devices);
@@ -488,8 +484,7 @@ int __init saa7146_init_module(void)
return 0;
}
-static
-void __exit saa7146_cleanup_module(void)
+static void __exit saa7146_cleanup_module(void)
{
}
diff --git a/linux/drivers/media/common/saa7146_fops.c b/linux/drivers/media/common/saa7146_fops.c
index 709c9b8d9..008c02567 100644
--- a/linux/drivers/media/common/saa7146_fops.c
+++ b/linux/drivers/media/common/saa7146_fops.c
@@ -144,8 +144,7 @@ void saa7146_buffer_timeout(unsigned long data)
/********************************************************************************/
/* file operations */
-static
-int fops_open(struct inode *inode, struct file *file)
+static int fops_open(struct inode *inode, struct file *file)
{
unsigned int minor = minor(inode->i_rdev);
struct saa7146_dev *h = NULL, *dev = NULL;
@@ -463,15 +462,13 @@ int saa7146_unregister_device(struct video_device *vid, struct saa7146_dev* dev)
return 0;
}
-static
-int __init saa7146_vv_init_module(void)
+static int __init saa7146_vv_init_module(void)
{
return 0;
}
-static
-void __exit saa7146_vv_cleanup_module(void)
+static void __exit saa7146_vv_cleanup_module(void)
{
}
diff --git a/linux/drivers/media/common/saa7146_hlp.c b/linux/drivers/media/common/saa7146_hlp.c
index 1ba897b6f..88cf19141 100644
--- a/linux/drivers/media/common/saa7146_hlp.c
+++ b/linux/drivers/media/common/saa7146_hlp.c
@@ -5,8 +5,7 @@
#define my_max(type,x,y) \
({ type __x = (x), __y = (y); __x > __y ? __x: __y; })
-static
-void calculate_output_format_register(struct saa7146_dev* saa, u32 palette, u32* clip_format)
+static void calculate_output_format_register(struct saa7146_dev* saa, u32 palette, u32* clip_format)
{
/* clear out the necessary bits */
*clip_format &= 0x0000ffff;
@@ -14,21 +13,18 @@ void calculate_output_format_register(struct saa7146_dev* saa, u32 palette, u32*
*clip_format |= (( ((palette&0xf00)>>8) << 30) | ((palette&0x00f) << 24) | (((palette&0x0f0)>>4) << 16));
}
-static
-void calculate_bcs_ctrl_register(struct saa7146_dev *dev, int brightness, int contrast, int colour, u32 *bcs_ctrl)
+static void calculate_bcs_ctrl_register(struct saa7146_dev *dev, int brightness, int contrast, int colour, u32 *bcs_ctrl)
{
*bcs_ctrl = ((brightness << 24) | (contrast << 16) | (colour << 0));
}
-static
-void calculate_hps_source_and_sync(struct saa7146_dev *dev, int source, int sync, u32* hps_ctrl)
+static void calculate_hps_source_and_sync(struct saa7146_dev *dev, int source, int sync, u32* hps_ctrl)
{
*hps_ctrl &= ~(MASK_30 | MASK_31 | MASK_28);
*hps_ctrl |= (source << 30) | (sync << 28);
}
-static
-void calculate_hxo_and_hyo(struct saa7146_vv *vv, u32* hps_h_scale, u32* hps_ctrl)
+static void calculate_hxo_and_hyo(struct saa7146_vv *vv, u32* hps_h_scale, u32* hps_ctrl)
{
int hyo = 0, hxo = 0;
@@ -73,8 +69,7 @@ static struct {
u8 h_attenuation[] = { 1, 2, 4, 8, 2, 4, 8, 16, 0};
/* calculate horizontal scale registers */
-static
-int calculate_h_scale_registers(struct saa7146_dev *dev,
+static int calculate_h_scale_registers(struct saa7146_dev *dev,
int in_x, int out_x, int flip_lr,
u32* hps_ctrl, u32* hps_v_gain, u32* hps_h_prescale, u32* hps_h_scale)
{
@@ -221,8 +216,7 @@ static struct {
u16 v_attenuation[] = { 2, 4, 8, 16, 32, 64, 128, 256, 0};
/* calculate vertical scale registers */
-static
-int calculate_v_scale_registers(struct saa7146_dev *dev, enum v4l2_field field,
+static int calculate_v_scale_registers(struct saa7146_dev *dev, enum v4l2_field field,
int in_y, int out_y, u32* hps_v_scale, u32* hps_v_gain)
{
int lpi = 0;
@@ -318,8 +312,7 @@ int calculate_v_scale_registers(struct saa7146_dev *dev, enum v4l2_field field,
}
/* simple bubble-sort algorithm with duplicate elimination */
-static
-int sort_and_eliminate(u32* values, int* count)
+static int sort_and_eliminate(u32* values, int* count)
{
int low = 0, high = 0, top = 0, temp = 0;
int cur = 0, next = 0;
@@ -351,8 +344,7 @@ int sort_and_eliminate(u32* values, int* count)
return 0;
}
-static
-void calculate_clipping_registers_rect(struct saa7146_dev *dev, struct saa7146_fh *fh,
+static void calculate_clipping_registers_rect(struct saa7146_dev *dev, struct saa7146_fh *fh,
struct saa7146_video_dma *vdma2, u32* clip_format, u32* arbtr_ctrl, enum v4l2_field field)
{
struct saa7146_vv *vv = dev->vv_data;
@@ -484,8 +476,7 @@ void calculate_clipping_registers_rect(struct saa7146_dev *dev, struct saa7146_f
}
/* disable clipping */
-static
-void saa7146_disable_clipping(struct saa7146_dev *dev)
+static void saa7146_disable_clipping(struct saa7146_dev *dev)
{
u32 clip_format = saa7146_read(dev, CLIP_FORMAT_CTRL);
@@ -500,8 +491,7 @@ void saa7146_disable_clipping(struct saa7146_dev *dev)
saa7146_write(dev, MC1, (MASK_21));
}
-static
-void saa7146_set_clipping_rect(struct saa7146_dev *dev, struct saa7146_fh *fh)
+static void saa7146_set_clipping_rect(struct saa7146_dev *dev, struct saa7146_fh *fh)
{
enum v4l2_field field = fh->ov.win.field;
int clipcount = fh->ov.nclips;
@@ -543,8 +533,7 @@ void saa7146_set_clipping_rect(struct saa7146_dev *dev, struct saa7146_fh *fh)
saa7146_write(dev, MC1, (MASK_05 | MASK_21));
}
-static
-void saa7146_set_window(struct saa7146_dev *dev, int width, int height, enum v4l2_field field)
+static void saa7146_set_window(struct saa7146_dev *dev, int width, int height, enum v4l2_field field)
{
struct saa7146_vv *vv = dev->vv_data;
@@ -580,8 +569,7 @@ void saa7146_set_window(struct saa7146_dev *dev, int width, int height, enum v4l
}
/* calculate the new memory offsets for a desired position */
-static
-void saa7146_set_position(struct saa7146_dev *dev, int w_x, int w_y, int w_height, enum v4l2_field field)
+static void saa7146_set_position(struct saa7146_dev *dev, int w_x, int w_y, int w_height, enum v4l2_field field)
{
struct saa7146_vv *vv = dev->vv_data;
@@ -624,8 +612,7 @@ void saa7146_set_position(struct saa7146_dev *dev, int w_x, int w_y, int w_heigh
saa7146_write_out_dma(dev, 1, &vdma1);
}
-static
-void saa7146_set_output_format(struct saa7146_dev *dev, unsigned long palette)
+static void saa7146_set_output_format(struct saa7146_dev *dev, unsigned long palette)
{
u32 clip_format = saa7146_read(dev, CLIP_FORMAT_CTRL);
@@ -742,8 +729,7 @@ void saa7146_write_out_dma(struct saa7146_dev* dev, int which, struct saa7146_vi
printk("vdma%d.num_line_byte: 0x%08x\n", which,vdma->num_line_byte);
*/
}
-static
-int calculate_video_dma_grab_packed(struct saa7146_dev* dev, struct saa7146_buf *buf)
+static int calculate_video_dma_grab_packed(struct saa7146_dev* dev, struct saa7146_buf *buf)
{
struct saa7146_vv *vv = dev->vv_data;
struct saa7146_video_dma vdma1;
@@ -791,8 +777,7 @@ int calculate_video_dma_grab_packed(struct saa7146_dev* dev, struct saa7146_buf
return 0;
}
-static
-int calc_planar_422(struct saa7146_vv *vv, struct saa7146_buf *buf, struct saa7146_video_dma *vdma2, struct saa7146_video_dma *vdma3)
+static int calc_planar_422(struct saa7146_vv *vv, struct saa7146_buf *buf, struct saa7146_video_dma *vdma2, struct saa7146_video_dma *vdma3)
{
int height = buf->fmt->height;
int width = buf->fmt->width;
@@ -822,8 +807,7 @@ int calc_planar_422(struct saa7146_vv *vv, struct saa7146_buf *buf, struct saa71
return 0;
}
-static
-int calc_planar_420(struct saa7146_vv *vv, struct saa7146_buf *buf, struct saa7146_video_dma *vdma2, struct saa7146_video_dma *vdma3)
+static int calc_planar_420(struct saa7146_vv *vv, struct saa7146_buf *buf, struct saa7146_video_dma *vdma2, struct saa7146_video_dma *vdma3)
{
int height = buf->fmt->height;
int width = buf->fmt->width;
@@ -853,8 +837,7 @@ int calc_planar_420(struct saa7146_vv *vv, struct saa7146_buf *buf, struct saa71
}
-static
-int calculate_video_dma_grab_planar(struct saa7146_dev* dev, struct saa7146_buf *buf)
+static int calculate_video_dma_grab_planar(struct saa7146_dev* dev, struct saa7146_buf *buf)
{
struct saa7146_vv *vv = dev->vv_data;
struct saa7146_video_dma vdma1;
@@ -949,13 +932,9 @@ int calculate_video_dma_grab_planar(struct saa7146_dev* dev, struct saa7146_buf
return 0;
}
-#define WRITE_RPS0(x) dev->d_rps0.cpu_addr[ count++ ] = cpu_to_le32(x)
-
-static
-void program_capture_engine(struct saa7146_dev *dev, int planar)
+static void program_capture_engine(struct saa7146_dev *dev, int planar)
{
struct saa7146_vv *vv = dev->vv_data;
- int count = 0;
unsigned long e_wait = vv->current_hps_sync == SAA7146_HPS_SYNC_PORT_A ? CMD_E_FID_A : CMD_E_FID_B;
unsigned long o_wait = vv->current_hps_sync == SAA7146_HPS_SYNC_PORT_A ? CMD_O_FID_A : CMD_O_FID_B;
@@ -966,9 +945,6 @@ void program_capture_engine(struct saa7146_dev *dev, int planar)
o_wait = tmp;
}
- /* write beginning of rps-program */
- count = 0;
-
/* wait for o_fid_a/b / e_fid_a/b toggle only if bit 0 is not set*/
WRITE_RPS0(CMD_PAUSE | CMD_OAN | CMD_SIG0 | e_wait);
WRITE_RPS0(CMD_PAUSE | CMD_OAN | CMD_SIG0 | o_wait);
diff --git a/linux/drivers/media/common/saa7146_i2c.c b/linux/drivers/media/common/saa7146_i2c.c
index 7b7d67ca9..d904deae5 100644
--- a/linux/drivers/media/common/saa7146_i2c.c
+++ b/linux/drivers/media/common/saa7146_i2c.c
@@ -1,8 +1,7 @@
#include <media/saa7146_vv.h>
/* helper function */
-static
-void my_wait(struct saa7146_dev *dev, long ms)
+static void my_wait(struct saa7146_dev *dev, long ms)
{
set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout((((ms+10)/10)*HZ)/1000);
@@ -19,8 +18,7 @@ u32 saa7146_i2c_func(struct i2c_adapter *adapter)
}
/* this function returns the status-register of our i2c-device */
-static inline
-u32 saa7146_i2c_status(struct saa7146_dev *dev)
+static inline u32 saa7146_i2c_status(struct saa7146_dev *dev)
{
u32 iicsta = saa7146_read(dev, I2C_STATUS);
/*
@@ -33,8 +31,7 @@ u32 saa7146_i2c_status(struct saa7146_dev *dev)
sent through the saa7146. have a look at the specifications p. 122 ff
to understand this. it returns the number of u32s to send, or -1
in case of an error. */
-static
-int saa7146_i2c_msg_prepare(const struct i2c_msg m[], int num, u32 *op)
+static int saa7146_i2c_msg_prepare(const struct i2c_msg m[], int num, u32 *op)
{
int h1, h2;
int i, j, addr;
@@ -98,8 +95,7 @@ int saa7146_i2c_msg_prepare(const struct i2c_msg m[], int num, u32 *op)
which bytes were read through the adapter and write them back to the corresponding
i2c-message. but instead, we simply write back all bytes.
fixme: this could be improved. */
-static
-int saa7146_i2c_msg_cleanup(const struct i2c_msg m[], int num, u32 *op)
+static int saa7146_i2c_msg_cleanup(const struct i2c_msg m[], int num, u32 *op)
{
int i, j;
int op_count = 0;
@@ -121,8 +117,7 @@ int saa7146_i2c_msg_cleanup(const struct i2c_msg m[], int num, u32 *op)
}
/* this functions resets the i2c-device and returns 0 if everything was fine, otherwise -1 */
-static
-int saa7146_i2c_reset(struct saa7146_dev *dev)
+static int saa7146_i2c_reset(struct saa7146_dev *dev)
{
/* get current status */
u32 status = saa7146_i2c_status(dev);
@@ -186,8 +181,7 @@ int saa7146_i2c_reset(struct saa7146_dev *dev)
/* this functions writes out the data-byte 'dword' to the i2c-device.
it returns 0 if ok, -1 if the transfer failed, -2 if the transfer
failed badly (e.g. address error) */
-static
-int saa7146_i2c_writeout(struct saa7146_dev *dev, u32* dword, int short_delay)
+static int saa7146_i2c_writeout(struct saa7146_dev *dev, u32* dword, int short_delay)
{
u32 status = 0, mc2 = 0;
int trial = 0;
@@ -383,8 +377,7 @@ out:
}
/* utility functions */
-static
-int saa7146_i2c_xfer(struct i2c_adapter* adapter, struct i2c_msg msg[], int num)
+static int saa7146_i2c_xfer(struct i2c_adapter* adapter, struct i2c_msg msg[], int num)
{
struct saa7146_dev* dev = i2c_get_adapdata(adapter);
@@ -398,8 +391,7 @@ int saa7146_i2c_xfer(struct i2c_adapter* adapter, struct i2c_msg msg[], int num)
#include <linux/i2c-id.h>
/* exported algorithm data */
-static
-struct i2c_algorithm saa7146_algo = {
+static struct i2c_algorithm saa7146_algo = {
.name = "saa7146 i2c algorithm",
.id = I2C_ALGO_SAA7146,
.master_xfer = saa7146_i2c_xfer,
diff --git a/linux/drivers/media/common/saa7146_vbi.c b/linux/drivers/media/common/saa7146_vbi.c
index f00fd694c..9a510b6b7 100644
--- a/linux/drivers/media/common/saa7146_vbi.c
+++ b/linux/drivers/media/common/saa7146_vbi.c
@@ -2,17 +2,14 @@
static int vbi_pixel_to_capture = 720 * 2;
-#define WRITE_RPS1(x) dev->d_rps1.cpu_addr[ count++ ] = cpu_to_le32(x)
-
-static
-int vbi_workaround(struct saa7146_dev *dev)
+static int vbi_workaround(struct saa7146_dev *dev)
{
struct saa7146_vv *vv = dev->vv_data;
u32 *cpu;
dma_addr_t dma_addr;
- int i, count;
+ int i;
DECLARE_WAITQUEUE(wait, current);
@@ -36,19 +33,6 @@ int vbi_workaround(struct saa7146_dev *dev)
saa7146_write(dev, NUM_LINE_BYTE3, (2<<16)|((vbi_pixel_to_capture)<<0));
saa7146_write(dev, MC2, MASK_04|MASK_20);
-
- /* we have to do the workaround two times to be sure that
- everything is ok */
- for(i = 0; i < 2; i++) {
-
- /* indicate to the irq handler that we do the workaround */
- saa7146_write(dev, MC2, MASK_31|MASK_15);
-
- saa7146_write(dev, NUM_LINE_BYTE3, (1<<16)|(2<<0));
- saa7146_write(dev, MC2, MASK_04|MASK_20);
-
- count = 0;
-
/* load brs-control register */
WRITE_RPS1(CMD_WR_REG | (1 << 8) | (BRS_CTRL/4));
/* BXO = 1h, BRS to outbound */
@@ -85,6 +69,16 @@ int vbi_workaround(struct saa7146_dev *dev)
/* stop rps1 */
WRITE_RPS1(CMD_STOP);
+ /* we have to do the workaround twice to be sure that
+ everything is ok */
+ for(i = 0; i < 2; i++) {
+
+ /* indicate to the irq handler that we do the workaround */
+ saa7146_write(dev, MC2, MASK_31|MASK_15);
+
+ saa7146_write(dev, NUM_LINE_BYTE3, (1<<16)|(2<<0));
+ saa7146_write(dev, MC2, MASK_04|MASK_20);
+
/* enable rps1 irqs */
IER_ENABLE(dev,MASK_28);
@@ -194,8 +188,7 @@ void saa7146_set_vbi_capture(struct saa7146_dev *dev, struct saa7146_buf *buf, s
saa7146_write(dev, MC1, (MASK_13 | MASK_29));
}
-static
-int buffer_activate(struct saa7146_dev *dev,
+static int buffer_activate(struct saa7146_dev *dev,
struct saa7146_buf *buf,
struct saa7146_buf *next)
{
@@ -209,8 +202,7 @@ int buffer_activate(struct saa7146_dev *dev,
return 0;
}
-static
-int buffer_prepare(struct file *file, struct videobuf_buffer *vb,enum v4l2_field field)
+static int buffer_prepare(struct file *file, struct videobuf_buffer *vb,enum v4l2_field field)
{
struct saa7146_fh *fh = file->private_data;
struct saa7146_dev *dev = fh->dev;
@@ -259,8 +251,7 @@ int buffer_prepare(struct file *file, struct videobuf_buffer *vb,enum v4l2_field
return err;
}
-static int
-buffer_setup(struct file *file, unsigned int *count, unsigned int *size)
+static int buffer_setup(struct file *file, unsigned int *count, unsigned int *size)
{
int llength,lines;
@@ -275,8 +266,7 @@ buffer_setup(struct file *file, unsigned int *count, unsigned int *size)
return 0;
}
-static
-void buffer_queue(struct file *file, struct videobuf_buffer *vb)
+static void buffer_queue(struct file *file, struct videobuf_buffer *vb)
{
struct saa7146_fh *fh = file->private_data;
struct saa7146_dev *dev = fh->dev;
@@ -287,8 +277,7 @@ void buffer_queue(struct file *file, struct videobuf_buffer *vb)
saa7146_buffer_queue(dev,&vv->vbi_q,buf);
}
-static
-void buffer_release(struct file *file, struct videobuf_buffer *vb)
+static void buffer_release(struct file *file, struct videobuf_buffer *vb)
{
struct saa7146_fh *fh = file->private_data;
struct saa7146_dev *dev = fh->dev;
@@ -298,8 +287,7 @@ void buffer_release(struct file *file, struct videobuf_buffer *vb)
saa7146_dma_free(dev,buf);
}
-static
-struct videobuf_queue_ops vbi_qops = {
+static struct videobuf_queue_ops vbi_qops = {
.buf_setup = buffer_setup,
.buf_prepare = buffer_prepare,
.buf_queue = buffer_queue,
@@ -308,8 +296,7 @@ struct videobuf_queue_ops vbi_qops = {
/* ------------------------------------------------------------------ */
-static
-void vbi_stop(struct saa7146_fh *fh)
+static void vbi_stop(struct saa7146_fh *fh)
{
struct saa7146_dev *dev = fh->dev;
struct saa7146_vv *vv = dev->vv_data;
@@ -331,8 +318,7 @@ void vbi_stop(struct saa7146_fh *fh)
spin_unlock_irqrestore(&dev->slock, flags);
}
-static
-void vbi_read_timeout(unsigned long data)
+static void vbi_read_timeout(unsigned long data)
{
struct saa7146_fh *fh = (struct saa7146_fh *)data;
struct saa7146_dev *dev = fh->dev;
@@ -342,8 +328,7 @@ void vbi_read_timeout(unsigned long data)
vbi_stop(fh);
}
-static
-void vbi_init(struct saa7146_dev *dev, struct saa7146_vv *vv)
+static void vbi_init(struct saa7146_dev *dev, struct saa7146_vv *vv)
{
DEB_VBI(("dev:%p\n",dev));
@@ -357,8 +342,7 @@ void vbi_init(struct saa7146_dev *dev, struct saa7146_vv *vv)
init_waitqueue_head(&vv->vbi_wq);
}
-static
-void vbi_open(struct saa7146_dev *dev, struct saa7146_fh *fh)
+static void vbi_open(struct saa7146_dev *dev, struct saa7146_fh *fh)
{
DEB_VBI(("dev:%p, fh:%p\n",dev,fh));
@@ -389,8 +373,7 @@ void vbi_open(struct saa7146_dev *dev, struct saa7146_fh *fh)
vbi_workaround(dev);
}
-static
-void vbi_close(struct saa7146_dev *dev, struct saa7146_fh *fh, struct file *file)
+static void vbi_close(struct saa7146_dev *dev, struct saa7146_fh *fh, struct file *file)
{
struct saa7146_vv *vv = dev->vv_data;
DEB_VBI(("dev:%p, fh:%p\n",dev,fh));
@@ -400,8 +383,7 @@ void vbi_close(struct saa7146_dev *dev, struct saa7146_fh *fh, struct file *file
}
}
-static
-void vbi_irq_done(struct saa7146_dev *dev, unsigned long status)
+static void vbi_irq_done(struct saa7146_dev *dev, unsigned long status)
{
struct saa7146_vv *vv = dev->vv_data;
spin_lock(&dev->slock);
@@ -420,8 +402,7 @@ void vbi_irq_done(struct saa7146_dev *dev, unsigned long status)
spin_unlock(&dev->slock);
}
-static
-ssize_t vbi_read(struct file *file, char *data, size_t count, loff_t *ppos)
+static ssize_t vbi_read(struct file *file, char *data, size_t count, loff_t *ppos)
{
struct saa7146_fh *fh = file->private_data;
struct saa7146_dev *dev = fh->dev;
diff --git a/linux/drivers/media/common/saa7146_video.c b/linux/drivers/media/common/saa7146_video.c
index 3ee1cfa7c..5bbbc4d97 100644
--- a/linux/drivers/media/common/saa7146_video.c
+++ b/linux/drivers/media/common/saa7146_video.c
@@ -1,14 +1,12 @@
#include <media/saa7146_vv.h>
-static
-int memory = 32;
+static int memory = 32;
MODULE_PARM(memory,"i");
MODULE_PARM_DESC(memory, "maximum memory usage for capture buffers (default: 32Mb)");
/* format descriptions for capture and preview */
-static
-struct saa7146_format formats[] = {
+static struct saa7146_format formats[] = {
{
.name = "RGB-8 (3-3-2)",
.pixelformat = V4L2_PIX_FMT_RGB332,
@@ -63,8 +61,7 @@ struct saa7146_format formats[] = {
due to this, it's impossible to provide additional *packed* formats, which are simply byte swapped
(like V4L2_PIX_FMT_YUYV) ... 8-( */
-static
-int NUM_FORMATS = sizeof(formats)/sizeof(struct saa7146_format);
+static int NUM_FORMATS = sizeof(formats)/sizeof(struct saa7146_format);
struct saa7146_format* format_by_fourcc(struct saa7146_dev *dev, int fourcc)
{
@@ -80,8 +77,7 @@ struct saa7146_format* format_by_fourcc(struct saa7146_dev *dev, int fourcc)
return NULL;
}
-static
-int g_fmt(struct saa7146_fh *fh, struct v4l2_format *f)
+static int g_fmt(struct saa7146_fh *fh, struct v4l2_format *f)
{
struct saa7146_dev *dev = fh->dev;
DEB_EE(("dev:%p, fh:%p\n",dev,fh));
@@ -104,8 +100,7 @@ int g_fmt(struct saa7146_fh *fh, struct v4l2_format *f)
}
}
-static
-int try_win(struct saa7146_dev *dev, struct v4l2_window *win)
+static int try_win(struct saa7146_dev *dev, struct v4l2_window *win)
{
struct saa7146_vv *vv = dev->vv_data;
enum v4l2_field field;
@@ -161,8 +156,7 @@ int try_win(struct saa7146_dev *dev, struct v4l2_window *win)
return 0;
}
-static
-int try_fmt(struct saa7146_fh *fh, struct v4l2_format *f)
+static int try_fmt(struct saa7146_fh *fh, struct v4l2_format *f)
{
struct saa7146_dev *dev = fh->dev;
struct saa7146_vv *vv = dev->vv_data;
@@ -296,8 +290,7 @@ int saa7146_stop_preview(struct saa7146_fh *fh)
return 0;
}
-static
-int s_fmt(struct saa7146_fh *fh, struct v4l2_format *f)
+static int s_fmt(struct saa7146_fh *fh, struct v4l2_format *f)
{
struct saa7146_dev *dev = fh->dev;
struct saa7146_vv *vv = dev->vv_data;
@@ -356,8 +349,7 @@ int s_fmt(struct saa7146_fh *fh, struct v4l2_format *f)
/********************************************************************************/
/* device controls */
-static
-struct v4l2_queryctrl controls[] = {
+static struct v4l2_queryctrl controls[] = {
{
id: V4L2_CID_BRIGHTNESS,
name: "Brightness",
@@ -396,13 +388,11 @@ struct v4l2_queryctrl controls[] = {
type: V4L2_CTRL_TYPE_BOOLEAN,
},
};
-static
-int NUM_CONTROLS = sizeof(controls)/sizeof(struct v4l2_queryctrl);
+static int NUM_CONTROLS = sizeof(controls)/sizeof(struct v4l2_queryctrl);
#define V4L2_CID_PRIVATE_LASTP1 (V4L2_CID_PRIVATE_BASE + 0)
-static
-struct v4l2_queryctrl* ctrl_by_id(int id)
+static struct v4l2_queryctrl* ctrl_by_id(int id)
{
int i;
@@ -412,8 +402,7 @@ struct v4l2_queryctrl* ctrl_by_id(int id)
return NULL;
}
-static
-int get_control(struct saa7146_fh *fh, struct v4l2_control *c)
+static int get_control(struct saa7146_fh *fh, struct v4l2_control *c)
{
struct saa7146_dev *dev = fh->dev;
struct saa7146_vv *vv = dev->vv_data;
@@ -455,8 +444,7 @@ int get_control(struct saa7146_fh *fh, struct v4l2_control *c)
return 0;
}
-static
-int set_control(struct saa7146_fh *fh, struct v4l2_control *c)
+static int set_control(struct saa7146_fh *fh, struct v4l2_control *c)
{
struct saa7146_dev *dev = fh->dev;
struct saa7146_vv *vv = dev->vv_data;
@@ -546,8 +534,7 @@ int set_control(struct saa7146_fh *fh, struct v4l2_control *c)
/********************************************************************************/
/* common pagetable functions */
-static
-int saa7146_pgtable_build(struct saa7146_dev *dev, struct saa7146_buf *buf)
+static int saa7146_pgtable_build(struct saa7146_dev *dev, struct saa7146_buf *buf)
{
struct pci_dev *pci = dev->pci;
struct scatterlist *list = buf->vb.dma.sglist;
@@ -665,8 +652,7 @@ int saa7146_pgtable_build(struct saa7146_dev *dev, struct saa7146_buf *buf)
/********************************************************************************/
/* file operations */
-static
-int video_begin(struct saa7146_fh *fh)
+static int video_begin(struct saa7146_fh *fh)
{
struct saa7146_dev *dev = fh->dev;
struct saa7146_vv *vv = dev->vv_data;
@@ -699,8 +685,7 @@ int video_begin(struct saa7146_fh *fh)
return 0;
}
-static
-int video_end(struct saa7146_fh *fh)
+static int video_end(struct saa7146_fh *fh)
{
struct saa7146_dev *dev = fh->dev;
struct saa7146_vv *vv = dev->vv_data;
@@ -1113,8 +1098,7 @@ int saa7146_video_do_ioctl(struct inode *inode, struct file *file, unsigned int
/*********************************************************************************/
/* buffer handling functions */
-static
-int buffer_activate (struct saa7146_dev *dev,
+static int buffer_activate (struct saa7146_dev *dev,
struct saa7146_buf *buf,
struct saa7146_buf *next)
{
@@ -1127,8 +1111,7 @@ int buffer_activate (struct saa7146_dev *dev,
return 0;
}
-static
-int buffer_prepare(struct file *file, struct videobuf_buffer *vb, enum v4l2_field field)
+static int buffer_prepare(struct file *file, struct videobuf_buffer *vb, enum v4l2_field field)
{
struct saa7146_fh *fh = file->private_data;
struct saa7146_dev *dev = fh->dev;
@@ -1206,8 +1189,7 @@ int buffer_prepare(struct file *file, struct videobuf_buffer *vb, enum v4l2_fiel
return err;
}
-static
-int buffer_setup(struct file *file, unsigned int *count, unsigned int *size)
+static int buffer_setup(struct file *file, unsigned int *count, unsigned int *size)
{
struct saa7146_fh *fh = file->private_data;
@@ -1226,8 +1208,7 @@ int buffer_setup(struct file *file, unsigned int *count, unsigned int *size)
return 0;
}
-static
-void buffer_queue(struct file *file, struct videobuf_buffer *vb)
+static void buffer_queue(struct file *file, struct videobuf_buffer *vb)
{
struct saa7146_fh *fh = file->private_data;
struct saa7146_dev *dev = fh->dev;
@@ -1239,8 +1220,7 @@ void buffer_queue(struct file *file, struct videobuf_buffer *vb)
}
-static
-void buffer_release(struct file *file, struct videobuf_buffer *vb)
+static void buffer_release(struct file *file, struct videobuf_buffer *vb)
{
struct saa7146_fh *fh = file->private_data;
struct saa7146_dev *dev = fh->dev;
@@ -1250,8 +1230,7 @@ void buffer_release(struct file *file, struct videobuf_buffer *vb)
saa7146_dma_free(dev,buf);
}
-static
-struct videobuf_queue_ops video_qops = {
+static struct videobuf_queue_ops video_qops = {
.buf_setup = buffer_setup,
.buf_prepare = buffer_prepare,
.buf_queue = buffer_queue,
@@ -1261,8 +1240,7 @@ struct videobuf_queue_ops video_qops = {
/********************************************************************************/
/* file operations */
-static
-void video_init(struct saa7146_dev *dev, struct saa7146_vv *vv)
+static void video_init(struct saa7146_dev *dev, struct saa7146_vv *vv)
{
INIT_LIST_HEAD(&vv->video_q.queue);
@@ -1280,8 +1258,7 @@ void video_init(struct saa7146_dev *dev, struct saa7146_vv *vv)
}
-static
-void video_open(struct saa7146_dev *dev, struct saa7146_fh *fh)
+static void video_open(struct saa7146_dev *dev, struct saa7146_fh *fh)
{
struct saa7146_format *sfmt;
@@ -1302,8 +1279,7 @@ void video_open(struct saa7146_dev *dev, struct saa7146_fh *fh)
}
-static
-void video_close(struct saa7146_dev *dev, struct saa7146_fh *fh, struct file *file)
+static void video_close(struct saa7146_dev *dev, struct saa7146_fh *fh, struct file *file)
{
struct saa7146_vv *vv = dev->vv_data;
unsigned long flags;
@@ -1324,8 +1300,7 @@ void video_close(struct saa7146_dev *dev, struct saa7146_fh *fh, struct file *fi
}
-static
-void video_irq_done(struct saa7146_dev *dev, unsigned long st)
+static void video_irq_done(struct saa7146_dev *dev, unsigned long st)
{
struct saa7146_vv *vv = dev->vv_data;
struct saa7146_dmaqueue *q = &vv->video_q;
@@ -1342,8 +1317,7 @@ void video_irq_done(struct saa7146_dev *dev, unsigned long st)
spin_unlock(&dev->slock);
}
-static
-ssize_t video_read(struct file *file, char *data, size_t count, loff_t *ppos)
+static ssize_t video_read(struct file *file, char *data, size_t count, loff_t *ppos)
{
struct saa7146_fh *fh = file->private_data;
struct saa7146_dev *dev = fh->dev;