Commit cfa89a3e authored by Michael Hunold's avatar Michael Hunold Committed by Linus Torvalds

[PATCH] clean up the parts according to the comments on kernel mailing list

clean up the parts according to the comments on kernel mailing list
(mainly by Christoph Hellwig)

 - ugly WRITE_RPS0 define in saa7146_hlp.c has been replaced by a proper
   inline (I hope)
 - use <linux/types.h> not <asm/types.h> everywhere
 - include <asm/*.h> headers after <linux/*.h> ones
 - revert the indentation from "static <newline> xxx to "static xxx"
parent ea40a8d8
...@@ -49,8 +49,7 @@ static void dump_registers(struct saa7146_dev* dev) ...@@ -49,8 +49,7 @@ static void dump_registers(struct saa7146_dev* dev)
****************************************************************************/ ****************************************************************************/
/* this is videobuf_vmalloc_to_sg() from video-buf.c */ /* this is videobuf_vmalloc_to_sg() from video-buf.c */
static static struct scatterlist* vmalloc_to_sg(unsigned char *virt, int nr_pages)
struct scatterlist* vmalloc_to_sg(unsigned char *virt, int nr_pages)
{ {
struct scatterlist *sglist; struct scatterlist *sglist;
struct page *pg; struct page *pg;
...@@ -255,8 +254,7 @@ static irqreturn_t interrupt_hw(int irq, void *dev_id, struct pt_regs *regs) ...@@ -255,8 +254,7 @@ static irqreturn_t interrupt_hw(int irq, void *dev_id, struct pt_regs *regs)
/*********************************************************************************/ /*********************************************************************************/
/* configuration-functions */ /* configuration-functions */
static static int saa7146_init_one(struct pci_dev *pci, const struct pci_device_id *ent)
int saa7146_init_one(struct pci_dev *pci, const struct pci_device_id *ent)
{ {
unsigned long adr = 0, len = 0; unsigned long adr = 0, len = 0;
struct saa7146_dev* dev = kmalloc (sizeof(struct saa7146_dev),GFP_KERNEL); struct saa7146_dev* dev = kmalloc (sizeof(struct saa7146_dev),GFP_KERNEL);
...@@ -418,8 +416,7 @@ int saa7146_init_one(struct pci_dev *pci, const struct pci_device_id *ent) ...@@ -418,8 +416,7 @@ int saa7146_init_one(struct pci_dev *pci, const struct pci_device_id *ent)
return err; return err;
} }
static static void saa7146_remove_one(struct pci_dev *pdev)
void saa7146_remove_one(struct pci_dev *pdev)
{ {
struct saa7146_dev* dev = (struct saa7146_dev*) pci_get_drvdata(pdev); struct saa7146_dev* dev = (struct saa7146_dev*) pci_get_drvdata(pdev);
DEB_EE(("dev:%p\n",dev)); DEB_EE(("dev:%p\n",dev));
...@@ -478,8 +475,7 @@ int saa7146_unregister_extension(struct saa7146_extension* ext) ...@@ -478,8 +475,7 @@ int saa7146_unregister_extension(struct saa7146_extension* ext)
return 0; return 0;
} }
static static int __init saa7146_init_module(void)
int __init saa7146_init_module(void)
{ {
if( 0 == initialized ) { if( 0 == initialized ) {
INIT_LIST_HEAD(&saa7146_devices); INIT_LIST_HEAD(&saa7146_devices);
...@@ -489,8 +485,7 @@ int __init saa7146_init_module(void) ...@@ -489,8 +485,7 @@ int __init saa7146_init_module(void)
return 0; return 0;
} }
static static void __exit saa7146_cleanup_module(void)
void __exit saa7146_cleanup_module(void)
{ {
} }
......
...@@ -144,8 +144,7 @@ void saa7146_buffer_timeout(unsigned long data) ...@@ -144,8 +144,7 @@ void saa7146_buffer_timeout(unsigned long data)
/********************************************************************************/ /********************************************************************************/
/* file operations */ /* file operations */
static static int fops_open(struct inode *inode, struct file *file)
int fops_open(struct inode *inode, struct file *file)
{ {
unsigned int minor = minor(inode->i_rdev); unsigned int minor = minor(inode->i_rdev);
struct saa7146_dev *h = NULL, *dev = NULL; struct saa7146_dev *h = NULL, *dev = NULL;
...@@ -463,15 +462,13 @@ int saa7146_unregister_device(struct video_device *vid, struct saa7146_dev* dev) ...@@ -463,15 +462,13 @@ int saa7146_unregister_device(struct video_device *vid, struct saa7146_dev* dev)
return 0; return 0;
} }
static static int __init saa7146_vv_init_module(void)
int __init saa7146_vv_init_module(void)
{ {
return 0; return 0;
} }
static static void __exit saa7146_vv_cleanup_module(void)
void __exit saa7146_vv_cleanup_module(void)
{ {
} }
......
...@@ -5,8 +5,7 @@ ...@@ -5,8 +5,7 @@
#define my_max(type,x,y) \ #define my_max(type,x,y) \
({ type __x = (x), __y = (y); __x > __y ? __x: __y; }) ({ type __x = (x), __y = (y); __x > __y ? __x: __y; })
static static void calculate_output_format_register(struct saa7146_dev* saa, u32 palette, u32* clip_format)
void calculate_output_format_register(struct saa7146_dev* saa, u32 palette, u32* clip_format)
{ {
/* clear out the necessary bits */ /* clear out the necessary bits */
*clip_format &= 0x0000ffff; *clip_format &= 0x0000ffff;
...@@ -14,21 +13,18 @@ void calculate_output_format_register(struct saa7146_dev* saa, u32 palette, u32* ...@@ -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)); *clip_format |= (( ((palette&0xf00)>>8) << 30) | ((palette&0x00f) << 24) | (((palette&0x0f0)>>4) << 16));
} }
static static void calculate_bcs_ctrl_register(struct saa7146_dev *dev, int brightness, int contrast, int colour, u32 *bcs_ctrl)
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)); *bcs_ctrl = ((brightness << 24) | (contrast << 16) | (colour << 0));
} }
static static void calculate_hps_source_and_sync(struct saa7146_dev *dev, int source, int sync, u32* hps_ctrl)
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 &= ~(MASK_30 | MASK_31 | MASK_28);
*hps_ctrl |= (source << 30) | (sync << 28); *hps_ctrl |= (source << 30) | (sync << 28);
} }
static static void calculate_hxo_and_hyo(struct saa7146_vv *vv, u32* hps_h_scale, u32* hps_ctrl)
void calculate_hxo_and_hyo(struct saa7146_vv *vv, u32* hps_h_scale, u32* hps_ctrl)
{ {
int hyo = 0, hxo = 0; int hyo = 0, hxo = 0;
...@@ -73,8 +69,7 @@ static struct { ...@@ -73,8 +69,7 @@ static struct {
u8 h_attenuation[] = { 1, 2, 4, 8, 2, 4, 8, 16, 0}; u8 h_attenuation[] = { 1, 2, 4, 8, 2, 4, 8, 16, 0};
/* calculate horizontal scale registers */ /* calculate horizontal scale registers */
static static int calculate_h_scale_registers(struct saa7146_dev *dev,
int calculate_h_scale_registers(struct saa7146_dev *dev,
int in_x, int out_x, int flip_lr, int in_x, int out_x, int flip_lr,
u32* hps_ctrl, u32* hps_v_gain, u32* hps_h_prescale, u32* hps_h_scale) u32* hps_ctrl, u32* hps_v_gain, u32* hps_h_prescale, u32* hps_h_scale)
{ {
...@@ -221,8 +216,7 @@ static struct { ...@@ -221,8 +216,7 @@ static struct {
u16 v_attenuation[] = { 2, 4, 8, 16, 32, 64, 128, 256, 0}; u16 v_attenuation[] = { 2, 4, 8, 16, 32, 64, 128, 256, 0};
/* calculate vertical scale registers */ /* calculate vertical scale registers */
static static int calculate_v_scale_registers(struct saa7146_dev *dev, enum v4l2_field field,
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 in_y, int out_y, u32* hps_v_scale, u32* hps_v_gain)
{ {
int lpi = 0; int lpi = 0;
...@@ -318,8 +312,7 @@ int calculate_v_scale_registers(struct saa7146_dev *dev, enum v4l2_field field, ...@@ -318,8 +312,7 @@ int calculate_v_scale_registers(struct saa7146_dev *dev, enum v4l2_field field,
} }
/* simple bubble-sort algorithm with duplicate elimination */ /* simple bubble-sort algorithm with duplicate elimination */
static static int sort_and_eliminate(u32* values, int* count)
int sort_and_eliminate(u32* values, int* count)
{ {
int low = 0, high = 0, top = 0, temp = 0; int low = 0, high = 0, top = 0, temp = 0;
int cur = 0, next = 0; int cur = 0, next = 0;
...@@ -351,8 +344,7 @@ int sort_and_eliminate(u32* values, int* count) ...@@ -351,8 +344,7 @@ int sort_and_eliminate(u32* values, int* count)
return 0; return 0;
} }
static static void calculate_clipping_registers_rect(struct saa7146_dev *dev, struct saa7146_fh *fh,
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_video_dma *vdma2, u32* clip_format, u32* arbtr_ctrl, enum v4l2_field field)
{ {
struct saa7146_vv *vv = dev->vv_data; struct saa7146_vv *vv = dev->vv_data;
...@@ -484,8 +476,7 @@ void calculate_clipping_registers_rect(struct saa7146_dev *dev, struct saa7146_f ...@@ -484,8 +476,7 @@ void calculate_clipping_registers_rect(struct saa7146_dev *dev, struct saa7146_f
} }
/* disable clipping */ /* disable clipping */
static static void saa7146_disable_clipping(struct saa7146_dev *dev)
void saa7146_disable_clipping(struct saa7146_dev *dev)
{ {
u32 clip_format = saa7146_read(dev, CLIP_FORMAT_CTRL); u32 clip_format = saa7146_read(dev, CLIP_FORMAT_CTRL);
...@@ -500,8 +491,7 @@ void saa7146_disable_clipping(struct saa7146_dev *dev) ...@@ -500,8 +491,7 @@ void saa7146_disable_clipping(struct saa7146_dev *dev)
saa7146_write(dev, MC1, (MASK_21)); saa7146_write(dev, MC1, (MASK_21));
} }
static static void saa7146_set_clipping_rect(struct saa7146_dev *dev, struct saa7146_fh *fh)
void saa7146_set_clipping_rect(struct saa7146_dev *dev, struct saa7146_fh *fh)
{ {
enum v4l2_field field = fh->ov.win.field; enum v4l2_field field = fh->ov.win.field;
int clipcount = fh->ov.nclips; int clipcount = fh->ov.nclips;
...@@ -543,8 +533,7 @@ void saa7146_set_clipping_rect(struct saa7146_dev *dev, struct saa7146_fh *fh) ...@@ -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)); saa7146_write(dev, MC1, (MASK_05 | MASK_21));
} }
static static void saa7146_set_window(struct saa7146_dev *dev, int width, int height, enum v4l2_field field)
void saa7146_set_window(struct saa7146_dev *dev, int width, int height, enum v4l2_field field)
{ {
struct saa7146_vv *vv = dev->vv_data; 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 ...@@ -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 */ /* calculate the new memory offsets for a desired position */
static static void saa7146_set_position(struct saa7146_dev *dev, int w_x, int w_y, int w_height, enum v4l2_field field)
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; 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 ...@@ -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); saa7146_write_out_dma(dev, 1, &vdma1);
} }
static static void saa7146_set_output_format(struct saa7146_dev *dev, unsigned long palette)
void saa7146_set_output_format(struct saa7146_dev *dev, unsigned long palette)
{ {
u32 clip_format = saa7146_read(dev, CLIP_FORMAT_CTRL); 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 ...@@ -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); printk("vdma%d.num_line_byte: 0x%08x\n", which,vdma->num_line_byte);
*/ */
} }
static static int calculate_video_dma_grab_packed(struct saa7146_dev* dev, struct saa7146_buf *buf)
int calculate_video_dma_grab_packed(struct saa7146_dev* dev, struct saa7146_buf *buf)
{ {
struct saa7146_vv *vv = dev->vv_data; struct saa7146_vv *vv = dev->vv_data;
struct saa7146_video_dma vdma1; struct saa7146_video_dma vdma1;
...@@ -791,8 +777,7 @@ int calculate_video_dma_grab_packed(struct saa7146_dev* dev, struct saa7146_buf ...@@ -791,8 +777,7 @@ int calculate_video_dma_grab_packed(struct saa7146_dev* dev, struct saa7146_buf
return 0; return 0;
} }
static static int calc_planar_422(struct saa7146_vv *vv, struct saa7146_buf *buf, struct saa7146_video_dma *vdma2, struct saa7146_video_dma *vdma3)
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 height = buf->fmt->height;
int width = buf->fmt->width; int width = buf->fmt->width;
...@@ -822,8 +807,7 @@ int calc_planar_422(struct saa7146_vv *vv, struct saa7146_buf *buf, struct saa71 ...@@ -822,8 +807,7 @@ int calc_planar_422(struct saa7146_vv *vv, struct saa7146_buf *buf, struct saa71
return 0; return 0;
} }
static static int calc_planar_420(struct saa7146_vv *vv, struct saa7146_buf *buf, struct saa7146_video_dma *vdma2, struct saa7146_video_dma *vdma3)
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 height = buf->fmt->height;
int width = buf->fmt->width; int width = buf->fmt->width;
...@@ -853,8 +837,7 @@ int calc_planar_420(struct saa7146_vv *vv, struct saa7146_buf *buf, struct saa71 ...@@ -853,8 +837,7 @@ int calc_planar_420(struct saa7146_vv *vv, struct saa7146_buf *buf, struct saa71
} }
static static int calculate_video_dma_grab_planar(struct saa7146_dev* dev, struct saa7146_buf *buf)
int calculate_video_dma_grab_planar(struct saa7146_dev* dev, struct saa7146_buf *buf)
{ {
struct saa7146_vv *vv = dev->vv_data; struct saa7146_vv *vv = dev->vv_data;
struct saa7146_video_dma vdma1; struct saa7146_video_dma vdma1;
...@@ -949,13 +932,9 @@ int calculate_video_dma_grab_planar(struct saa7146_dev* dev, struct saa7146_buf ...@@ -949,13 +932,9 @@ int calculate_video_dma_grab_planar(struct saa7146_dev* dev, struct saa7146_buf
return 0; 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; 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 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; 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) ...@@ -966,9 +945,6 @@ void program_capture_engine(struct saa7146_dev *dev, int planar)
o_wait = tmp; 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*/ /* 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 | e_wait);
WRITE_RPS0(CMD_PAUSE | CMD_OAN | CMD_SIG0 | o_wait); WRITE_RPS0(CMD_PAUSE | CMD_OAN | CMD_SIG0 | o_wait);
......
#include <media/saa7146_vv.h> #include <media/saa7146_vv.h>
/* helper function */ /* helper function */
static static void my_wait(struct saa7146_dev *dev, long ms)
void my_wait(struct saa7146_dev *dev, long ms)
{ {
set_current_state(TASK_INTERRUPTIBLE); set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout((((ms+10)/10)*HZ)/1000); schedule_timeout((((ms+10)/10)*HZ)/1000);
...@@ -19,8 +18,7 @@ u32 saa7146_i2c_func(struct i2c_adapter *adapter) ...@@ -19,8 +18,7 @@ u32 saa7146_i2c_func(struct i2c_adapter *adapter)
} }
/* this function returns the status-register of our i2c-device */ /* this function returns the status-register of our i2c-device */
static inline static inline u32 saa7146_i2c_status(struct saa7146_dev *dev)
u32 saa7146_i2c_status(struct saa7146_dev *dev)
{ {
u32 iicsta = saa7146_read(dev, I2C_STATUS); u32 iicsta = saa7146_read(dev, I2C_STATUS);
/* /*
...@@ -33,8 +31,7 @@ u32 saa7146_i2c_status(struct saa7146_dev *dev) ...@@ -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 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 to understand this. it returns the number of u32s to send, or -1
in case of an error. */ in case of an error. */
static static int saa7146_i2c_msg_prepare(const struct i2c_msg m[], int num, u32 *op)
int saa7146_i2c_msg_prepare(const struct i2c_msg m[], int num, u32 *op)
{ {
int h1, h2; int h1, h2;
int i, j, addr; int i, j, addr;
...@@ -98,8 +95,7 @@ int saa7146_i2c_msg_prepare(const struct i2c_msg m[], int num, u32 *op) ...@@ -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 which bytes were read through the adapter and write them back to the corresponding
i2c-message. but instead, we simply write back all bytes. i2c-message. but instead, we simply write back all bytes.
fixme: this could be improved. */ fixme: this could be improved. */
static static int saa7146_i2c_msg_cleanup(const struct i2c_msg m[], int num, u32 *op)
int saa7146_i2c_msg_cleanup(const struct i2c_msg m[], int num, u32 *op)
{ {
int i, j; int i, j;
int op_count = 0; int op_count = 0;
...@@ -121,8 +117,7 @@ int saa7146_i2c_msg_cleanup(const struct i2c_msg m[], int num, u32 *op) ...@@ -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 */ /* this functions resets the i2c-device and returns 0 if everything was fine, otherwise -1 */
static static int saa7146_i2c_reset(struct saa7146_dev *dev)
int saa7146_i2c_reset(struct saa7146_dev *dev)
{ {
/* get current status */ /* get current status */
u32 status = saa7146_i2c_status(dev); u32 status = saa7146_i2c_status(dev);
...@@ -186,8 +181,7 @@ int saa7146_i2c_reset(struct saa7146_dev *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. /* 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 it returns 0 if ok, -1 if the transfer failed, -2 if the transfer
failed badly (e.g. address error) */ failed badly (e.g. address error) */
static static int saa7146_i2c_writeout(struct saa7146_dev *dev, u32* dword)
int saa7146_i2c_writeout(struct saa7146_dev *dev, u32* dword)
{ {
u32 status = 0, mc2 = 0; u32 status = 0, mc2 = 0;
int timeout; int timeout;
...@@ -373,8 +367,7 @@ int saa7146_i2c_transfer(struct saa7146_dev *dev, const struct i2c_msg msgs[], i ...@@ -373,8 +367,7 @@ int saa7146_i2c_transfer(struct saa7146_dev *dev, const struct i2c_msg msgs[], i
} }
/* utility functions */ /* utility functions */
static static int saa7146_i2c_xfer(struct i2c_adapter* adapter, struct i2c_msg msg[], int num)
int saa7146_i2c_xfer(struct i2c_adapter* adapter, struct i2c_msg msg[], int num)
{ {
struct saa7146_dev* dev = i2c_get_adapdata(adapter); struct saa7146_dev* dev = i2c_get_adapdata(adapter);
...@@ -388,8 +381,7 @@ int saa7146_i2c_xfer(struct i2c_adapter* adapter, struct i2c_msg msg[], int num) ...@@ -388,8 +381,7 @@ int saa7146_i2c_xfer(struct i2c_adapter* adapter, struct i2c_msg msg[], int num)
#include <linux/i2c-id.h> #include <linux/i2c-id.h>
/* exported algorithm data */ /* exported algorithm data */
static static struct i2c_algorithm saa7146_algo = {
struct i2c_algorithm saa7146_algo = {
.name = "saa7146 i2c algorithm", .name = "saa7146 i2c algorithm",
.id = I2C_ALGO_SAA7146, .id = I2C_ALGO_SAA7146,
.master_xfer = saa7146_i2c_xfer, .master_xfer = saa7146_i2c_xfer,
......
...@@ -2,17 +2,14 @@ ...@@ -2,17 +2,14 @@
static int vbi_pixel_to_capture = 720 * 2; 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; struct saa7146_vv *vv = dev->vv_data;
u32 *cpu; u32 *cpu;
dma_addr_t dma_addr; dma_addr_t dma_addr;
int i, count; int i;
DECLARE_WAITQUEUE(wait, current); DECLARE_WAITQUEUE(wait, current);
...@@ -36,19 +33,6 @@ int vbi_workaround(struct saa7146_dev *dev) ...@@ -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, NUM_LINE_BYTE3, (2<<16)|((vbi_pixel_to_capture)<<0));
saa7146_write(dev, MC2, MASK_04|MASK_20); 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 */ /* load brs-control register */
WRITE_RPS1(CMD_WR_REG | (1 << 8) | (BRS_CTRL/4)); WRITE_RPS1(CMD_WR_REG | (1 << 8) | (BRS_CTRL/4));
/* BXO = 1h, BRS to outbound */ /* BXO = 1h, BRS to outbound */
...@@ -85,6 +69,16 @@ int vbi_workaround(struct saa7146_dev *dev) ...@@ -85,6 +69,16 @@ int vbi_workaround(struct saa7146_dev *dev)
/* stop rps1 */ /* stop rps1 */
WRITE_RPS1(CMD_STOP); 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 */ /* enable rps1 irqs */
IER_ENABLE(dev,MASK_28); IER_ENABLE(dev,MASK_28);
...@@ -194,8 +188,7 @@ void saa7146_set_vbi_capture(struct saa7146_dev *dev, struct saa7146_buf *buf, s ...@@ -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)); saa7146_write(dev, MC1, (MASK_13 | MASK_29));
} }
static static int buffer_activate(struct saa7146_dev *dev,
int buffer_activate(struct saa7146_dev *dev,
struct saa7146_buf *buf, struct saa7146_buf *buf,
struct saa7146_buf *next) struct saa7146_buf *next)
{ {
...@@ -209,8 +202,7 @@ int buffer_activate(struct saa7146_dev *dev, ...@@ -209,8 +202,7 @@ int buffer_activate(struct saa7146_dev *dev,
return 0; return 0;
} }
static static int buffer_prepare(struct file *file, struct videobuf_buffer *vb,enum v4l2_field field)
int buffer_prepare(struct file *file, struct videobuf_buffer *vb,enum v4l2_field field)
{ {
struct saa7146_fh *fh = file->private_data; struct saa7146_fh *fh = file->private_data;
struct saa7146_dev *dev = fh->dev; struct saa7146_dev *dev = fh->dev;
...@@ -259,8 +251,7 @@ int buffer_prepare(struct file *file, struct videobuf_buffer *vb,enum v4l2_field ...@@ -259,8 +251,7 @@ int buffer_prepare(struct file *file, struct videobuf_buffer *vb,enum v4l2_field
return err; return err;
} }
static int static int buffer_setup(struct file *file, unsigned int *count, unsigned int *size)
buffer_setup(struct file *file, unsigned int *count, unsigned int *size)
{ {
int llength,lines; int llength,lines;
...@@ -275,8 +266,7 @@ buffer_setup(struct file *file, unsigned int *count, unsigned int *size) ...@@ -275,8 +266,7 @@ buffer_setup(struct file *file, unsigned int *count, unsigned int *size)
return 0; return 0;
} }
static static void buffer_queue(struct file *file, struct videobuf_buffer *vb)
void buffer_queue(struct file *file, struct videobuf_buffer *vb)
{ {
struct saa7146_fh *fh = file->private_data; struct saa7146_fh *fh = file->private_data;
struct saa7146_dev *dev = fh->dev; struct saa7146_dev *dev = fh->dev;
...@@ -287,8 +277,7 @@ void buffer_queue(struct file *file, struct videobuf_buffer *vb) ...@@ -287,8 +277,7 @@ void buffer_queue(struct file *file, struct videobuf_buffer *vb)
saa7146_buffer_queue(dev,&vv->vbi_q,buf); saa7146_buffer_queue(dev,&vv->vbi_q,buf);
} }
static static void buffer_release(struct file *file, struct videobuf_buffer *vb)
void buffer_release(struct file *file, struct videobuf_buffer *vb)
{ {
struct saa7146_fh *fh = file->private_data; struct saa7146_fh *fh = file->private_data;
struct saa7146_dev *dev = fh->dev; struct saa7146_dev *dev = fh->dev;
...@@ -298,8 +287,7 @@ void buffer_release(struct file *file, struct videobuf_buffer *vb) ...@@ -298,8 +287,7 @@ void buffer_release(struct file *file, struct videobuf_buffer *vb)
saa7146_dma_free(dev,buf); saa7146_dma_free(dev,buf);
} }
static static struct videobuf_queue_ops vbi_qops = {
struct videobuf_queue_ops vbi_qops = {
.buf_setup = buffer_setup, .buf_setup = buffer_setup,
.buf_prepare = buffer_prepare, .buf_prepare = buffer_prepare,
.buf_queue = buffer_queue, .buf_queue = buffer_queue,
...@@ -308,8 +296,7 @@ struct videobuf_queue_ops vbi_qops = { ...@@ -308,8 +296,7 @@ struct videobuf_queue_ops vbi_qops = {
/* ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ */
static static void vbi_stop(struct saa7146_fh *fh)
void vbi_stop(struct saa7146_fh *fh)
{ {
struct saa7146_dev *dev = fh->dev; struct saa7146_dev *dev = fh->dev;
struct saa7146_vv *vv = dev->vv_data; struct saa7146_vv *vv = dev->vv_data;
...@@ -331,8 +318,7 @@ void vbi_stop(struct saa7146_fh *fh) ...@@ -331,8 +318,7 @@ void vbi_stop(struct saa7146_fh *fh)
spin_unlock_irqrestore(&dev->slock, flags); spin_unlock_irqrestore(&dev->slock, flags);
} }
static static void vbi_read_timeout(unsigned long data)
void vbi_read_timeout(unsigned long data)
{ {
struct saa7146_fh *fh = (struct saa7146_fh *)data; struct saa7146_fh *fh = (struct saa7146_fh *)data;
struct saa7146_dev *dev = fh->dev; struct saa7146_dev *dev = fh->dev;
...@@ -342,8 +328,7 @@ void vbi_read_timeout(unsigned long data) ...@@ -342,8 +328,7 @@ void vbi_read_timeout(unsigned long data)
vbi_stop(fh); vbi_stop(fh);
} }
static static void vbi_init(struct saa7146_dev *dev, struct saa7146_vv *vv)
void vbi_init(struct saa7146_dev *dev, struct saa7146_vv *vv)
{ {
DEB_VBI(("dev:%p\n",dev)); DEB_VBI(("dev:%p\n",dev));
...@@ -357,8 +342,7 @@ void vbi_init(struct saa7146_dev *dev, struct saa7146_vv *vv) ...@@ -357,8 +342,7 @@ void vbi_init(struct saa7146_dev *dev, struct saa7146_vv *vv)
init_waitqueue_head(&vv->vbi_wq); init_waitqueue_head(&vv->vbi_wq);
} }
static static void vbi_open(struct saa7146_dev *dev, struct saa7146_fh *fh)
void vbi_open(struct saa7146_dev *dev, struct saa7146_fh *fh)
{ {
DEB_VBI(("dev:%p, fh:%p\n",dev,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) ...@@ -389,8 +373,7 @@ void vbi_open(struct saa7146_dev *dev, struct saa7146_fh *fh)
vbi_workaround(dev); vbi_workaround(dev);
} }
static static void vbi_close(struct saa7146_dev *dev, struct saa7146_fh *fh, struct file *file)
void vbi_close(struct saa7146_dev *dev, struct saa7146_fh *fh, struct file *file)
{ {
struct saa7146_vv *vv = dev->vv_data; struct saa7146_vv *vv = dev->vv_data;
DEB_VBI(("dev:%p, fh:%p\n",dev,fh)); 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 ...@@ -400,8 +383,7 @@ void vbi_close(struct saa7146_dev *dev, struct saa7146_fh *fh, struct file *file
} }
} }
static static void vbi_irq_done(struct saa7146_dev *dev, unsigned long status)
void vbi_irq_done(struct saa7146_dev *dev, unsigned long status)
{ {
struct saa7146_vv *vv = dev->vv_data; struct saa7146_vv *vv = dev->vv_data;
spin_lock(&dev->slock); spin_lock(&dev->slock);
...@@ -420,8 +402,7 @@ void vbi_irq_done(struct saa7146_dev *dev, unsigned long status) ...@@ -420,8 +402,7 @@ void vbi_irq_done(struct saa7146_dev *dev, unsigned long status)
spin_unlock(&dev->slock); spin_unlock(&dev->slock);
} }
static static ssize_t vbi_read(struct file *file, char *data, size_t count, loff_t *ppos)
ssize_t vbi_read(struct file *file, char *data, size_t count, loff_t *ppos)
{ {
struct saa7146_fh *fh = file->private_data; struct saa7146_fh *fh = file->private_data;
struct saa7146_dev *dev = fh->dev; struct saa7146_dev *dev = fh->dev;
......
#include <media/saa7146_vv.h> #include <media/saa7146_vv.h>
static static int memory = 32;
int memory = 32;
MODULE_PARM(memory,"i"); MODULE_PARM(memory,"i");
MODULE_PARM_DESC(memory, "maximum memory usage for capture buffers (default: 32Mb)"); MODULE_PARM_DESC(memory, "maximum memory usage for capture buffers (default: 32Mb)");
/* format descriptions for capture and preview */ /* format descriptions for capture and preview */
static static struct saa7146_format formats[] = {
struct saa7146_format formats[] = {
{ {
.name = "RGB-8 (3-3-2)", .name = "RGB-8 (3-3-2)",
.pixelformat = V4L2_PIX_FMT_RGB332, .pixelformat = V4L2_PIX_FMT_RGB332,
...@@ -63,8 +61,7 @@ struct saa7146_format formats[] = { ...@@ -63,8 +61,7 @@ struct saa7146_format formats[] = {
due to this, it's impossible to provide additional *packed* formats, which are simply byte swapped due to this, it's impossible to provide additional *packed* formats, which are simply byte swapped
(like V4L2_PIX_FMT_YUYV) ... 8-( */ (like V4L2_PIX_FMT_YUYV) ... 8-( */
static static int NUM_FORMATS = sizeof(formats)/sizeof(struct saa7146_format);
int NUM_FORMATS = sizeof(formats)/sizeof(struct saa7146_format);
struct saa7146_format* format_by_fourcc(struct saa7146_dev *dev, int fourcc) 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) ...@@ -80,8 +77,7 @@ struct saa7146_format* format_by_fourcc(struct saa7146_dev *dev, int fourcc)
return NULL; return NULL;
} }
static static int g_fmt(struct saa7146_fh *fh, struct v4l2_format *f)
int g_fmt(struct saa7146_fh *fh, struct v4l2_format *f)
{ {
struct saa7146_dev *dev = fh->dev; struct saa7146_dev *dev = fh->dev;
DEB_EE(("dev:%p, fh:%p\n",dev,fh)); DEB_EE(("dev:%p, fh:%p\n",dev,fh));
...@@ -104,8 +100,7 @@ int g_fmt(struct saa7146_fh *fh, struct v4l2_format *f) ...@@ -104,8 +100,7 @@ int g_fmt(struct saa7146_fh *fh, struct v4l2_format *f)
} }
} }
static static int try_win(struct saa7146_dev *dev, struct v4l2_window *win)
int try_win(struct saa7146_dev *dev, struct v4l2_window *win)
{ {
struct saa7146_vv *vv = dev->vv_data; struct saa7146_vv *vv = dev->vv_data;
enum v4l2_field field; enum v4l2_field field;
...@@ -161,8 +156,7 @@ int try_win(struct saa7146_dev *dev, struct v4l2_window *win) ...@@ -161,8 +156,7 @@ int try_win(struct saa7146_dev *dev, struct v4l2_window *win)
return 0; return 0;
} }
static static int try_fmt(struct saa7146_fh *fh, struct v4l2_format *f)
int try_fmt(struct saa7146_fh *fh, struct v4l2_format *f)
{ {
struct saa7146_dev *dev = fh->dev; struct saa7146_dev *dev = fh->dev;
struct saa7146_vv *vv = dev->vv_data; struct saa7146_vv *vv = dev->vv_data;
...@@ -226,8 +220,7 @@ int try_fmt(struct saa7146_fh *fh, struct v4l2_format *f) ...@@ -226,8 +220,7 @@ int try_fmt(struct saa7146_fh *fh, struct v4l2_format *f)
} }
} }
static static int start_preview(struct saa7146_fh *fh)
int start_preview(struct saa7146_fh *fh)
{ {
struct saa7146_dev *dev = fh->dev; struct saa7146_dev *dev = fh->dev;
struct saa7146_vv *vv = dev->vv_data; struct saa7146_vv *vv = dev->vv_data;
...@@ -273,8 +266,7 @@ int start_preview(struct saa7146_fh *fh) ...@@ -273,8 +266,7 @@ int start_preview(struct saa7146_fh *fh)
return 0; return 0;
} }
static static int stop_preview(struct saa7146_fh *fh)
int stop_preview(struct saa7146_fh *fh)
{ {
struct saa7146_dev *dev = fh->dev; struct saa7146_dev *dev = fh->dev;
struct saa7146_vv *vv = dev->vv_data; struct saa7146_vv *vv = dev->vv_data;
...@@ -298,8 +290,7 @@ int stop_preview(struct saa7146_fh *fh) ...@@ -298,8 +290,7 @@ int stop_preview(struct saa7146_fh *fh)
return 0; return 0;
} }
static static int s_fmt(struct saa7146_fh *fh, struct v4l2_format *f)
int s_fmt(struct saa7146_fh *fh, struct v4l2_format *f)
{ {
struct saa7146_dev *dev = fh->dev; struct saa7146_dev *dev = fh->dev;
struct saa7146_vv *vv = dev->vv_data; struct saa7146_vv *vv = dev->vv_data;
...@@ -358,8 +349,7 @@ int s_fmt(struct saa7146_fh *fh, struct v4l2_format *f) ...@@ -358,8 +349,7 @@ int s_fmt(struct saa7146_fh *fh, struct v4l2_format *f)
/********************************************************************************/ /********************************************************************************/
/* device controls */ /* device controls */
static static struct v4l2_queryctrl controls[] = {
struct v4l2_queryctrl controls[] = {
{ {
id: V4L2_CID_BRIGHTNESS, id: V4L2_CID_BRIGHTNESS,
name: "Brightness", name: "Brightness",
...@@ -398,13 +388,11 @@ struct v4l2_queryctrl controls[] = { ...@@ -398,13 +388,11 @@ struct v4l2_queryctrl controls[] = {
type: V4L2_CTRL_TYPE_BOOLEAN, type: V4L2_CTRL_TYPE_BOOLEAN,
}, },
}; };
static static int NUM_CONTROLS = sizeof(controls)/sizeof(struct v4l2_queryctrl);
int NUM_CONTROLS = sizeof(controls)/sizeof(struct v4l2_queryctrl);
#define V4L2_CID_PRIVATE_LASTP1 (V4L2_CID_PRIVATE_BASE + 0) #define V4L2_CID_PRIVATE_LASTP1 (V4L2_CID_PRIVATE_BASE + 0)
static static struct v4l2_queryctrl* ctrl_by_id(int id)
struct v4l2_queryctrl* ctrl_by_id(int id)
{ {
int i; int i;
...@@ -414,8 +402,7 @@ struct v4l2_queryctrl* ctrl_by_id(int id) ...@@ -414,8 +402,7 @@ struct v4l2_queryctrl* ctrl_by_id(int id)
return NULL; return NULL;
} }
static static int get_control(struct saa7146_fh *fh, struct v4l2_control *c)
int get_control(struct saa7146_fh *fh, struct v4l2_control *c)
{ {
struct saa7146_dev *dev = fh->dev; struct saa7146_dev *dev = fh->dev;
struct saa7146_vv *vv = dev->vv_data; struct saa7146_vv *vv = dev->vv_data;
...@@ -457,8 +444,7 @@ int get_control(struct saa7146_fh *fh, struct v4l2_control *c) ...@@ -457,8 +444,7 @@ int get_control(struct saa7146_fh *fh, struct v4l2_control *c)
return 0; return 0;
} }
static static int set_control(struct saa7146_fh *fh, struct v4l2_control *c)
int set_control(struct saa7146_fh *fh, struct v4l2_control *c)
{ {
struct saa7146_dev *dev = fh->dev; struct saa7146_dev *dev = fh->dev;
struct saa7146_vv *vv = dev->vv_data; struct saa7146_vv *vv = dev->vv_data;
...@@ -548,8 +534,7 @@ int set_control(struct saa7146_fh *fh, struct v4l2_control *c) ...@@ -548,8 +534,7 @@ int set_control(struct saa7146_fh *fh, struct v4l2_control *c)
/********************************************************************************/ /********************************************************************************/
/* common pagetable functions */ /* common pagetable functions */
static static int saa7146_pgtable_build(struct saa7146_dev *dev, struct saa7146_buf *buf)
int saa7146_pgtable_build(struct saa7146_dev *dev, struct saa7146_buf *buf)
{ {
struct pci_dev *pci = dev->pci; struct pci_dev *pci = dev->pci;
struct scatterlist *list = buf->vb.dma.sglist; struct scatterlist *list = buf->vb.dma.sglist;
...@@ -667,8 +652,7 @@ int saa7146_pgtable_build(struct saa7146_dev *dev, struct saa7146_buf *buf) ...@@ -667,8 +652,7 @@ int saa7146_pgtable_build(struct saa7146_dev *dev, struct saa7146_buf *buf)
/********************************************************************************/ /********************************************************************************/
/* file operations */ /* file operations */
static static int video_begin(struct saa7146_fh *fh)
int video_begin(struct saa7146_fh *fh)
{ {
struct saa7146_dev *dev = fh->dev; struct saa7146_dev *dev = fh->dev;
struct saa7146_vv *vv = dev->vv_data; struct saa7146_vv *vv = dev->vv_data;
...@@ -701,8 +685,7 @@ int video_begin(struct saa7146_fh *fh) ...@@ -701,8 +685,7 @@ int video_begin(struct saa7146_fh *fh)
return 0; return 0;
} }
static static int video_end(struct saa7146_fh *fh)
int video_end(struct saa7146_fh *fh)
{ {
struct saa7146_dev *dev = fh->dev; struct saa7146_dev *dev = fh->dev;
struct saa7146_vv *vv = dev->vv_data; struct saa7146_vv *vv = dev->vv_data;
...@@ -1115,8 +1098,7 @@ int saa7146_video_do_ioctl(struct inode *inode, struct file *file, unsigned int ...@@ -1115,8 +1098,7 @@ int saa7146_video_do_ioctl(struct inode *inode, struct file *file, unsigned int
/*********************************************************************************/ /*********************************************************************************/
/* buffer handling functions */ /* buffer handling functions */
static static int buffer_activate (struct saa7146_dev *dev,
int buffer_activate (struct saa7146_dev *dev,
struct saa7146_buf *buf, struct saa7146_buf *buf,
struct saa7146_buf *next) struct saa7146_buf *next)
{ {
...@@ -1129,8 +1111,7 @@ int buffer_activate (struct saa7146_dev *dev, ...@@ -1129,8 +1111,7 @@ int buffer_activate (struct saa7146_dev *dev,
return 0; return 0;
} }
static static int buffer_prepare(struct file *file, struct videobuf_buffer *vb, enum v4l2_field field)
int buffer_prepare(struct file *file, struct videobuf_buffer *vb, enum v4l2_field field)
{ {
struct saa7146_fh *fh = file->private_data; struct saa7146_fh *fh = file->private_data;
struct saa7146_dev *dev = fh->dev; struct saa7146_dev *dev = fh->dev;
...@@ -1208,8 +1189,7 @@ int buffer_prepare(struct file *file, struct videobuf_buffer *vb, enum v4l2_fiel ...@@ -1208,8 +1189,7 @@ int buffer_prepare(struct file *file, struct videobuf_buffer *vb, enum v4l2_fiel
return err; return err;
} }
static static int buffer_setup(struct file *file, unsigned int *count, unsigned int *size)
int buffer_setup(struct file *file, unsigned int *count, unsigned int *size)
{ {
struct saa7146_fh *fh = file->private_data; struct saa7146_fh *fh = file->private_data;
...@@ -1228,8 +1208,7 @@ int buffer_setup(struct file *file, unsigned int *count, unsigned int *size) ...@@ -1228,8 +1208,7 @@ int buffer_setup(struct file *file, unsigned int *count, unsigned int *size)
return 0; return 0;
} }
static static void buffer_queue(struct file *file, struct videobuf_buffer *vb)
void buffer_queue(struct file *file, struct videobuf_buffer *vb)
{ {
struct saa7146_fh *fh = file->private_data; struct saa7146_fh *fh = file->private_data;
struct saa7146_dev *dev = fh->dev; struct saa7146_dev *dev = fh->dev;
...@@ -1241,8 +1220,7 @@ void buffer_queue(struct file *file, struct videobuf_buffer *vb) ...@@ -1241,8 +1220,7 @@ void buffer_queue(struct file *file, struct videobuf_buffer *vb)
} }
static static void buffer_release(struct file *file, struct videobuf_buffer *vb)
void buffer_release(struct file *file, struct videobuf_buffer *vb)
{ {
struct saa7146_fh *fh = file->private_data; struct saa7146_fh *fh = file->private_data;
struct saa7146_dev *dev = fh->dev; struct saa7146_dev *dev = fh->dev;
...@@ -1252,8 +1230,7 @@ void buffer_release(struct file *file, struct videobuf_buffer *vb) ...@@ -1252,8 +1230,7 @@ void buffer_release(struct file *file, struct videobuf_buffer *vb)
saa7146_dma_free(dev,buf); saa7146_dma_free(dev,buf);
} }
static static struct videobuf_queue_ops video_qops = {
struct videobuf_queue_ops video_qops = {
.buf_setup = buffer_setup, .buf_setup = buffer_setup,
.buf_prepare = buffer_prepare, .buf_prepare = buffer_prepare,
.buf_queue = buffer_queue, .buf_queue = buffer_queue,
...@@ -1263,8 +1240,7 @@ struct videobuf_queue_ops video_qops = { ...@@ -1263,8 +1240,7 @@ struct videobuf_queue_ops video_qops = {
/********************************************************************************/ /********************************************************************************/
/* file operations */ /* file operations */
static static void video_init(struct saa7146_dev *dev, struct saa7146_vv *vv)
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);
...@@ -1282,8 +1258,7 @@ void video_init(struct saa7146_dev *dev, struct saa7146_vv *vv) ...@@ -1282,8 +1258,7 @@ void video_init(struct saa7146_dev *dev, struct saa7146_vv *vv)
} }
static static void video_open(struct saa7146_dev *dev, struct saa7146_fh *fh)
void video_open(struct saa7146_dev *dev, struct saa7146_fh *fh)
{ {
struct saa7146_format *sfmt; struct saa7146_format *sfmt;
...@@ -1304,8 +1279,7 @@ void video_open(struct saa7146_dev *dev, struct saa7146_fh *fh) ...@@ -1304,8 +1279,7 @@ void video_open(struct saa7146_dev *dev, struct saa7146_fh *fh)
} }
static static void video_close(struct saa7146_dev *dev, struct saa7146_fh *fh, struct file *file)
void video_close(struct saa7146_dev *dev, struct saa7146_fh *fh, struct file *file)
{ {
struct saa7146_vv *vv = dev->vv_data; struct saa7146_vv *vv = dev->vv_data;
unsigned long flags; unsigned long flags;
...@@ -1326,8 +1300,7 @@ void video_close(struct saa7146_dev *dev, struct saa7146_fh *fh, struct file *fi ...@@ -1326,8 +1300,7 @@ void video_close(struct saa7146_dev *dev, struct saa7146_fh *fh, struct file *fi
} }
static static void video_irq_done(struct saa7146_dev *dev, unsigned long st)
void video_irq_done(struct saa7146_dev *dev, unsigned long st)
{ {
struct saa7146_vv *vv = dev->vv_data; struct saa7146_vv *vv = dev->vv_data;
struct saa7146_dmaqueue *q = &vv->video_q; struct saa7146_dmaqueue *q = &vv->video_q;
...@@ -1344,8 +1317,7 @@ void video_irq_done(struct saa7146_dev *dev, unsigned long st) ...@@ -1344,8 +1317,7 @@ void video_irq_done(struct saa7146_dev *dev, unsigned long st)
spin_unlock(&dev->slock); spin_unlock(&dev->slock);
} }
static static ssize_t video_read(struct file *file, char *data, size_t count, loff_t *ppos)
ssize_t video_read(struct file *file, char *data, size_t count, loff_t *ppos)
{ {
struct saa7146_fh *fh = file->private_data; struct saa7146_fh *fh = file->private_data;
struct saa7146_dev *dev = fh->dev; struct saa7146_dev *dev = fh->dev;
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#ifndef __DEMUX_H #ifndef __DEMUX_H
#define __DEMUX_H #define __DEMUX_H
#include <asm/types.h> #include <linux/types.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/list.h> #include <linux/list.h>
#include <linux/time.h> #include <linux/time.h>
......
...@@ -21,8 +21,6 @@ ...@@ -21,8 +21,6 @@
* *
*/ */
#include <asm/uaccess.h>
#include <asm/system.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/vmalloc.h> #include <linux/vmalloc.h>
...@@ -31,6 +29,8 @@ ...@@ -31,6 +29,8 @@
#include <linux/poll.h> #include <linux/poll.h>
#include <linux/ioctl.h> #include <linux/ioctl.h>
#include <linux/wait.h> #include <linux/wait.h>
#include <asm/uaccess.h>
#include <asm/system.h>
#include "dmxdev.h" #include "dmxdev.h"
#include "dvb_functions.h" #include "dvb_functions.h"
...@@ -52,8 +52,7 @@ dvb_dmxdev_file_to_dvr(struct dmxdev *dmxdev, struct file *file) ...@@ -52,8 +52,7 @@ dvb_dmxdev_file_to_dvr(struct dmxdev *dmxdev, struct file *file)
return (struct dmxdev_dvr *) file->private_data; return (struct dmxdev_dvr *) file->private_data;
} }
static inline void static inline void dvb_dmxdev_buffer_init(struct dmxdev_buffer *buffer)
dvb_dmxdev_buffer_init(struct dmxdev_buffer *buffer)
{ {
buffer->data=0; buffer->data=0;
buffer->size=8192; buffer->size=8192;
...@@ -63,8 +62,7 @@ dvb_dmxdev_buffer_init(struct dmxdev_buffer *buffer) ...@@ -63,8 +62,7 @@ dvb_dmxdev_buffer_init(struct dmxdev_buffer *buffer)
init_waitqueue_head(&buffer->queue); init_waitqueue_head(&buffer->queue);
} }
static inline static inline int dvb_dmxdev_buffer_write(struct dmxdev_buffer *buf, const u8 *src, int len)
int dvb_dmxdev_buffer_write(struct dmxdev_buffer *buf, const u8 *src, int len)
{ {
int split; int split;
int free; int free;
...@@ -98,9 +96,8 @@ int dvb_dmxdev_buffer_write(struct dmxdev_buffer *buf, const u8 *src, int len) ...@@ -98,9 +96,8 @@ int dvb_dmxdev_buffer_write(struct dmxdev_buffer *buf, const u8 *src, int len)
return len; return len;
} }
static ssize_t static ssize_t dvb_dmxdev_buffer_read(struct dmxdev_buffer *src,
dvb_dmxdev_buffer_read(struct dmxdev_buffer *src, int non_blocking, int non_blocking, char *buf, size_t count, loff_t *ppos)
char *buf, size_t count, loff_t *ppos)
{ {
unsigned long todo=count; unsigned long todo=count;
int split, avail, error; int split, avail, error;
...@@ -159,8 +156,7 @@ dvb_dmxdev_buffer_read(struct dmxdev_buffer *src, int non_blocking, ...@@ -159,8 +156,7 @@ dvb_dmxdev_buffer_read(struct dmxdev_buffer *src, int non_blocking,
return count; return count;
} }
static struct dmx_frontend * static struct dmx_frontend * get_fe(struct dmx_demux *demux, int type)
get_fe(struct dmx_demux *demux, int type)
{ {
struct list_head *head, *pos; struct list_head *head, *pos;
...@@ -174,8 +170,7 @@ get_fe(struct dmx_demux *demux, int type) ...@@ -174,8 +170,7 @@ get_fe(struct dmx_demux *demux, int type)
return 0; return 0;
} }
static inline void static inline void dvb_dmxdev_dvr_state_set(struct dmxdev_dvr *dmxdevdvr, int state)
dvb_dmxdev_dvr_state_set(struct dmxdev_dvr *dmxdevdvr, int state)
{ {
spin_lock_irq(&dmxdevdvr->dev->lock); spin_lock_irq(&dmxdevdvr->dev->lock);
dmxdevdvr->state=state; dmxdevdvr->state=state;
...@@ -258,8 +253,8 @@ static int dvb_dvr_release(struct inode *inode, struct file *file) ...@@ -258,8 +253,8 @@ static int dvb_dvr_release(struct inode *inode, struct file *file)
return 0; return 0;
} }
static ssize_t static ssize_t dvb_dvr_write(struct file *file, const char *buf,
dvb_dvr_write(struct file *file, const char *buf, size_t count, loff_t *ppos) size_t count, loff_t *ppos)
{ {
struct dvb_device *dvbdev=(struct dvb_device *) file->private_data; struct dvb_device *dvbdev=(struct dvb_device *) file->private_data;
struct dmxdev *dmxdev=(struct dmxdev *) dvbdev->priv; struct dmxdev *dmxdev=(struct dmxdev *) dvbdev->priv;
...@@ -276,8 +271,8 @@ dvb_dvr_write(struct file *file, const char *buf, size_t count, loff_t *ppos) ...@@ -276,8 +271,8 @@ dvb_dvr_write(struct file *file, const char *buf, size_t count, loff_t *ppos)
return ret; return ret;
} }
static ssize_t static ssize_t dvb_dvr_read(struct file *file, char *buf, size_t count,
dvb_dvr_read(struct file *file, char *buf, size_t count, loff_t *ppos) loff_t *ppos)
{ {
struct dvb_device *dvbdev=(struct dvb_device *) file->private_data; struct dvb_device *dvbdev=(struct dvb_device *) file->private_data;
struct dmxdev *dmxdev=(struct dmxdev *) dvbdev->priv; struct dmxdev *dmxdev=(struct dmxdev *) dvbdev->priv;
...@@ -291,16 +286,14 @@ dvb_dvr_read(struct file *file, char *buf, size_t count, loff_t *ppos) ...@@ -291,16 +286,14 @@ dvb_dvr_read(struct file *file, char *buf, size_t count, loff_t *ppos)
return ret; return ret;
} }
static inline void static inline void dvb_dmxdev_filter_state_set(struct dmxdev_filter *dmxdevfilter, int state)
dvb_dmxdev_filter_state_set(struct dmxdev_filter *dmxdevfilter, int state)
{ {
spin_lock_irq(&dmxdevfilter->dev->lock); spin_lock_irq(&dmxdevfilter->dev->lock);
dmxdevfilter->state=state; dmxdevfilter->state=state;
spin_unlock_irq(&dmxdevfilter->dev->lock); spin_unlock_irq(&dmxdevfilter->dev->lock);
} }
static int static int dvb_dmxdev_set_buffer_size(struct dmxdev_filter *dmxdevfilter, unsigned long size)
dvb_dmxdev_set_buffer_size(struct dmxdev_filter *dmxdevfilter, unsigned long size)
{ {
struct dmxdev_buffer *buf=&dmxdevfilter->buffer; struct dmxdev_buffer *buf=&dmxdevfilter->buffer;
void *mem; void *mem;
...@@ -329,8 +322,7 @@ dvb_dmxdev_set_buffer_size(struct dmxdev_filter *dmxdevfilter, unsigned long siz ...@@ -329,8 +322,7 @@ dvb_dmxdev_set_buffer_size(struct dmxdev_filter *dmxdevfilter, unsigned long siz
return 0; return 0;
} }
static void static void dvb_dmxdev_filter_timeout(unsigned long data)
dvb_dmxdev_filter_timeout(unsigned long data)
{ {
struct dmxdev_filter *dmxdevfilter=(struct dmxdev_filter *)data; struct dmxdev_filter *dmxdevfilter=(struct dmxdev_filter *)data;
...@@ -341,8 +333,7 @@ dvb_dmxdev_filter_timeout(unsigned long data) ...@@ -341,8 +333,7 @@ dvb_dmxdev_filter_timeout(unsigned long data)
wake_up(&dmxdevfilter->buffer.queue); wake_up(&dmxdevfilter->buffer.queue);
} }
static void static void dvb_dmxdev_filter_timer(struct dmxdev_filter *dmxdevfilter)
dvb_dmxdev_filter_timer(struct dmxdev_filter *dmxdevfilter)
{ {
struct dmx_sct_filter_params *para=&dmxdevfilter->params.sec; struct dmx_sct_filter_params *para=&dmxdevfilter->params.sec;
...@@ -355,8 +346,7 @@ dvb_dmxdev_filter_timer(struct dmxdev_filter *dmxdevfilter) ...@@ -355,8 +346,7 @@ dvb_dmxdev_filter_timer(struct dmxdev_filter *dmxdevfilter)
} }
} }
static int static int dvb_dmxdev_section_callback(const u8 *buffer1, size_t buffer1_len,
dvb_dmxdev_section_callback(const u8 *buffer1, size_t buffer1_len,
const u8 *buffer2, size_t buffer2_len, const u8 *buffer2, size_t buffer2_len,
struct dmx_section_filter *filter, enum dmx_success success) struct dmx_section_filter *filter, enum dmx_success success)
{ {
...@@ -392,8 +382,7 @@ dvb_dmxdev_section_callback(const u8 *buffer1, size_t buffer1_len, ...@@ -392,8 +382,7 @@ dvb_dmxdev_section_callback(const u8 *buffer1, size_t buffer1_len,
return 0; return 0;
} }
static int static int dvb_dmxdev_ts_callback(const u8 *buffer1, size_t buffer1_len,
dvb_dmxdev_ts_callback(const u8 *buffer1, size_t buffer1_len,
const u8 *buffer2, size_t buffer2_len, const u8 *buffer2, size_t buffer2_len,
struct dmx_ts_feed *feed, enum dmx_success success) struct dmx_ts_feed *feed, enum dmx_success success)
{ {
...@@ -431,8 +420,7 @@ dvb_dmxdev_ts_callback(const u8 *buffer1, size_t buffer1_len, ...@@ -431,8 +420,7 @@ dvb_dmxdev_ts_callback(const u8 *buffer1, size_t buffer1_len,
/* stop feed but only mark the specified filter as stopped (state set) */ /* stop feed but only mark the specified filter as stopped (state set) */
static int static int dvb_dmxdev_feed_stop(struct dmxdev_filter *dmxdevfilter)
dvb_dmxdev_feed_stop(struct dmxdev_filter *dmxdevfilter)
{ {
dvb_dmxdev_filter_state_set(dmxdevfilter, DMXDEV_STATE_SET); dvb_dmxdev_filter_state_set(dmxdevfilter, DMXDEV_STATE_SET);
...@@ -453,8 +441,7 @@ dvb_dmxdev_feed_stop(struct dmxdev_filter *dmxdevfilter) ...@@ -453,8 +441,7 @@ dvb_dmxdev_feed_stop(struct dmxdev_filter *dmxdevfilter)
/* start feed associated with the specified filter */ /* start feed associated with the specified filter */
static static int dvb_dmxdev_feed_start(struct dmxdev_filter *filter)
int dvb_dmxdev_feed_start(struct dmxdev_filter *filter)
{ {
dvb_dmxdev_filter_state_set (filter, DMXDEV_STATE_GO); dvb_dmxdev_filter_state_set (filter, DMXDEV_STATE_GO);
...@@ -476,8 +463,7 @@ int dvb_dmxdev_feed_start(struct dmxdev_filter *filter) ...@@ -476,8 +463,7 @@ int dvb_dmxdev_feed_start(struct dmxdev_filter *filter)
/* restart section feed if it has filters left associated with it, /* restart section feed if it has filters left associated with it,
otherwise release the feed */ otherwise release the feed */
static static int dvb_dmxdev_feed_restart(struct dmxdev_filter *filter)
int dvb_dmxdev_feed_restart(struct dmxdev_filter *filter)
{ {
int i; int i;
struct dmxdev *dmxdev = filter->dev; struct dmxdev *dmxdev = filter->dev;
...@@ -496,8 +482,7 @@ int dvb_dmxdev_feed_restart(struct dmxdev_filter *filter) ...@@ -496,8 +482,7 @@ int dvb_dmxdev_feed_restart(struct dmxdev_filter *filter)
return 0; return 0;
} }
static int static int dvb_dmxdev_filter_stop(struct dmxdev_filter *dmxdevfilter)
dvb_dmxdev_filter_stop(struct dmxdev_filter *dmxdevfilter)
{ {
if (dmxdevfilter->state<DMXDEV_STATE_GO) if (dmxdevfilter->state<DMXDEV_STATE_GO)
return 0; return 0;
...@@ -532,8 +517,7 @@ dvb_dmxdev_filter_stop(struct dmxdev_filter *dmxdevfilter) ...@@ -532,8 +517,7 @@ dvb_dmxdev_filter_stop(struct dmxdev_filter *dmxdevfilter)
return 0; return 0;
} }
static inline int static inline int dvb_dmxdev_filter_reset(struct dmxdev_filter *dmxdevfilter)
dvb_dmxdev_filter_reset(struct dmxdev_filter *dmxdevfilter)
{ {
if (dmxdevfilter->state<DMXDEV_STATE_SET) if (dmxdevfilter->state<DMXDEV_STATE_SET)
return 0; return 0;
...@@ -544,8 +528,7 @@ dvb_dmxdev_filter_reset(struct dmxdev_filter *dmxdevfilter) ...@@ -544,8 +528,7 @@ dvb_dmxdev_filter_reset(struct dmxdev_filter *dmxdevfilter)
return 0; return 0;
} }
static int static int dvb_dmxdev_filter_start(struct dmxdev_filter *filter)
dvb_dmxdev_filter_start(struct dmxdev_filter *filter)
{ {
struct dmxdev *dmxdev = filter->dev; struct dmxdev *dmxdev = filter->dev;
void *mem; void *mem;
...@@ -742,8 +725,7 @@ static int dvb_demux_open(struct inode *inode, struct file *file) ...@@ -742,8 +725,7 @@ static int dvb_demux_open(struct inode *inode, struct file *file)
} }
static static int dvb_dmxdev_filter_free(struct dmxdev *dmxdev, struct dmxdev_filter *dmxdevfilter)
int dvb_dmxdev_filter_free(struct dmxdev *dmxdev, struct dmxdev_filter *dmxdevfilter)
{ {
if (down_interruptible(&dmxdev->mutex)) if (down_interruptible(&dmxdev->mutex))
return -ERESTARTSYS; return -ERESTARTSYS;
...@@ -772,8 +754,7 @@ int dvb_dmxdev_filter_free(struct dmxdev *dmxdev, struct dmxdev_filter *dmxdevfi ...@@ -772,8 +754,7 @@ int dvb_dmxdev_filter_free(struct dmxdev *dmxdev, struct dmxdev_filter *dmxdevfi
return 0; return 0;
} }
static inline void static inline void invert_mode(dmx_filter_t *filter)
invert_mode(dmx_filter_t *filter)
{ {
int i; int i;
...@@ -782,8 +763,7 @@ invert_mode(dmx_filter_t *filter) ...@@ -782,8 +763,7 @@ invert_mode(dmx_filter_t *filter)
} }
static int static int dvb_dmxdev_filter_set(struct dmxdev *dmxdev,
dvb_dmxdev_filter_set(struct dmxdev *dmxdev,
struct dmxdev_filter *dmxdevfilter, struct dmxdev_filter *dmxdevfilter,
struct dmx_sct_filter_params *params) struct dmx_sct_filter_params *params)
{ {
...@@ -804,8 +784,7 @@ dvb_dmxdev_filter_set(struct dmxdev *dmxdev, ...@@ -804,8 +784,7 @@ dvb_dmxdev_filter_set(struct dmxdev *dmxdev,
return 0; return 0;
} }
static int static int dvb_dmxdev_pes_filter_set(struct dmxdev *dmxdev,
dvb_dmxdev_pes_filter_set(struct dmxdev *dmxdev,
struct dmxdev_filter *dmxdevfilter, struct dmxdev_filter *dmxdevfilter,
struct dmx_pes_filter_params *params) struct dmx_pes_filter_params *params)
{ {
...@@ -826,9 +805,8 @@ dvb_dmxdev_pes_filter_set(struct dmxdev *dmxdev, ...@@ -826,9 +805,8 @@ dvb_dmxdev_pes_filter_set(struct dmxdev *dmxdev,
return 0; return 0;
} }
static ssize_t static ssize_t dvb_dmxdev_read_sec(struct dmxdev_filter *dfil,
dvb_dmxdev_read_sec(struct dmxdev_filter *dfil, struct file *file, struct file *file, char *buf, size_t count, loff_t *ppos)
char *buf, size_t count, loff_t *ppos)
{ {
int result, hcount; int result, hcount;
int done=0; int done=0;
...@@ -985,8 +963,7 @@ static int dvb_demux_ioctl(struct inode *inode, struct file *file, ...@@ -985,8 +963,7 @@ static int dvb_demux_ioctl(struct inode *inode, struct file *file,
} }
static static unsigned int dvb_demux_poll (struct file *file, poll_table *wait)
unsigned int dvb_demux_poll (struct file *file, poll_table *wait)
{ {
struct dmxdev_filter *dmxdevfilter = dvb_dmxdev_file_to_filter(file); struct dmxdev_filter *dmxdevfilter = dvb_dmxdev_file_to_filter(file);
unsigned int mask = 0; unsigned int mask = 0;
...@@ -1011,8 +988,7 @@ unsigned int dvb_demux_poll (struct file *file, poll_table *wait) ...@@ -1011,8 +988,7 @@ unsigned int dvb_demux_poll (struct file *file, poll_table *wait)
} }
static static int dvb_demux_release(struct inode *inode, struct file *file)
int dvb_demux_release(struct inode *inode, struct file *file)
{ {
struct dmxdev_filter *dmxdevfilter = dvb_dmxdev_file_to_filter(file); struct dmxdev_filter *dmxdevfilter = dvb_dmxdev_file_to_filter(file);
struct dmxdev *dmxdev = dmxdevfilter->dev; struct dmxdev *dmxdev = dmxdevfilter->dev;
...@@ -1067,8 +1043,7 @@ static int dvb_dvr_ioctl(struct inode *inode, struct file *file, ...@@ -1067,8 +1043,7 @@ static int dvb_dvr_ioctl(struct inode *inode, struct file *file,
} }
static static unsigned int dvb_dvr_poll (struct file *file, poll_table *wait)
unsigned int dvb_dvr_poll (struct file *file, poll_table *wait)
{ {
struct dvb_device *dvbdev = (struct dvb_device *) file->private_data; struct dvb_device *dvbdev = (struct dvb_device *) file->private_data;
struct dmxdev *dmxdev = (struct dmxdev *) dvbdev->priv; struct dmxdev *dmxdev = (struct dmxdev *) dvbdev->priv;
...@@ -1091,8 +1066,7 @@ unsigned int dvb_dvr_poll (struct file *file, poll_table *wait) ...@@ -1091,8 +1066,7 @@ unsigned int dvb_dvr_poll (struct file *file, poll_table *wait)
} }
static static struct file_operations dvb_dvr_fops = {
struct file_operations dvb_dvr_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.read = dvb_dvr_read, .read = dvb_dvr_read,
.write = dvb_dvr_write, .write = dvb_dvr_write,
...@@ -1102,8 +1076,7 @@ struct file_operations dvb_dvr_fops = { ...@@ -1102,8 +1076,7 @@ struct file_operations dvb_dvr_fops = {
.poll = dvb_dvr_poll, .poll = dvb_dvr_poll,
}; };
static static struct dvb_device dvbdev_dvr = {
struct dvb_device dvbdev_dvr = {
.priv = 0, .priv = 0,
.users = 1, .users = 1,
.writers = 1, .writers = 1,
......
...@@ -24,14 +24,14 @@ ...@@ -24,14 +24,14 @@
#ifndef _DMXDEV_H_ #ifndef _DMXDEV_H_
#define _DMXDEV_H_ #define _DMXDEV_H_
#include <asm/types.h> #include <linux/types.h>
#include <asm/semaphore.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/timer.h> #include <linux/timer.h>
#include <linux/wait.h> #include <linux/wait.h>
#include <linux/fs.h> #include <linux/fs.h>
#include <linux/string.h> #include <linux/string.h>
#include <asm/semaphore.h>
#include <linux/dvb/dmx.h> #include <linux/dvb/dmx.h>
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
* *
*/ */
#include <asm/uaccess.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/vmalloc.h> #include <linux/vmalloc.h>
...@@ -29,6 +28,7 @@ ...@@ -29,6 +28,7 @@
#include <linux/poll.h> #include <linux/poll.h>
#include <linux/string.h> #include <linux/string.h>
#include <linux/crc32.h> #include <linux/crc32.h>
#include <asm/uaccess.h>
#include "dvb_demux.h" #include "dvb_demux.h"
#include "dvb_functions.h" #include "dvb_functions.h"
...@@ -75,22 +75,19 @@ struct list_head *dmx_get_demuxes(void) ...@@ -75,22 +75,19 @@ struct list_head *dmx_get_demuxes(void)
******************************************************************************/ ******************************************************************************/
static inline static inline u16 section_length(const u8 *buf)
u16 section_length(const u8 *buf)
{ {
return 3+((buf[1]&0x0f)<<8)+buf[2]; return 3+((buf[1]&0x0f)<<8)+buf[2];
} }
static inline static inline u16 ts_pid(const u8 *buf)
u16 ts_pid(const u8 *buf)
{ {
return ((buf[1]&0x1f)<<8)+buf[2]; return ((buf[1]&0x1f)<<8)+buf[2];
} }
static inline static inline int payload(const u8 *tsp)
int payload(const u8 *tsp)
{ {
if (!(tsp[3]&0x10)) // no payload? if (!(tsp[3]&0x10)) // no payload?
return 0; return 0;
...@@ -117,15 +114,13 @@ void dvb_set_crc32(u8 *data, int length) ...@@ -117,15 +114,13 @@ void dvb_set_crc32(u8 *data, int length)
} }
static static u32 dvb_dmx_crc32 (struct dvb_demux_feed *f, const u8 *src, size_t len)
u32 dvb_dmx_crc32 (struct dvb_demux_feed *f, const u8 *src, size_t len)
{ {
return (f->feed.sec.crc_val = crc32_le (f->feed.sec.crc_val, src, len)); return (f->feed.sec.crc_val = crc32_le (f->feed.sec.crc_val, src, len));
} }
static static void dvb_dmx_memcopy (struct dvb_demux_feed *f, u8 *d, const u8 *s, size_t len)
void dvb_dmx_memcopy (struct dvb_demux_feed *f, u8 *d, const u8 *s, size_t len)
{ {
memcpy (d, s, len); memcpy (d, s, len);
} }
...@@ -135,8 +130,7 @@ void dvb_dmx_memcopy (struct dvb_demux_feed *f, u8 *d, const u8 *s, size_t len) ...@@ -135,8 +130,7 @@ void dvb_dmx_memcopy (struct dvb_demux_feed *f, u8 *d, const u8 *s, size_t len)
* Software filter functions * Software filter functions
******************************************************************************/ ******************************************************************************/
static inline static inline int dvb_dmx_swfilter_payload (struct dvb_demux_feed *feed, const u8 *buf)
int dvb_dmx_swfilter_payload (struct dvb_demux_feed *feed, const u8 *buf)
{ {
int count = payload(buf); int count = payload(buf);
int p; int p;
...@@ -165,8 +159,7 @@ int dvb_dmx_swfilter_payload (struct dvb_demux_feed *feed, const u8 *buf) ...@@ -165,8 +159,7 @@ int dvb_dmx_swfilter_payload (struct dvb_demux_feed *feed, const u8 *buf)
} }
static static int dvb_dmx_swfilter_sectionfilter (struct dvb_demux_feed *feed,
int dvb_dmx_swfilter_sectionfilter (struct dvb_demux_feed *feed,
struct dvb_demux_filter *f) struct dvb_demux_filter *f)
{ {
u8 neq = 0; u8 neq = 0;
...@@ -189,8 +182,7 @@ int dvb_dmx_swfilter_sectionfilter (struct dvb_demux_feed *feed, ...@@ -189,8 +182,7 @@ int dvb_dmx_swfilter_sectionfilter (struct dvb_demux_feed *feed,
} }
static inline static inline int dvb_dmx_swfilter_section_feed (struct dvb_demux_feed *feed)
int dvb_dmx_swfilter_section_feed (struct dvb_demux_feed *feed)
{ {
struct dvb_demux *demux = feed->demux; struct dvb_demux *demux = feed->demux;
struct dvb_demux_filter *f = feed->filter; struct dvb_demux_filter *f = feed->filter;
...@@ -222,8 +214,7 @@ int dvb_dmx_swfilter_section_feed (struct dvb_demux_feed *feed) ...@@ -222,8 +214,7 @@ int dvb_dmx_swfilter_section_feed (struct dvb_demux_feed *feed)
} }
static static int dvb_dmx_swfilter_section_packet(struct dvb_demux_feed *feed, const u8 *buf)
int dvb_dmx_swfilter_section_packet(struct dvb_demux_feed *feed, const u8 *buf)
{ {
struct dvb_demux *demux = feed->demux; struct dvb_demux *demux = feed->demux;
struct dmx_section_feed *sec = &feed->feed.sec; struct dmx_section_feed *sec = &feed->feed.sec;
...@@ -349,8 +340,7 @@ int dvb_dmx_swfilter_section_packet(struct dvb_demux_feed *feed, const u8 *buf) ...@@ -349,8 +340,7 @@ int dvb_dmx_swfilter_section_packet(struct dvb_demux_feed *feed, const u8 *buf)
} }
static inline static inline void dvb_dmx_swfilter_packet_type(struct dvb_demux_feed *feed, const u8 *buf)
void dvb_dmx_swfilter_packet_type(struct dvb_demux_feed *feed, const u8 *buf)
{ {
switch(feed->type) { switch(feed->type) {
case DMX_TYPE_TS: case DMX_TYPE_TS:
...@@ -442,8 +432,7 @@ void dvb_dmx_swfilter(struct dvb_demux *demux, const u8 *buf, size_t count) ...@@ -442,8 +432,7 @@ void dvb_dmx_swfilter(struct dvb_demux *demux, const u8 *buf, size_t count)
} }
static static struct dvb_demux_filter * dvb_dmx_filter_alloc(struct dvb_demux *demux)
struct dvb_demux_filter* dvb_dmx_filter_alloc(struct dvb_demux *demux)
{ {
int i; int i;
...@@ -459,8 +448,7 @@ struct dvb_demux_filter* dvb_dmx_filter_alloc(struct dvb_demux *demux) ...@@ -459,8 +448,7 @@ struct dvb_demux_filter* dvb_dmx_filter_alloc(struct dvb_demux *demux)
return &demux->filter[i]; return &demux->filter[i];
} }
static static struct dvb_demux_feed * dvb_dmx_feed_alloc(struct dvb_demux *demux)
struct dvb_demux_feed* dvb_dmx_feed_alloc(struct dvb_demux *demux)
{ {
int i; int i;
...@@ -477,8 +465,7 @@ struct dvb_demux_feed* dvb_dmx_feed_alloc(struct dvb_demux *demux) ...@@ -477,8 +465,7 @@ struct dvb_demux_feed* dvb_dmx_feed_alloc(struct dvb_demux *demux)
} }
static static int dmx_pid_set (u16 pid, struct dvb_demux_feed *feed)
int dmx_pid_set (u16 pid, struct dvb_demux_feed *feed)
{ {
struct dvb_demux *demux = feed->demux; struct dvb_demux *demux = feed->demux;
struct list_head *pos, *n, *head=&demux->feed_list; struct list_head *pos, *n, *head=&demux->feed_list;
...@@ -505,8 +492,7 @@ int dmx_pid_set (u16 pid, struct dvb_demux_feed *feed) ...@@ -505,8 +492,7 @@ int dmx_pid_set (u16 pid, struct dvb_demux_feed *feed)
} }
static static int dmx_ts_feed_set (struct dmx_ts_feed* ts_feed, u16 pid, int ts_type,
int dmx_ts_feed_set (struct dmx_ts_feed* ts_feed, u16 pid, int ts_type,
enum dmx_ts_pes pes_type, size_t callback_length, enum dmx_ts_pes pes_type, size_t callback_length,
size_t circular_buffer_size, int descramble, size_t circular_buffer_size, int descramble,
struct timespec timeout) struct timespec timeout)
...@@ -581,8 +567,7 @@ int dmx_ts_feed_set (struct dmx_ts_feed* ts_feed, u16 pid, int ts_type, ...@@ -581,8 +567,7 @@ int dmx_ts_feed_set (struct dmx_ts_feed* ts_feed, u16 pid, int ts_type,
} }
static static int dmx_ts_feed_start_filtering(struct dmx_ts_feed* ts_feed)
int dmx_ts_feed_start_filtering(struct dmx_ts_feed* ts_feed)
{ {
struct dvb_demux_feed *feed = (struct dvb_demux_feed *) ts_feed; struct dvb_demux_feed *feed = (struct dvb_demux_feed *) ts_feed;
struct dvb_demux *demux = feed->demux; struct dvb_demux *demux = feed->demux;
...@@ -615,8 +600,7 @@ int dmx_ts_feed_start_filtering(struct dmx_ts_feed* ts_feed) ...@@ -615,8 +600,7 @@ int dmx_ts_feed_start_filtering(struct dmx_ts_feed* ts_feed)
return 0; return 0;
} }
static static int dmx_ts_feed_stop_filtering(struct dmx_ts_feed* ts_feed)
int dmx_ts_feed_stop_filtering(struct dmx_ts_feed* ts_feed)
{ {
struct dvb_demux_feed *feed = (struct dvb_demux_feed *) ts_feed; struct dvb_demux_feed *feed = (struct dvb_demux_feed *) ts_feed;
struct dvb_demux *demux = feed->demux; struct dvb_demux *demux = feed->demux;
...@@ -646,8 +630,7 @@ int dmx_ts_feed_stop_filtering(struct dmx_ts_feed* ts_feed) ...@@ -646,8 +630,7 @@ int dmx_ts_feed_stop_filtering(struct dmx_ts_feed* ts_feed)
return ret; return ret;
} }
static static int dvbdmx_allocate_ts_feed (struct dmx_demux *dmx, struct dmx_ts_feed **ts_feed,
int dvbdmx_allocate_ts_feed (struct dmx_demux *dmx, struct dmx_ts_feed **ts_feed,
dmx_ts_cb callback) dmx_ts_cb callback)
{ {
struct dvb_demux *demux = (struct dvb_demux *) dmx; struct dvb_demux *demux = (struct dvb_demux *) dmx;
...@@ -692,8 +675,7 @@ int dvbdmx_allocate_ts_feed (struct dmx_demux *dmx, struct dmx_ts_feed **ts_feed ...@@ -692,8 +675,7 @@ int dvbdmx_allocate_ts_feed (struct dmx_demux *dmx, struct dmx_ts_feed **ts_feed
return 0; return 0;
} }
static static int dvbdmx_release_ts_feed(struct dmx_demux *dmx, struct dmx_ts_feed *ts_feed)
int dvbdmx_release_ts_feed(struct dmx_demux *dmx, struct dmx_ts_feed *ts_feed)
{ {
struct dvb_demux *demux = (struct dvb_demux *) dmx; struct dvb_demux *demux = (struct dvb_demux *) dmx;
struct dvb_demux_feed *feed = (struct dvb_demux_feed *) ts_feed; struct dvb_demux_feed *feed = (struct dvb_demux_feed *) ts_feed;
...@@ -738,8 +720,7 @@ int dvbdmx_release_ts_feed(struct dmx_demux *dmx, struct dmx_ts_feed *ts_feed) ...@@ -738,8 +720,7 @@ int dvbdmx_release_ts_feed(struct dmx_demux *dmx, struct dmx_ts_feed *ts_feed)
* dmx_section_feed API calls * dmx_section_feed API calls
******************************************************************************/ ******************************************************************************/
static int static int dmx_section_feed_allocate_filter(struct dmx_section_feed* feed,
dmx_section_feed_allocate_filter(struct dmx_section_feed* feed,
struct dmx_section_filter** filter) struct dmx_section_filter** filter)
{ {
struct dvb_demux_feed *dvbdmxfeed=(struct dvb_demux_feed *) feed; struct dvb_demux_feed *dvbdmxfeed=(struct dvb_demux_feed *) feed;
...@@ -771,8 +752,7 @@ dmx_section_feed_allocate_filter(struct dmx_section_feed* feed, ...@@ -771,8 +752,7 @@ dmx_section_feed_allocate_filter(struct dmx_section_feed* feed,
} }
static int static int dmx_section_feed_set(struct dmx_section_feed* feed,
dmx_section_feed_set(struct dmx_section_feed* feed,
u16 pid, size_t circular_buffer_size, u16 pid, size_t circular_buffer_size,
int descramble, int check_crc) int descramble, int check_crc)
{ {
...@@ -843,8 +823,7 @@ static void prepare_secfilters(struct dvb_demux_feed *dvbdmxfeed) ...@@ -843,8 +823,7 @@ static void prepare_secfilters(struct dvb_demux_feed *dvbdmxfeed)
} }
static int static int dmx_section_feed_start_filtering(struct dmx_section_feed *feed)
dmx_section_feed_start_filtering(struct dmx_section_feed *feed)
{ {
struct dvb_demux_feed *dvbdmxfeed=(struct dvb_demux_feed *) feed; struct dvb_demux_feed *dvbdmxfeed=(struct dvb_demux_feed *) feed;
struct dvb_demux *dvbdmx=dvbdmxfeed->demux; struct dvb_demux *dvbdmx=dvbdmxfeed->demux;
...@@ -885,8 +864,7 @@ dmx_section_feed_start_filtering(struct dmx_section_feed *feed) ...@@ -885,8 +864,7 @@ dmx_section_feed_start_filtering(struct dmx_section_feed *feed)
} }
static int static int dmx_section_feed_stop_filtering(struct dmx_section_feed* feed)
dmx_section_feed_stop_filtering(struct dmx_section_feed* feed)
{ {
struct dvb_demux_feed *dvbdmxfeed=(struct dvb_demux_feed *) feed; struct dvb_demux_feed *dvbdmxfeed=(struct dvb_demux_feed *) feed;
struct dvb_demux *dvbdmx=dvbdmxfeed->demux; struct dvb_demux *dvbdmx=dvbdmxfeed->demux;
...@@ -909,8 +887,7 @@ dmx_section_feed_stop_filtering(struct dmx_section_feed* feed) ...@@ -909,8 +887,7 @@ dmx_section_feed_stop_filtering(struct dmx_section_feed* feed)
} }
static int static int dmx_section_feed_release_filter(struct dmx_section_feed *feed,
dmx_section_feed_release_filter(struct dmx_section_feed *feed,
struct dmx_section_filter* filter) struct dmx_section_filter* filter)
{ {
struct dvb_demux_filter *dvbdmxfilter=(struct dvb_demux_filter *) filter, *f; struct dvb_demux_filter *dvbdmxfilter=(struct dvb_demux_filter *) filter, *f;
...@@ -1071,8 +1048,7 @@ static int dvbdmx_add_frontend(struct dmx_demux *demux, struct dmx_frontend *fro ...@@ -1071,8 +1048,7 @@ static int dvbdmx_add_frontend(struct dmx_demux *demux, struct dmx_frontend *fro
} }
static int static int dvbdmx_remove_frontend(struct dmx_demux *demux, struct dmx_frontend *frontend)
dvbdmx_remove_frontend(struct dmx_demux *demux, struct dmx_frontend *frontend)
{ {
struct dvb_demux *dvbdemux=(struct dvb_demux *) demux; struct dvb_demux *dvbdemux=(struct dvb_demux *) demux;
struct list_head *pos, *n, *head=&dvbdemux->frontend_list; struct list_head *pos, *n, *head=&dvbdemux->frontend_list;
...@@ -1087,8 +1063,7 @@ dvbdmx_remove_frontend(struct dmx_demux *demux, struct dmx_frontend *frontend) ...@@ -1087,8 +1063,7 @@ dvbdmx_remove_frontend(struct dmx_demux *demux, struct dmx_frontend *frontend)
} }
static struct list_head * static struct list_head * dvbdmx_get_frontends(struct dmx_demux *demux)
dvbdmx_get_frontends(struct dmx_demux *demux)
{ {
struct dvb_demux *dvbdemux=(struct dvb_demux *) demux; struct dvb_demux *dvbdemux=(struct dvb_demux *) demux;
......
...@@ -25,10 +25,10 @@ ...@@ -25,10 +25,10 @@
#ifndef _DVB_DEMUX_H_ #ifndef _DVB_DEMUX_H_
#define _DVB_DEMUX_H_ #define _DVB_DEMUX_H_
#include <asm/semaphore.h>
#include <linux/time.h> #include <linux/time.h>
#include <linux/timer.h> #include <linux/timer.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <asm/semaphore.h>
#include "demux.h" #include "demux.h"
......
...@@ -26,8 +26,7 @@ u32 ac3_frames[3][32] = ...@@ -26,8 +26,7 @@ u32 ac3_frames[3][32] =
#if 0 #if 0
static static void setup_ts2pes(ipack *pa, ipack *pv, u16 *pida, u16 *pidv,
void setup_ts2pes(ipack *pa, ipack *pv, u16 *pida, u16 *pidv,
void (*pes_write)(u8 *buf, int count, void *data), void (*pes_write)(u8 *buf, int count, void *data),
void *priv) void *priv)
{ {
...@@ -41,8 +40,7 @@ void setup_ts2pes(ipack *pa, ipack *pv, u16 *pida, u16 *pidv, ...@@ -41,8 +40,7 @@ void setup_ts2pes(ipack *pa, ipack *pv, u16 *pida, u16 *pidv,
#endif #endif
#if 0 #if 0
static static void ts_to_pes(ipack *p, u8 *buf) // don't need count (=188)
void ts_to_pes(ipack *p, u8 *buf) // don't need count (=188)
{ {
u8 off = 0; u8 off = 0;
...@@ -68,8 +66,7 @@ void ts_to_pes(ipack *p, u8 *buf) // don't need count (=188) ...@@ -68,8 +66,7 @@ void ts_to_pes(ipack *p, u8 *buf) // don't need count (=188)
#if 0 #if 0
/* needs 5 byte input, returns picture coding type*/ /* needs 5 byte input, returns picture coding type*/
static static int read_picture_header(u8 *headr, struct mpg_picture *pic, int field, int pr)
int read_picture_header(u8 *headr, struct mpg_picture *pic, int field, int pr)
{ {
u8 pct; u8 pct;
...@@ -115,8 +112,7 @@ int read_picture_header(u8 *headr, struct mpg_picture *pic, int field, int pr) ...@@ -115,8 +112,7 @@ int read_picture_header(u8 *headr, struct mpg_picture *pic, int field, int pr)
#if 0 #if 0
/* needs 4 byte input */ /* needs 4 byte input */
static static int read_gop_header(u8 *headr, struct mpg_picture *pic, int pr)
int read_gop_header(u8 *headr, struct mpg_picture *pic, int pr)
{ {
if (pr) printk("GOP header: "); if (pr) printk("GOP header: ");
...@@ -147,8 +143,7 @@ int read_gop_header(u8 *headr, struct mpg_picture *pic, int pr) ...@@ -147,8 +143,7 @@ int read_gop_header(u8 *headr, struct mpg_picture *pic, int pr)
#if 0 #if 0
/* needs 8 byte input */ /* needs 8 byte input */
static static int read_sequence_header(u8 *headr, struct dvb_video_info *vi, int pr)
int read_sequence_header(u8 *headr, struct dvb_video_info *vi, int pr)
{ {
int sw; int sw;
int form = -1; int form = -1;
...@@ -262,8 +257,7 @@ int read_sequence_header(u8 *headr, struct dvb_video_info *vi, int pr) ...@@ -262,8 +257,7 @@ int read_sequence_header(u8 *headr, struct dvb_video_info *vi, int pr)
#if 0 #if 0
static static int get_vinfo(u8 *mbuf, int count, struct dvb_video_info *vi, int pr)
int get_vinfo(u8 *mbuf, int count, struct dvb_video_info *vi, int pr)
{ {
u8 *headr; u8 *headr;
int found = 0; int found = 0;
...@@ -292,8 +286,7 @@ int get_vinfo(u8 *mbuf, int count, struct dvb_video_info *vi, int pr) ...@@ -292,8 +286,7 @@ int get_vinfo(u8 *mbuf, int count, struct dvb_video_info *vi, int pr)
#if 0 #if 0
static static int get_ainfo(u8 *mbuf, int count, struct dvb_audio_info *ai, int pr)
int get_ainfo(u8 *mbuf, int count, struct dvb_audio_info *ai, int pr)
{ {
u8 *headr; u8 *headr;
int found = 0; int found = 0;
...@@ -399,8 +392,7 @@ int dvb_filter_get_ac3info(u8 *mbuf, int count, struct dvb_audio_info *ai, int p ...@@ -399,8 +392,7 @@ int dvb_filter_get_ac3info(u8 *mbuf, int count, struct dvb_audio_info *ai, int p
#if 0 #if 0
static static u8 *skip_pes_header(u8 **bufp)
u8 *skip_pes_header(u8 **bufp)
{ {
u8 *inbuf = *bufp; u8 *inbuf = *bufp;
u8 *buf = inbuf; u8 *buf = inbuf;
...@@ -438,8 +430,7 @@ u8 *skip_pes_header(u8 **bufp) ...@@ -438,8 +430,7 @@ u8 *skip_pes_header(u8 **bufp)
#endif #endif
#if 0 #if 0
static static void initialize_quant_matrix( u32 *matrix )
void initialize_quant_matrix( u32 *matrix )
{ {
int i; int i;
...@@ -466,8 +457,7 @@ void initialize_quant_matrix( u32 *matrix ) ...@@ -466,8 +457,7 @@ void initialize_quant_matrix( u32 *matrix )
#endif #endif
#if 0 #if 0
static static void initialize_mpg_picture(struct mpg_picture *pic)
void initialize_mpg_picture(struct mpg_picture *pic)
{ {
int i; int i;
...@@ -494,8 +484,7 @@ void initialize_mpg_picture(struct mpg_picture *pic) ...@@ -494,8 +484,7 @@ void initialize_mpg_picture(struct mpg_picture *pic)
#endif #endif
#if 0 #if 0
static static void mpg_set_picture_parameter( int32_t field_type, struct mpg_picture *pic )
void mpg_set_picture_parameter( int32_t field_type, struct mpg_picture *pic )
{ {
int16_t last_h_offset; int16_t last_h_offset;
int16_t last_v_offset; int16_t last_v_offset;
...@@ -533,8 +522,7 @@ void mpg_set_picture_parameter( int32_t field_type, struct mpg_picture *pic ) ...@@ -533,8 +522,7 @@ void mpg_set_picture_parameter( int32_t field_type, struct mpg_picture *pic )
#endif #endif
#if 0 #if 0
static static void init_mpg_picture( struct mpg_picture *pic, int chan, int32_t field_type)
void init_mpg_picture( struct mpg_picture *pic, int chan, int32_t field_type)
{ {
pic->picture_header = 0; pic->picture_header = 0;
pic->sequence_header_data pic->sequence_header_data
......
...@@ -22,8 +22,6 @@ ...@@ -22,8 +22,6 @@
* Or, point your browser to http://www.gnu.org/copyleft/gpl.html * Or, point your browser to http://www.gnu.org/copyleft/gpl.html
*/ */
#include <asm/processor.h>
#include <asm/semaphore.h>
#include <linux/string.h> #include <linux/string.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/sched.h> #include <linux/sched.h>
...@@ -32,6 +30,8 @@ ...@@ -32,6 +30,8 @@
#include <linux/poll.h> #include <linux/poll.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/list.h> #include <linux/list.h>
#include <asm/processor.h>
#include <asm/semaphore.h>
#include "dvb_frontend.h" #include "dvb_frontend.h"
#include "dvbdev.h" #include "dvbdev.h"
...@@ -102,8 +102,7 @@ static LIST_HEAD(frontend_notifier_list); ...@@ -102,8 +102,7 @@ static LIST_HEAD(frontend_notifier_list);
static DECLARE_MUTEX(frontend_mutex); static DECLARE_MUTEX(frontend_mutex);
static static int dvb_frontend_internal_ioctl (struct dvb_frontend *frontend,
int dvb_frontend_internal_ioctl (struct dvb_frontend *frontend,
unsigned int cmd, void *arg) unsigned int cmd, void *arg)
{ {
int err = -EOPNOTSUPP; int err = -EOPNOTSUPP;
...@@ -131,8 +130,7 @@ int dvb_frontend_internal_ioctl (struct dvb_frontend *frontend, ...@@ -131,8 +130,7 @@ int dvb_frontend_internal_ioctl (struct dvb_frontend *frontend,
* should make it still possible to receive the requested transponder * should make it still possible to receive the requested transponder
* on both tuners... * on both tuners...
*/ */
static static void dvb_bend_frequency (struct dvb_frontend_data *this_fe, int recursive)
void dvb_bend_frequency (struct dvb_frontend_data *this_fe, int recursive)
{ {
struct list_head *entry; struct list_head *entry;
int stepsize = this_fe->info->frequency_stepsize; int stepsize = this_fe->info->frequency_stepsize;
...@@ -185,8 +183,7 @@ void dvb_bend_frequency (struct dvb_frontend_data *this_fe, int recursive) ...@@ -185,8 +183,7 @@ void dvb_bend_frequency (struct dvb_frontend_data *this_fe, int recursive)
} }
static static void dvb_call_frontend_notifiers (struct dvb_frontend_data *fe,
void dvb_call_frontend_notifiers (struct dvb_frontend_data *fe,
fe_status_t s) fe_status_t s)
{ {
dprintk ("%s\n", __FUNCTION__); dprintk ("%s\n", __FUNCTION__);
...@@ -210,8 +207,7 @@ void dvb_call_frontend_notifiers (struct dvb_frontend_data *fe, ...@@ -210,8 +207,7 @@ void dvb_call_frontend_notifiers (struct dvb_frontend_data *fe,
} }
static static void dvb_frontend_add_event (struct dvb_frontend_data *fe, fe_status_t status)
void dvb_frontend_add_event (struct dvb_frontend_data *fe, fe_status_t status)
{ {
struct dvb_fe_events *events = &fe->events; struct dvb_fe_events *events = &fe->events;
struct dvb_frontend_event *e; struct dvb_frontend_event *e;
...@@ -249,8 +245,7 @@ void dvb_frontend_add_event (struct dvb_frontend_data *fe, fe_status_t status) ...@@ -249,8 +245,7 @@ void dvb_frontend_add_event (struct dvb_frontend_data *fe, fe_status_t status)
} }
static static int dvb_frontend_get_event (struct dvb_frontend_data *fe,
int dvb_frontend_get_event (struct dvb_frontend_data *fe,
struct dvb_frontend_event *event, int flags) struct dvb_frontend_event *event, int flags)
{ {
struct dvb_fe_events *events = &fe->events; struct dvb_fe_events *events = &fe->events;
...@@ -288,8 +283,7 @@ int dvb_frontend_get_event (struct dvb_frontend_data *fe, ...@@ -288,8 +283,7 @@ int dvb_frontend_get_event (struct dvb_frontend_data *fe,
} }
static static int dvb_frontend_set_parameters (struct dvb_frontend_data *fe,
int dvb_frontend_set_parameters (struct dvb_frontend_data *fe,
struct dvb_frontend_parameters *param, struct dvb_frontend_parameters *param,
int first_trial) int first_trial)
{ {
...@@ -321,8 +315,7 @@ int dvb_frontend_set_parameters (struct dvb_frontend_data *fe, ...@@ -321,8 +315,7 @@ int dvb_frontend_set_parameters (struct dvb_frontend_data *fe,
return err; return err;
} }
static static void dvb_frontend_init (struct dvb_frontend_data *fe)
void dvb_frontend_init (struct dvb_frontend_data *fe)
{ {
struct dvb_frontend *frontend = &fe->frontend; struct dvb_frontend *frontend = &fe->frontend;
...@@ -334,8 +327,7 @@ void dvb_frontend_init (struct dvb_frontend_data *fe) ...@@ -334,8 +327,7 @@ void dvb_frontend_init (struct dvb_frontend_data *fe)
} }
static static void update_delay (int *quality, int *delay, int locked)
void update_delay (int *quality, int *delay, int locked)
{ {
int q2; int q2;
...@@ -360,8 +352,7 @@ void update_delay (int *quality, int *delay, int locked) ...@@ -360,8 +352,7 @@ void update_delay (int *quality, int *delay, int locked)
* here we only come when we have lost the lock bit, * here we only come when we have lost the lock bit,
* let's try to do something useful... * let's try to do something useful...
*/ */
static static void dvb_frontend_recover (struct dvb_frontend_data *fe)
void dvb_frontend_recover (struct dvb_frontend_data *fe)
{ {
dprintk ("%s\n", __FUNCTION__); dprintk ("%s\n", __FUNCTION__);
...@@ -409,8 +400,7 @@ void dvb_frontend_recover (struct dvb_frontend_data *fe) ...@@ -409,8 +400,7 @@ void dvb_frontend_recover (struct dvb_frontend_data *fe)
static static int dvb_frontend_is_exiting (struct dvb_frontend_data *fe)
int dvb_frontend_is_exiting (struct dvb_frontend_data *fe)
{ {
if (fe->exit) if (fe->exit)
return 1; return 1;
...@@ -423,8 +413,7 @@ int dvb_frontend_is_exiting (struct dvb_frontend_data *fe) ...@@ -423,8 +413,7 @@ int dvb_frontend_is_exiting (struct dvb_frontend_data *fe)
} }
static static int dvb_frontend_thread (void *data)
int dvb_frontend_thread (void *data)
{ {
struct dvb_frontend_data *fe = (struct dvb_frontend_data *) data; struct dvb_frontend_data *fe = (struct dvb_frontend_data *) data;
char name [15]; char name [15];
...@@ -502,8 +491,7 @@ int dvb_frontend_thread (void *data) ...@@ -502,8 +491,7 @@ int dvb_frontend_thread (void *data)
} }
static static void dvb_frontend_stop (struct dvb_frontend_data *fe)
void dvb_frontend_stop (struct dvb_frontend_data *fe)
{ {
dprintk ("%s\n", __FUNCTION__); dprintk ("%s\n", __FUNCTION__);
...@@ -532,8 +520,7 @@ void dvb_frontend_stop (struct dvb_frontend_data *fe) ...@@ -532,8 +520,7 @@ void dvb_frontend_stop (struct dvb_frontend_data *fe)
} }
static static int dvb_frontend_start (struct dvb_frontend_data *fe)
int dvb_frontend_start (struct dvb_frontend_data *fe)
{ {
int ret; int ret;
...@@ -567,8 +554,7 @@ int dvb_frontend_start (struct dvb_frontend_data *fe) ...@@ -567,8 +554,7 @@ int dvb_frontend_start (struct dvb_frontend_data *fe)
} }
static static int dvb_frontend_ioctl (struct inode *inode, struct file *file,
int dvb_frontend_ioctl (struct inode *inode, struct file *file,
unsigned int cmd, void *parg) unsigned int cmd, void *parg)
{ {
struct dvb_device *dvbdev = file->private_data; struct dvb_device *dvbdev = file->private_data;
...@@ -611,8 +597,7 @@ int dvb_frontend_ioctl (struct inode *inode, struct file *file, ...@@ -611,8 +597,7 @@ int dvb_frontend_ioctl (struct inode *inode, struct file *file,
} }
static static unsigned int dvb_frontend_poll (struct file *file, struct poll_table_struct *wait)
unsigned int dvb_frontend_poll (struct file *file, struct poll_table_struct *wait)
{ {
struct dvb_device *dvbdev = file->private_data; struct dvb_device *dvbdev = file->private_data;
struct dvb_frontend_data *fe = dvbdev->priv; struct dvb_frontend_data *fe = dvbdev->priv;
...@@ -628,8 +613,7 @@ unsigned int dvb_frontend_poll (struct file *file, struct poll_table_struct *wai ...@@ -628,8 +613,7 @@ unsigned int dvb_frontend_poll (struct file *file, struct poll_table_struct *wai
} }
static static int dvb_frontend_open (struct inode *inode, struct file *file)
int dvb_frontend_open (struct inode *inode, struct file *file)
{ {
struct dvb_device *dvbdev = file->private_data; struct dvb_device *dvbdev = file->private_data;
struct dvb_frontend_data *fe = dvbdev->priv; struct dvb_frontend_data *fe = dvbdev->priv;
...@@ -653,8 +637,7 @@ int dvb_frontend_open (struct inode *inode, struct file *file) ...@@ -653,8 +637,7 @@ int dvb_frontend_open (struct inode *inode, struct file *file)
} }
static static int dvb_frontend_release (struct inode *inode, struct file *file)
int dvb_frontend_release (struct inode *inode, struct file *file)
{ {
struct dvb_device *dvbdev = file->private_data; struct dvb_device *dvbdev = file->private_data;
struct dvb_frontend_data *fe = dvbdev->priv; struct dvb_frontend_data *fe = dvbdev->priv;
...@@ -855,8 +838,7 @@ dvb_remove_frontend_notifier (struct dvb_adapter *adapter, ...@@ -855,8 +838,7 @@ dvb_remove_frontend_notifier (struct dvb_adapter *adapter,
} }
static static struct file_operations dvb_frontend_fops = {
struct file_operations dvb_frontend_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.ioctl = dvb_generic_ioctl, .ioctl = dvb_generic_ioctl,
.poll = dvb_frontend_poll, .poll = dvb_frontend_poll,
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#ifndef _DVB_FRONTEND_H_ #ifndef _DVB_FRONTEND_H_
#define _DVB_FRONTEND_H_ #define _DVB_FRONTEND_H_
#include <asm/types.h> #include <linux/types.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/ioctl.h> #include <linux/ioctl.h>
#include <linux/i2c.h> #include <linux/i2c.h>
......
#include <linux/smp_lock.h>
#include <linux/version.h> #include <linux/version.h>
#include <asm/uaccess.h>
#include <linux/string.h> #include <linux/string.h>
#include <linux/smp_lock.h> #include <linux/smp_lock.h>
#include <linux/version.h>
#include <linux/fs.h> #include <linux/fs.h>
#include <asm/uaccess.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/ioctl.h> #include <linux/ioctl.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/fs.h> #include <asm/uaccess.h>
void dvb_kernel_thread_setup (const char *thread_name) void dvb_kernel_thread_setup (const char *thread_name)
{ {
......
...@@ -19,11 +19,11 @@ ...@@ -19,11 +19,11 @@
* Or, point your browser to http://www.gnu.org/copyleft/gpl.html * Or, point your browser to http://www.gnu.org/copyleft/gpl.html
*/ */
#include <asm/semaphore.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/list.h> #include <linux/list.h>
#include <linux/module.h> #include <linux/module.h>
#include <asm/semaphore.h>
#include "dvb_i2c.h" #include "dvb_i2c.h"
#include "dvb_functions.h" #include "dvb_functions.h"
...@@ -41,8 +41,7 @@ LIST_HEAD(dvb_i2c_devicelist); ...@@ -41,8 +41,7 @@ LIST_HEAD(dvb_i2c_devicelist);
DECLARE_MUTEX(dvb_i2c_mutex); DECLARE_MUTEX(dvb_i2c_mutex);
static static int register_i2c_client (struct dvb_i2c_bus *i2c, struct dvb_i2c_device *dev)
int register_i2c_client (struct dvb_i2c_bus *i2c, struct dvb_i2c_device *dev)
{ {
struct dvb_i2c_device *client; struct dvb_i2c_device *client;
...@@ -60,8 +59,7 @@ int register_i2c_client (struct dvb_i2c_bus *i2c, struct dvb_i2c_device *dev) ...@@ -60,8 +59,7 @@ int register_i2c_client (struct dvb_i2c_bus *i2c, struct dvb_i2c_device *dev)
} }
static static void try_attach_device (struct dvb_i2c_bus *i2c, struct dvb_i2c_device *dev)
void try_attach_device (struct dvb_i2c_bus *i2c, struct dvb_i2c_device *dev)
{ {
if (dev->owner) { if (dev->owner) {
if (!try_module_get(dev->owner)) if (!try_module_get(dev->owner))
...@@ -77,8 +75,7 @@ void try_attach_device (struct dvb_i2c_bus *i2c, struct dvb_i2c_device *dev) ...@@ -77,8 +75,7 @@ void try_attach_device (struct dvb_i2c_bus *i2c, struct dvb_i2c_device *dev)
} }
static static void detach_device (struct dvb_i2c_bus *i2c, struct dvb_i2c_device *dev)
void detach_device (struct dvb_i2c_bus *i2c, struct dvb_i2c_device *dev)
{ {
dev->detach (i2c); dev->detach (i2c);
...@@ -87,8 +84,7 @@ void detach_device (struct dvb_i2c_bus *i2c, struct dvb_i2c_device *dev) ...@@ -87,8 +84,7 @@ void detach_device (struct dvb_i2c_bus *i2c, struct dvb_i2c_device *dev)
} }
static static void unregister_i2c_client_from_bus (struct dvb_i2c_device *dev,
void unregister_i2c_client_from_bus (struct dvb_i2c_device *dev,
struct dvb_i2c_bus *i2c) struct dvb_i2c_bus *i2c)
{ {
struct list_head *entry, *n; struct list_head *entry, *n;
...@@ -106,8 +102,7 @@ void unregister_i2c_client_from_bus (struct dvb_i2c_device *dev, ...@@ -106,8 +102,7 @@ void unregister_i2c_client_from_bus (struct dvb_i2c_device *dev,
} }
static static void unregister_i2c_client_from_all_busses (struct dvb_i2c_device *dev)
void unregister_i2c_client_from_all_busses (struct dvb_i2c_device *dev)
{ {
struct list_head *entry, *n; struct list_head *entry, *n;
...@@ -121,8 +116,7 @@ void unregister_i2c_client_from_all_busses (struct dvb_i2c_device *dev) ...@@ -121,8 +116,7 @@ void unregister_i2c_client_from_all_busses (struct dvb_i2c_device *dev)
} }
static static void unregister_all_clients_from_bus (struct dvb_i2c_bus *i2c)
void unregister_all_clients_from_bus (struct dvb_i2c_bus *i2c)
{ {
struct list_head *entry, *n; struct list_head *entry, *n;
...@@ -136,8 +130,7 @@ void unregister_all_clients_from_bus (struct dvb_i2c_bus *i2c) ...@@ -136,8 +130,7 @@ void unregister_all_clients_from_bus (struct dvb_i2c_bus *i2c)
} }
static static void probe_device_on_all_busses (struct dvb_i2c_device *dev)
void probe_device_on_all_busses (struct dvb_i2c_device *dev)
{ {
struct list_head *entry; struct list_head *entry;
...@@ -151,8 +144,7 @@ void probe_device_on_all_busses (struct dvb_i2c_device *dev) ...@@ -151,8 +144,7 @@ void probe_device_on_all_busses (struct dvb_i2c_device *dev)
} }
static static void probe_devices_on_bus (struct dvb_i2c_bus *i2c)
void probe_devices_on_bus (struct dvb_i2c_bus *i2c)
{ {
struct list_head *entry; struct list_head *entry;
...@@ -166,8 +158,7 @@ void probe_devices_on_bus (struct dvb_i2c_bus *i2c) ...@@ -166,8 +158,7 @@ void probe_devices_on_bus (struct dvb_i2c_bus *i2c)
} }
static static struct dvb_i2c_bus* dvb_find_i2c_bus (int (*xfer) (struct dvb_i2c_bus *i2c,
struct dvb_i2c_bus* dvb_find_i2c_bus (int (*xfer) (struct dvb_i2c_bus *i2c,
const struct i2c_msg msgs[], const struct i2c_msg msgs[],
int num), int num),
struct dvb_adapter *adapter, struct dvb_adapter *adapter,
......
#include <asm/uaccess.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/ioctl.h> #include <linux/ioctl.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/fs.h> #include <linux/fs.h>
#include <asm/uaccess.h>
#include "dmxdev.h" #include "dmxdev.h"
#include "dvb_demux.h" #include "dvb_demux.h"
......
...@@ -24,12 +24,12 @@ ...@@ -24,12 +24,12 @@
* *
*/ */
#include <asm/uaccess.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/string.h> #include <linux/string.h>
#include <linux/ioctl.h> #include <linux/ioctl.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <asm/uaccess.h>
#include <linux/dvb/net.h> #include <linux/dvb/net.h>
...@@ -98,8 +98,7 @@ unsigned short my_eth_type_trans(struct sk_buff *skb, struct net_device *dev) ...@@ -98,8 +98,7 @@ unsigned short my_eth_type_trans(struct sk_buff *skb, struct net_device *dev)
return htons(ETH_P_802_2); return htons(ETH_P_802_2);
} }
static void static void dvb_net_sec(struct net_device *dev, const u8 *pkt, int pkt_len)
dvb_net_sec(struct net_device *dev, const u8 *pkt, int pkt_len)
{ {
u8 *eth; u8 *eth;
struct sk_buff *skb; struct sk_buff *skb;
...@@ -135,8 +134,7 @@ dvb_net_sec(struct net_device *dev, const u8 *pkt, int pkt_len) ...@@ -135,8 +134,7 @@ dvb_net_sec(struct net_device *dev, const u8 *pkt, int pkt_len)
netif_rx(skb); netif_rx(skb);
} }
static int static int dvb_net_callback(const u8 *buffer1, size_t buffer1_len,
dvb_net_callback(const u8 *buffer1, size_t buffer1_len,
const u8 *buffer2, size_t buffer2_len, const u8 *buffer2, size_t buffer2_len,
struct dmx_section_filter *filter, struct dmx_section_filter *filter,
enum dmx_success success) enum dmx_success success)
...@@ -149,8 +147,7 @@ dvb_net_callback(const u8 *buffer1, size_t buffer1_len, ...@@ -149,8 +147,7 @@ dvb_net_callback(const u8 *buffer1, size_t buffer1_len,
return 0; return 0;
} }
static int static int dvb_net_tx(struct sk_buff *skb, struct net_device *dev)
dvb_net_tx(struct sk_buff *skb, struct net_device *dev)
{ {
return 0; return 0;
} }
...@@ -160,8 +157,7 @@ static u8 mask_allmulti[6]={0xff, 0xff, 0xff, 0x00, 0x00, 0x00}; ...@@ -160,8 +157,7 @@ static u8 mask_allmulti[6]={0xff, 0xff, 0xff, 0x00, 0x00, 0x00};
static u8 mac_allmulti[6]={0x01, 0x00, 0x5e, 0x00, 0x00, 0x00}; static u8 mac_allmulti[6]={0x01, 0x00, 0x5e, 0x00, 0x00, 0x00};
static u8 mask_promisc[6]={0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; static u8 mask_promisc[6]={0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
static int static int dvb_net_filter_set(struct net_device *dev,
dvb_net_filter_set(struct net_device *dev,
struct dmx_section_filter **secfilter, struct dmx_section_filter **secfilter,
u8 *mac, u8 *mac_mask) u8 *mac, u8 *mac_mask)
{ {
...@@ -203,8 +199,7 @@ dvb_net_filter_set(struct net_device *dev, ...@@ -203,8 +199,7 @@ dvb_net_filter_set(struct net_device *dev,
return 0; return 0;
} }
static int static int dvb_net_feed_start(struct net_device *dev)
dvb_net_feed_start(struct net_device *dev)
{ {
int ret, i; int ret, i;
struct dvb_net_priv *priv = (struct dvb_net_priv*) dev->priv; struct dvb_net_priv *priv = (struct dvb_net_priv*) dev->priv;
...@@ -255,8 +250,7 @@ dvb_net_feed_start(struct net_device *dev) ...@@ -255,8 +250,7 @@ dvb_net_feed_start(struct net_device *dev)
return 0; return 0;
} }
static void static void dvb_net_feed_stop(struct net_device *dev)
dvb_net_feed_stop(struct net_device *dev)
{ {
struct dvb_net_priv *priv = (struct dvb_net_priv*) dev->priv; struct dvb_net_priv *priv = (struct dvb_net_priv*) dev->priv;
int i; int i;
...@@ -286,8 +280,7 @@ dvb_net_feed_stop(struct net_device *dev) ...@@ -286,8 +280,7 @@ dvb_net_feed_stop(struct net_device *dev)
printk("%s: no feed to stop\n", dev->name); printk("%s: no feed to stop\n", dev->name);
} }
static int static int dvb_add_mc_filter(struct net_device *dev, struct dev_mc_list *mc)
dvb_add_mc_filter(struct net_device *dev, struct dev_mc_list *mc)
{ {
struct dvb_net_priv *priv = (struct dvb_net_priv*) dev->priv; struct dvb_net_priv *priv = (struct dvb_net_priv*) dev->priv;
int ret; int ret;
...@@ -303,8 +296,7 @@ dvb_add_mc_filter(struct net_device *dev, struct dev_mc_list *mc) ...@@ -303,8 +296,7 @@ dvb_add_mc_filter(struct net_device *dev, struct dev_mc_list *mc)
return ret; return ret;
} }
static void static void dvb_net_set_multi(struct net_device *dev)
dvb_net_set_multi(struct net_device *dev)
{ {
struct dvb_net_priv *priv = (struct dvb_net_priv*) dev->priv; struct dvb_net_priv *priv = (struct dvb_net_priv*) dev->priv;
struct dev_mc_list *mc; struct dev_mc_list *mc;
...@@ -346,16 +338,14 @@ dvb_net_set_multi(struct net_device *dev) ...@@ -346,16 +338,14 @@ dvb_net_set_multi(struct net_device *dev)
} }
} }
static int static int dvb_net_set_config(struct net_device *dev, struct ifmap *map)
dvb_net_set_config(struct net_device *dev, struct ifmap *map)
{ {
if (netif_running(dev)) if (netif_running(dev))
return -EBUSY; return -EBUSY;
return 0; return 0;
} }
static int static int dvb_net_set_mac(struct net_device *dev, void *p)
dvb_net_set_mac(struct net_device *dev, void *p)
{ {
struct sockaddr *addr=p; struct sockaddr *addr=p;
int update; int update;
...@@ -370,29 +360,25 @@ dvb_net_set_mac(struct net_device *dev, void *p) ...@@ -370,29 +360,25 @@ dvb_net_set_mac(struct net_device *dev, void *p)
} }
static int static int dvb_net_open(struct net_device *dev)
dvb_net_open(struct net_device *dev)
{ {
dvb_net_feed_start(dev); dvb_net_feed_start(dev);
return 0; return 0;
} }
static int static int dvb_net_stop(struct net_device *dev)
dvb_net_stop(struct net_device *dev)
{ {
dvb_net_feed_stop(dev); dvb_net_feed_stop(dev);
return 0; return 0;
} }
static struct net_device_stats * static struct net_device_stats * dvb_net_get_stats(struct net_device *dev)
dvb_net_get_stats(struct net_device *dev)
{ {
return &((struct dvb_net_priv*) dev->priv)->stats; return &((struct dvb_net_priv*) dev->priv)->stats;
} }
static int static int dvb_net_init_dev(struct net_device *dev)
dvb_net_init_dev(struct net_device *dev)
{ {
ether_setup(dev); ether_setup(dev);
...@@ -414,8 +400,7 @@ dvb_net_init_dev(struct net_device *dev) ...@@ -414,8 +400,7 @@ dvb_net_init_dev(struct net_device *dev)
return 0; return 0;
} }
static int static int get_if(struct dvb_net *dvbnet)
get_if(struct dvb_net *dvbnet)
{ {
int i; int i;
...@@ -534,8 +519,7 @@ int dvb_net_do_ioctl(struct inode *inode, struct file *file, ...@@ -534,8 +519,7 @@ int dvb_net_do_ioctl(struct inode *inode, struct file *file,
return 0; return 0;
} }
static int static int dvb_net_ioctl(struct inode *inode, struct file *file,
dvb_net_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg) unsigned int cmd, unsigned long arg)
{ {
return dvb_usercopy(inode, file, cmd, arg, dvb_net_do_ioctl); return dvb_usercopy(inode, file, cmd, arg, dvb_net_do_ioctl);
......
...@@ -32,12 +32,12 @@ ...@@ -32,12 +32,12 @@
#define __KERNEL_SYSCALLS__ #define __KERNEL_SYSCALLS__
#include <asm/uaccess.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/string.h> #include <linux/string.h>
#include <asm/uaccess.h>
#include "dvb_ringbuffer.h" #include "dvb_ringbuffer.h"
......
...@@ -21,8 +21,7 @@ ...@@ -21,8 +21,7 @@
* *
*/ */
#include <asm/types.h> #include <linux/types.h>
#include <asm/semaphore.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/string.h> #include <linux/string.h>
#include <linux/module.h> #include <linux/module.h>
...@@ -31,6 +30,7 @@ ...@@ -31,6 +30,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/version.h> #include <linux/version.h>
#include <asm/semaphore.h>
#include "dvbdev.h" #include "dvbdev.h"
#include "dvb_functions.h" #include "dvb_functions.h"
...@@ -51,8 +51,7 @@ static char *dnames[] = { ...@@ -51,8 +51,7 @@ static char *dnames[] = {
#define DVB_MAX_IDS 4 #define DVB_MAX_IDS 4
#define nums2minor(num,type,id) ((num << 6) | (id << 4) | type) #define nums2minor(num,type,id) ((num << 6) | (id << 4) | type)
static static struct dvb_device* dvbdev_find_device (int minor)
struct dvb_device* dvbdev_find_device (int minor)
{ {
struct list_head *entry; struct list_head *entry;
...@@ -72,8 +71,7 @@ struct dvb_device* dvbdev_find_device (int minor) ...@@ -72,8 +71,7 @@ struct dvb_device* dvbdev_find_device (int minor)
} }
static static int dvb_device_open(struct inode *inode, struct file *file)
int dvb_device_open(struct inode *inode, struct file *file)
{ {
struct dvb_device *dvbdev; struct dvb_device *dvbdev;
...@@ -157,8 +155,7 @@ int dvb_generic_ioctl(struct inode *inode, struct file *file, ...@@ -157,8 +155,7 @@ int dvb_generic_ioctl(struct inode *inode, struct file *file,
} }
static static int dvbdev_get_free_id (struct dvb_adapter *adap, int type)
int dvbdev_get_free_id (struct dvb_adapter *adap, int type)
{ {
u32 id = 0; u32 id = 0;
...@@ -234,8 +231,7 @@ void dvb_unregister_device(struct dvb_device *dvbdev) ...@@ -234,8 +231,7 @@ void dvb_unregister_device(struct dvb_device *dvbdev)
} }
static static int dvbdev_get_free_adapter_num (void)
int dvbdev_get_free_adapter_num (void)
{ {
int num = 0; int num = 0;
...@@ -303,8 +299,7 @@ int dvb_unregister_adapter(struct dvb_adapter *adap) ...@@ -303,8 +299,7 @@ int dvb_unregister_adapter(struct dvb_adapter *adap)
} }
static static int __init init_dvbdev(void)
int __init init_dvbdev(void)
{ {
devfs_mk_dir("dvb"); devfs_mk_dir("dvb");
...@@ -317,8 +312,7 @@ int __init init_dvbdev(void) ...@@ -317,8 +312,7 @@ int __init init_dvbdev(void)
} }
static static void __exit exit_dvbdev(void)
void __exit exit_dvbdev(void)
{ {
unregister_chrdev(DVB_MAJOR, "DVB"); unregister_chrdev(DVB_MAJOR, "DVB");
devfs_remove("dvb"); devfs_remove("dvb");
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
#ifndef _DVBDEV_H_ #ifndef _DVBDEV_H_
#define _DVBDEV_H_ #define _DVBDEV_H_
#include <asm/types.h> #include <linux/types.h>
#include <linux/poll.h> #include <linux/poll.h>
#include <linux/fs.h> #include <linux/fs.h>
#include <linux/devfs_fs_kernel.h> #include <linux/devfs_fs_kernel.h>
......
...@@ -32,8 +32,7 @@ static int debug = 0; ...@@ -32,8 +32,7 @@ static int debug = 0;
#define dprintk if (debug) printk #define dprintk if (debug) printk
static static struct dvb_frontend_info bsrv2_info = {
struct dvb_frontend_info bsrv2_info = {
.name = "Alps BSRV2", .name = "Alps BSRV2",
.type = FE_QPSK, .type = FE_QPSK,
.frequency_min = 950000, .frequency_min = 950000,
...@@ -52,8 +51,7 @@ struct dvb_frontend_info bsrv2_info = { ...@@ -52,8 +51,7 @@ struct dvb_frontend_info bsrv2_info = {
static static u8 init_1893_tab [] = {
u8 init_1893_tab [] = {
0x01, 0xA4, 0x35, 0x81, 0x2A, 0x0d, 0x55, 0xC4, 0x01, 0xA4, 0x35, 0x81, 0x2A, 0x0d, 0x55, 0xC4,
0x09, 0x69, 0x00, 0x86, 0x4c, 0x28, 0x7F, 0x00, 0x09, 0x69, 0x00, 0x86, 0x4c, 0x28, 0x7F, 0x00,
0x00, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
...@@ -64,8 +62,7 @@ u8 init_1893_tab [] = { ...@@ -64,8 +62,7 @@ u8 init_1893_tab [] = {
}; };
static static u8 init_1893_wtab[] =
u8 init_1893_wtab[] =
{ {
1,1,1,1,1,1,1,1, 1,1,0,0,1,1,0,0, 1,1,1,1,1,1,1,1, 1,1,0,0,1,1,0,0,
0,1,0,0,0,0,0,0, 1,0,1,1,0,0,0,1, 0,1,0,0,0,0,0,0, 1,0,1,1,0,0,0,1,
...@@ -74,8 +71,7 @@ u8 init_1893_wtab[] = ...@@ -74,8 +71,7 @@ u8 init_1893_wtab[] =
}; };
static static int ves1893_writereg (struct dvb_i2c_bus *i2c, u8 reg, u8 data)
int ves1893_writereg (struct dvb_i2c_bus *i2c, u8 reg, u8 data)
{ {
u8 buf [] = { 0x00, reg, data }; u8 buf [] = { 0x00, reg, data };
struct i2c_msg msg = { .addr = 0x08, .flags = 0, .buf = buf, .len = 3 }; struct i2c_msg msg = { .addr = 0x08, .flags = 0, .buf = buf, .len = 3 };
...@@ -90,8 +86,7 @@ int ves1893_writereg (struct dvb_i2c_bus *i2c, u8 reg, u8 data) ...@@ -90,8 +86,7 @@ int ves1893_writereg (struct dvb_i2c_bus *i2c, u8 reg, u8 data)
} }
static static u8 ves1893_readreg (struct dvb_i2c_bus *i2c, u8 reg)
u8 ves1893_readreg (struct dvb_i2c_bus *i2c, u8 reg)
{ {
int ret; int ret;
u8 b0 [] = { 0x00, reg }; u8 b0 [] = { 0x00, reg };
...@@ -108,8 +103,7 @@ u8 ves1893_readreg (struct dvb_i2c_bus *i2c, u8 reg) ...@@ -108,8 +103,7 @@ u8 ves1893_readreg (struct dvb_i2c_bus *i2c, u8 reg)
} }
static static int sp5659_write (struct dvb_i2c_bus *i2c, u8 data [4])
int sp5659_write (struct dvb_i2c_bus *i2c, u8 data [4])
{ {
int ret; int ret;
struct i2c_msg msg = { .addr = 0x61, .flags = 0, .buf = data, .len = 4 }; struct i2c_msg msg = { .addr = 0x61, .flags = 0, .buf = data, .len = 4 };
...@@ -128,8 +122,7 @@ int sp5659_write (struct dvb_i2c_bus *i2c, u8 data [4]) ...@@ -128,8 +122,7 @@ int sp5659_write (struct dvb_i2c_bus *i2c, u8 data [4])
* set up the downconverter frequency divisor for a * set up the downconverter frequency divisor for a
* reference clock comparision frequency of 125 kHz. * reference clock comparision frequency of 125 kHz.
*/ */
static static int sp5659_set_tv_freq (struct dvb_i2c_bus *i2c, u32 freq, u8 pwr)
int sp5659_set_tv_freq (struct dvb_i2c_bus *i2c, u32 freq, u8 pwr)
{ {
u32 div = (freq + 479500) / 125; u32 div = (freq + 479500) / 125;
u8 buf [4] = { (div >> 8) & 0x7f, div & 0xff, 0x95, (pwr << 5) | 0x30 }; u8 buf [4] = { (div >> 8) & 0x7f, div & 0xff, 0x95, (pwr << 5) | 0x30 };
...@@ -138,8 +131,7 @@ int sp5659_set_tv_freq (struct dvb_i2c_bus *i2c, u32 freq, u8 pwr) ...@@ -138,8 +131,7 @@ int sp5659_set_tv_freq (struct dvb_i2c_bus *i2c, u32 freq, u8 pwr)
} }
static static int ves1893_init (struct dvb_i2c_bus *i2c)
int ves1893_init (struct dvb_i2c_bus *i2c)
{ {
int i; int i;
...@@ -153,8 +145,7 @@ int ves1893_init (struct dvb_i2c_bus *i2c) ...@@ -153,8 +145,7 @@ int ves1893_init (struct dvb_i2c_bus *i2c)
} }
static static int ves1893_clr_bit (struct dvb_i2c_bus *i2c)
int ves1893_clr_bit (struct dvb_i2c_bus *i2c)
{ {
ves1893_writereg (i2c, 0, init_1893_tab[0] & 0xfe); ves1893_writereg (i2c, 0, init_1893_tab[0] & 0xfe);
ves1893_writereg (i2c, 0, init_1893_tab[0]); ves1893_writereg (i2c, 0, init_1893_tab[0]);
...@@ -163,8 +154,7 @@ int ves1893_clr_bit (struct dvb_i2c_bus *i2c) ...@@ -163,8 +154,7 @@ int ves1893_clr_bit (struct dvb_i2c_bus *i2c)
} }
static static int ves1893_set_inversion (struct dvb_i2c_bus *i2c, fe_spectral_inversion_t inversion)
int ves1893_set_inversion (struct dvb_i2c_bus *i2c, fe_spectral_inversion_t inversion)
{ {
u8 val; u8 val;
...@@ -186,8 +176,7 @@ int ves1893_set_inversion (struct dvb_i2c_bus *i2c, fe_spectral_inversion_t inve ...@@ -186,8 +176,7 @@ int ves1893_set_inversion (struct dvb_i2c_bus *i2c, fe_spectral_inversion_t inve
} }
static static int ves1893_set_fec (struct dvb_i2c_bus *i2c, fe_code_rate_t fec)
int ves1893_set_fec (struct dvb_i2c_bus *i2c, fe_code_rate_t fec)
{ {
if (fec == FEC_AUTO) if (fec == FEC_AUTO)
return ves1893_writereg (i2c, 0x0d, 0x08); return ves1893_writereg (i2c, 0x0d, 0x08);
...@@ -198,15 +187,13 @@ int ves1893_set_fec (struct dvb_i2c_bus *i2c, fe_code_rate_t fec) ...@@ -198,15 +187,13 @@ int ves1893_set_fec (struct dvb_i2c_bus *i2c, fe_code_rate_t fec)
} }
static static fe_code_rate_t ves1893_get_fec (struct dvb_i2c_bus *i2c)
fe_code_rate_t ves1893_get_fec (struct dvb_i2c_bus *i2c)
{ {
return FEC_1_2 + ((ves1893_readreg (i2c, 0x0d) >> 4) & 0x7); return FEC_1_2 + ((ves1893_readreg (i2c, 0x0d) >> 4) & 0x7);
} }
static static int ves1893_set_symbolrate (struct dvb_i2c_bus *i2c, u32 srate)
int ves1893_set_symbolrate (struct dvb_i2c_bus *i2c, u32 srate)
{ {
u32 BDR; u32 BDR;
u32 ratio; u32 ratio;
...@@ -289,8 +276,7 @@ int ves1893_set_symbolrate (struct dvb_i2c_bus *i2c, u32 srate) ...@@ -289,8 +276,7 @@ int ves1893_set_symbolrate (struct dvb_i2c_bus *i2c, u32 srate)
} }
static static int ves1893_set_voltage (struct dvb_i2c_bus *i2c, fe_sec_voltage_t voltage)
int ves1893_set_voltage (struct dvb_i2c_bus *i2c, fe_sec_voltage_t voltage)
{ {
switch (voltage) { switch (voltage) {
case SEC_VOLTAGE_13: case SEC_VOLTAGE_13:
...@@ -305,8 +291,7 @@ int ves1893_set_voltage (struct dvb_i2c_bus *i2c, fe_sec_voltage_t voltage) ...@@ -305,8 +291,7 @@ int ves1893_set_voltage (struct dvb_i2c_bus *i2c, fe_sec_voltage_t voltage)
} }
static static int bsrv2_ioctl (struct dvb_frontend *fe, unsigned int cmd, void *arg)
int bsrv2_ioctl (struct dvb_frontend *fe, unsigned int cmd, void *arg)
{ {
struct dvb_i2c_bus *i2c = fe->i2c; struct dvb_i2c_bus *i2c = fe->i2c;
...@@ -430,8 +415,7 @@ int bsrv2_ioctl (struct dvb_frontend *fe, unsigned int cmd, void *arg) ...@@ -430,8 +415,7 @@ int bsrv2_ioctl (struct dvb_frontend *fe, unsigned int cmd, void *arg)
} }
static static int bsrv2_attach (struct dvb_i2c_bus *i2c)
int bsrv2_attach (struct dvb_i2c_bus *i2c)
{ {
if ((ves1893_readreg (i2c, 0x1e) & 0xf0) != 0xd0) if ((ves1893_readreg (i2c, 0x1e) & 0xf0) != 0xd0)
return -ENODEV; return -ENODEV;
...@@ -442,22 +426,19 @@ int bsrv2_attach (struct dvb_i2c_bus *i2c) ...@@ -442,22 +426,19 @@ int bsrv2_attach (struct dvb_i2c_bus *i2c)
} }
static static void bsrv2_detach (struct dvb_i2c_bus *i2c)
void bsrv2_detach (struct dvb_i2c_bus *i2c)
{ {
dvb_unregister_frontend (bsrv2_ioctl, i2c); dvb_unregister_frontend (bsrv2_ioctl, i2c);
} }
static static int __init init_bsrv2 (void)
int __init init_bsrv2 (void)
{ {
return dvb_register_i2c_device (THIS_MODULE, bsrv2_attach, bsrv2_detach); return dvb_register_i2c_device (THIS_MODULE, bsrv2_attach, bsrv2_detach);
} }
static static void __exit exit_bsrv2 (void)
void __exit exit_bsrv2 (void)
{ {
dvb_unregister_i2c_device (bsrv2_attach); dvb_unregister_i2c_device (bsrv2_attach);
} }
......
...@@ -70,8 +70,7 @@ static char * mcfile = "/usr/lib/DVB/driver/frontends/Sc_main.mc"; ...@@ -70,8 +70,7 @@ static char * mcfile = "/usr/lib/DVB/driver/frontends/Sc_main.mc";
static int errno; static int errno;
static static struct dvb_frontend_info tdlb7_info = {
struct dvb_frontend_info tdlb7_info = {
.name = "Alps TDLB7", .name = "Alps TDLB7",
.type = FE_OFDM, .type = FE_OFDM,
.frequency_min = 470000000, .frequency_min = 470000000,
...@@ -90,8 +89,7 @@ struct dvb_frontend_info tdlb7_info = { ...@@ -90,8 +89,7 @@ struct dvb_frontend_info tdlb7_info = {
}; };
static static int sp8870_writereg (struct dvb_i2c_bus *i2c, u16 reg, u16 data)
int sp8870_writereg (struct dvb_i2c_bus *i2c, u16 reg, u16 data)
{ {
u8 buf [] = { reg >> 8, reg & 0xff, data >> 8, data & 0xff }; u8 buf [] = { reg >> 8, reg & 0xff, data >> 8, data & 0xff };
struct i2c_msg msg = { .addr = 0x71, .flags = 0, .buf = buf, .len = 4 }; struct i2c_msg msg = { .addr = 0x71, .flags = 0, .buf = buf, .len = 4 };
...@@ -106,8 +104,7 @@ int sp8870_writereg (struct dvb_i2c_bus *i2c, u16 reg, u16 data) ...@@ -106,8 +104,7 @@ int sp8870_writereg (struct dvb_i2c_bus *i2c, u16 reg, u16 data)
} }
static static u16 sp8870_readreg (struct dvb_i2c_bus *i2c, u16 reg)
u16 sp8870_readreg (struct dvb_i2c_bus *i2c, u16 reg)
{ {
int ret; int ret;
u8 b0 [] = { reg >> 8 , reg & 0xff }; u8 b0 [] = { reg >> 8 , reg & 0xff };
...@@ -124,8 +121,7 @@ u16 sp8870_readreg (struct dvb_i2c_bus *i2c, u16 reg) ...@@ -124,8 +121,7 @@ u16 sp8870_readreg (struct dvb_i2c_bus *i2c, u16 reg)
} }
static static int sp5659_write (struct dvb_i2c_bus *i2c, u8 data [4])
int sp5659_write (struct dvb_i2c_bus *i2c, u8 data [4])
{ {
int ret; int ret;
struct i2c_msg msg = { .addr = 0x60, .flags = 0, .buf = data, .len = 4 }; struct i2c_msg msg = { .addr = 0x60, .flags = 0, .buf = data, .len = 4 };
...@@ -139,8 +135,7 @@ int sp5659_write (struct dvb_i2c_bus *i2c, u8 data [4]) ...@@ -139,8 +135,7 @@ int sp5659_write (struct dvb_i2c_bus *i2c, u8 data [4])
} }
static static int sp5659_set_tv_freq (struct dvb_i2c_bus *i2c, u32 freq)
int sp5659_set_tv_freq (struct dvb_i2c_bus *i2c, u32 freq)
{ {
u32 div = (freq + 36200000) / 166666; u32 div = (freq + 36200000) / 166666;
u8 buf [4]; u8 buf [4];
...@@ -160,8 +155,7 @@ int sp5659_set_tv_freq (struct dvb_i2c_bus *i2c, u32 freq) ...@@ -160,8 +155,7 @@ int sp5659_set_tv_freq (struct dvb_i2c_bus *i2c, u32 freq)
} }
static static int sp8870_read_code(const char *fn, char **fp)
int sp8870_read_code(const char *fn, char **fp)
{ {
int fd; int fd;
loff_t l; loff_t l;
...@@ -197,8 +191,7 @@ int sp8870_read_code(const char *fn, char **fp) ...@@ -197,8 +191,7 @@ int sp8870_read_code(const char *fn, char **fp)
} }
static static int sp8870_load_code(struct dvb_i2c_bus *i2c)
int sp8870_load_code(struct dvb_i2c_bus *i2c)
{ {
/* this takes a long time. is there a way to do it faster? */ /* this takes a long time. is there a way to do it faster? */
char *lcode; char *lcode;
...@@ -245,8 +238,7 @@ int sp8870_load_code(struct dvb_i2c_bus *i2c) ...@@ -245,8 +238,7 @@ int sp8870_load_code(struct dvb_i2c_bus *i2c)
}; };
static static int sp8870_init (struct dvb_i2c_bus *i2c)
int sp8870_init (struct dvb_i2c_bus *i2c)
{ {
dprintk ("%s\n", __FUNCTION__); dprintk ("%s\n", __FUNCTION__);
...@@ -285,8 +277,7 @@ int sp8870_init (struct dvb_i2c_bus *i2c) ...@@ -285,8 +277,7 @@ int sp8870_init (struct dvb_i2c_bus *i2c)
} }
static static int tdlb7_ioctl (struct dvb_frontend *fe, unsigned int cmd, void *arg)
int tdlb7_ioctl (struct dvb_frontend *fe, unsigned int cmd, void *arg)
{ {
struct dvb_i2c_bus *i2c = fe->i2c; struct dvb_i2c_bus *i2c = fe->i2c;
...@@ -415,8 +406,7 @@ int tdlb7_ioctl (struct dvb_frontend *fe, unsigned int cmd, void *arg) ...@@ -415,8 +406,7 @@ int tdlb7_ioctl (struct dvb_frontend *fe, unsigned int cmd, void *arg)
} }
static static int tdlb7_attach (struct dvb_i2c_bus *i2c)
int tdlb7_attach (struct dvb_i2c_bus *i2c)
{ {
struct i2c_msg msg = { .addr = 0x71, .flags = 0, .buf = NULL, .len = 0 }; struct i2c_msg msg = { .addr = 0x71, .flags = 0, .buf = NULL, .len = 0 };
...@@ -440,8 +430,7 @@ int tdlb7_attach (struct dvb_i2c_bus *i2c) ...@@ -440,8 +430,7 @@ int tdlb7_attach (struct dvb_i2c_bus *i2c)
} }
static static void tdlb7_detach (struct dvb_i2c_bus *i2c)
void tdlb7_detach (struct dvb_i2c_bus *i2c)
{ {
dprintk ("%s\n", __FUNCTION__); dprintk ("%s\n", __FUNCTION__);
...@@ -449,8 +438,7 @@ void tdlb7_detach (struct dvb_i2c_bus *i2c) ...@@ -449,8 +438,7 @@ void tdlb7_detach (struct dvb_i2c_bus *i2c)
} }
static static int __init init_tdlb7 (void)
int __init init_tdlb7 (void)
{ {
dprintk ("%s\n", __FUNCTION__); dprintk ("%s\n", __FUNCTION__);
...@@ -458,8 +446,7 @@ int __init init_tdlb7 (void) ...@@ -458,8 +446,7 @@ int __init init_tdlb7 (void)
} }
static static void __exit exit_tdlb7 (void)
void __exit exit_tdlb7 (void)
{ {
dprintk ("%s\n", __FUNCTION__); dprintk ("%s\n", __FUNCTION__);
......
...@@ -34,8 +34,7 @@ static int debug = 0; ...@@ -34,8 +34,7 @@ static int debug = 0;
#define dprintk if (debug) printk #define dprintk if (debug) printk
static static struct dvb_frontend_info tdmb7_info = {
struct dvb_frontend_info tdmb7_info = {
.name = "Alps TDMB7", .name = "Alps TDMB7",
.type = FE_OFDM, .type = FE_OFDM,
.frequency_min = 470000000, .frequency_min = 470000000,
...@@ -55,8 +54,7 @@ struct dvb_frontend_info tdmb7_info = { ...@@ -55,8 +54,7 @@ struct dvb_frontend_info tdmb7_info = {
}; };
static static u8 init_tab [] = {
u8 init_tab [] = {
0x04, 0x10, 0x04, 0x10,
0x05, 0x09, 0x05, 0x09,
0x06, 0x00, 0x06, 0x00,
...@@ -78,8 +76,7 @@ u8 init_tab [] = { ...@@ -78,8 +76,7 @@ u8 init_tab [] = {
}; };
static static int cx22700_writereg (struct dvb_i2c_bus *i2c, u8 reg, u8 data)
int cx22700_writereg (struct dvb_i2c_bus *i2c, u8 reg, u8 data)
{ {
int ret; int ret;
u8 buf [] = { reg, data }; u8 buf [] = { reg, data };
...@@ -97,8 +94,7 @@ int cx22700_writereg (struct dvb_i2c_bus *i2c, u8 reg, u8 data) ...@@ -97,8 +94,7 @@ int cx22700_writereg (struct dvb_i2c_bus *i2c, u8 reg, u8 data)
} }
static static u8 cx22700_readreg (struct dvb_i2c_bus *i2c, u8 reg)
u8 cx22700_readreg (struct dvb_i2c_bus *i2c, u8 reg)
{ {
int ret; int ret;
u8 b0 [] = { reg }; u8 b0 [] = { reg };
...@@ -117,8 +113,7 @@ u8 cx22700_readreg (struct dvb_i2c_bus *i2c, u8 reg) ...@@ -117,8 +113,7 @@ u8 cx22700_readreg (struct dvb_i2c_bus *i2c, u8 reg)
} }
static static int pll_write (struct dvb_i2c_bus *i2c, u8 data [4])
int pll_write (struct dvb_i2c_bus *i2c, u8 data [4])
{ {
struct i2c_msg msg = { .addr = 0x61, .flags = 0, .buf = data, .len = 4 }; struct i2c_msg msg = { .addr = 0x61, .flags = 0, .buf = data, .len = 4 };
int ret; int ret;
...@@ -138,8 +133,7 @@ int pll_write (struct dvb_i2c_bus *i2c, u8 data [4]) ...@@ -138,8 +133,7 @@ int pll_write (struct dvb_i2c_bus *i2c, u8 data [4])
* set up the downconverter frequency divisor for a * set up the downconverter frequency divisor for a
* reference clock comparision frequency of 125 kHz. * reference clock comparision frequency of 125 kHz.
*/ */
static static int pll_set_tv_freq (struct dvb_i2c_bus *i2c, u32 freq)
int pll_set_tv_freq (struct dvb_i2c_bus *i2c, u32 freq)
{ {
u32 div = (freq + 36166667) / 166667; u32 div = (freq + 36166667) / 166667;
#if 1 //ALPS_SETTINGS #if 1 //ALPS_SETTINGS
...@@ -156,8 +150,7 @@ int pll_set_tv_freq (struct dvb_i2c_bus *i2c, u32 freq) ...@@ -156,8 +150,7 @@ int pll_set_tv_freq (struct dvb_i2c_bus *i2c, u32 freq)
} }
static static int cx22700_init (struct dvb_i2c_bus *i2c)
int cx22700_init (struct dvb_i2c_bus *i2c)
{ {
int i; int i;
...@@ -177,8 +170,7 @@ int cx22700_init (struct dvb_i2c_bus *i2c) ...@@ -177,8 +170,7 @@ int cx22700_init (struct dvb_i2c_bus *i2c)
} }
static static int cx22700_set_inversion (struct dvb_i2c_bus *i2c, int inversion)
int cx22700_set_inversion (struct dvb_i2c_bus *i2c, int inversion)
{ {
u8 val; u8 val;
...@@ -199,8 +191,7 @@ int cx22700_set_inversion (struct dvb_i2c_bus *i2c, int inversion) ...@@ -199,8 +191,7 @@ int cx22700_set_inversion (struct dvb_i2c_bus *i2c, int inversion)
} }
static static int cx22700_set_tps (struct dvb_i2c_bus *i2c, struct dvb_ofdm_parameters *p)
int cx22700_set_tps (struct dvb_i2c_bus *i2c, struct dvb_ofdm_parameters *p)
{ {
static const u8 qam_tab [4] = { 0, 1, 0, 2 }; static const u8 qam_tab [4] = { 0, 1, 0, 2 };
static const u8 fec_tab [6] = { 0, 1, 2, 0, 3, 4 }; static const u8 fec_tab [6] = { 0, 1, 2, 0, 3, 4 };
...@@ -263,8 +254,7 @@ int cx22700_set_tps (struct dvb_i2c_bus *i2c, struct dvb_ofdm_parameters *p) ...@@ -263,8 +254,7 @@ int cx22700_set_tps (struct dvb_i2c_bus *i2c, struct dvb_ofdm_parameters *p)
} }
static static int cx22700_get_tps (struct dvb_i2c_bus *i2c, struct dvb_ofdm_parameters *p)
int cx22700_get_tps (struct dvb_i2c_bus *i2c, struct dvb_ofdm_parameters *p)
{ {
static const fe_modulation_t qam_tab [3] = { QPSK, QAM_16, QAM_64 }; static const fe_modulation_t qam_tab [3] = { QPSK, QAM_16, QAM_64 };
static const fe_code_rate_t fec_tab [5] = { FEC_1_2, FEC_2_3, FEC_3_4, static const fe_code_rate_t fec_tab [5] = { FEC_1_2, FEC_2_3, FEC_3_4,
...@@ -311,8 +301,7 @@ int cx22700_get_tps (struct dvb_i2c_bus *i2c, struct dvb_ofdm_parameters *p) ...@@ -311,8 +301,7 @@ int cx22700_get_tps (struct dvb_i2c_bus *i2c, struct dvb_ofdm_parameters *p)
} }
static static int tdmb7_ioctl (struct dvb_frontend *fe, unsigned int cmd, void *arg)
int tdmb7_ioctl (struct dvb_frontend *fe, unsigned int cmd, void *arg)
{ {
struct dvb_i2c_bus *i2c = fe->i2c; struct dvb_i2c_bus *i2c = fe->i2c;
...@@ -413,8 +402,7 @@ int tdmb7_ioctl (struct dvb_frontend *fe, unsigned int cmd, void *arg) ...@@ -413,8 +402,7 @@ int tdmb7_ioctl (struct dvb_frontend *fe, unsigned int cmd, void *arg)
static static int tdmb7_attach (struct dvb_i2c_bus *i2c)
int tdmb7_attach (struct dvb_i2c_bus *i2c)
{ {
struct i2c_msg msg = { .addr = 0x43, .flags = 0, .buf = NULL,. len = 0 }; struct i2c_msg msg = { .addr = 0x43, .flags = 0, .buf = NULL,. len = 0 };
...@@ -429,8 +417,7 @@ int tdmb7_attach (struct dvb_i2c_bus *i2c) ...@@ -429,8 +417,7 @@ int tdmb7_attach (struct dvb_i2c_bus *i2c)
} }
static static void tdmb7_detach (struct dvb_i2c_bus *i2c)
void tdmb7_detach (struct dvb_i2c_bus *i2c)
{ {
dprintk ("%s\n", __FUNCTION__); dprintk ("%s\n", __FUNCTION__);
...@@ -438,8 +425,7 @@ void tdmb7_detach (struct dvb_i2c_bus *i2c) ...@@ -438,8 +425,7 @@ void tdmb7_detach (struct dvb_i2c_bus *i2c)
} }
static static int __init init_tdmb7 (void)
int __init init_tdmb7 (void)
{ {
dprintk ("%s\n", __FUNCTION__); dprintk ("%s\n", __FUNCTION__);
...@@ -447,8 +433,7 @@ int __init init_tdmb7 (void) ...@@ -447,8 +433,7 @@ int __init init_tdmb7 (void)
} }
static static void __exit exit_tdmb7 (void)
void __exit exit_tdmb7 (void)
{ {
dprintk ("%s\n", __FUNCTION__); dprintk ("%s\n", __FUNCTION__);
......
...@@ -74,8 +74,7 @@ static struct dvb_frontend_info at76c651_info = { ...@@ -74,8 +74,7 @@ static struct dvb_frontend_info at76c651_info = {
}; };
#if ! defined(__powerpc__) #if ! defined(__powerpc__)
static __inline__ int static __inline__ int __ilog2(unsigned long x)
__ilog2(unsigned long x)
{ {
int i; int i;
...@@ -89,8 +88,7 @@ __ilog2(unsigned long x) ...@@ -89,8 +88,7 @@ __ilog2(unsigned long x)
} }
#endif #endif
static int static int at76c651_writereg(struct dvb_i2c_bus *i2c, u8 reg, u8 data)
at76c651_writereg(struct dvb_i2c_bus *i2c, u8 reg, u8 data)
{ {
int ret; int ret;
...@@ -110,8 +108,7 @@ at76c651_writereg(struct dvb_i2c_bus *i2c, u8 reg, u8 data) ...@@ -110,8 +108,7 @@ at76c651_writereg(struct dvb_i2c_bus *i2c, u8 reg, u8 data)
} }
static u8 static u8 at76c651_readreg(struct dvb_i2c_bus *i2c, u8 reg)
at76c651_readreg(struct dvb_i2c_bus *i2c, u8 reg)
{ {
int ret; int ret;
...@@ -129,8 +126,7 @@ at76c651_readreg(struct dvb_i2c_bus *i2c, u8 reg) ...@@ -129,8 +126,7 @@ at76c651_readreg(struct dvb_i2c_bus *i2c, u8 reg)
} }
static int static int at76c651_set_auto_config(struct dvb_i2c_bus *i2c)
at76c651_set_auto_config(struct dvb_i2c_bus *i2c)
{ {
at76c651_writereg(i2c, 0x06, 0x01); at76c651_writereg(i2c, 0x06, 0x01);
...@@ -149,8 +145,7 @@ at76c651_set_auto_config(struct dvb_i2c_bus *i2c) ...@@ -149,8 +145,7 @@ at76c651_set_auto_config(struct dvb_i2c_bus *i2c)
} }
static int static int at76c651_set_bbfreq(struct dvb_i2c_bus *i2c)
at76c651_set_bbfreq(struct dvb_i2c_bus *i2c)
{ {
at76c651_writereg(i2c, 0x04, 0x3f); at76c651_writereg(i2c, 0x04, 0x3f);
...@@ -160,24 +155,21 @@ at76c651_set_bbfreq(struct dvb_i2c_bus *i2c) ...@@ -160,24 +155,21 @@ at76c651_set_bbfreq(struct dvb_i2c_bus *i2c)
} }
static int static int at76c651_reset(struct dvb_i2c_bus *i2c)
at76c651_reset(struct dvb_i2c_bus *i2c)
{ {
return at76c651_writereg(i2c, 0x07, 0x01); return at76c651_writereg(i2c, 0x07, 0x01);
} }
static int static int at76c651_disable_interrupts(struct dvb_i2c_bus *i2c)
at76c651_disable_interrupts(struct dvb_i2c_bus *i2c)
{ {
return at76c651_writereg(i2c, 0x0b, 0x00); return at76c651_writereg(i2c, 0x0b, 0x00);
} }
static int static int at76c651_switch_tuner_i2c(struct dvb_i2c_bus *i2c, u8 enable)
at76c651_switch_tuner_i2c(struct dvb_i2c_bus *i2c, u8 enable)
{ {
if (enable) if (enable)
...@@ -187,8 +179,7 @@ at76c651_switch_tuner_i2c(struct dvb_i2c_bus *i2c, u8 enable) ...@@ -187,8 +179,7 @@ at76c651_switch_tuner_i2c(struct dvb_i2c_bus *i2c, u8 enable)
} }
static int static int dat7021_write(struct dvb_i2c_bus *i2c, u32 tw)
dat7021_write(struct dvb_i2c_bus *i2c, u32 tw)
{ {
int ret; int ret;
...@@ -210,8 +201,7 @@ dat7021_write(struct dvb_i2c_bus *i2c, u32 tw) ...@@ -210,8 +201,7 @@ dat7021_write(struct dvb_i2c_bus *i2c, u32 tw)
} }
static int static int dat7021_set_tv_freq(struct dvb_i2c_bus *i2c, u32 freq)
dat7021_set_tv_freq(struct dvb_i2c_bus *i2c, u32 freq)
{ {
u32 dw; u32 dw;
...@@ -239,8 +229,7 @@ dat7021_set_tv_freq(struct dvb_i2c_bus *i2c, u32 freq) ...@@ -239,8 +229,7 @@ dat7021_set_tv_freq(struct dvb_i2c_bus *i2c, u32 freq)
} }
static int static int at76c651_set_symbolrate(struct dvb_i2c_bus *i2c, u32 symbolrate)
at76c651_set_symbolrate(struct dvb_i2c_bus *i2c, u32 symbolrate)
{ {
u8 exponent; u8 exponent;
...@@ -266,8 +255,7 @@ at76c651_set_symbolrate(struct dvb_i2c_bus *i2c, u32 symbolrate) ...@@ -266,8 +255,7 @@ at76c651_set_symbolrate(struct dvb_i2c_bus *i2c, u32 symbolrate)
} }
static int static int at76c651_set_qam(struct dvb_i2c_bus *i2c, fe_modulation_t qam)
at76c651_set_qam(struct dvb_i2c_bus *i2c, fe_modulation_t qam)
{ {
u8 qamsel = 0; u8 qamsel = 0;
...@@ -309,8 +297,7 @@ at76c651_set_qam(struct dvb_i2c_bus *i2c, fe_modulation_t qam) ...@@ -309,8 +297,7 @@ at76c651_set_qam(struct dvb_i2c_bus *i2c, fe_modulation_t qam)
} }
static int static int at76c651_set_inversion(struct dvb_i2c_bus *i2c,
at76c651_set_inversion(struct dvb_i2c_bus *i2c,
fe_spectral_inversion_t inversion) fe_spectral_inversion_t inversion)
{ {
...@@ -338,8 +325,7 @@ at76c651_set_inversion(struct dvb_i2c_bus *i2c, ...@@ -338,8 +325,7 @@ at76c651_set_inversion(struct dvb_i2c_bus *i2c,
} }
static int static int at76c651_set_parameters(struct dvb_i2c_bus *i2c,
at76c651_set_parameters(struct dvb_i2c_bus *i2c,
struct dvb_frontend_parameters *p) struct dvb_frontend_parameters *p)
{ {
...@@ -352,8 +338,7 @@ at76c651_set_parameters(struct dvb_i2c_bus *i2c, ...@@ -352,8 +338,7 @@ at76c651_set_parameters(struct dvb_i2c_bus *i2c,
} }
static int static int at76c651_set_defaults(struct dvb_i2c_bus *i2c)
at76c651_set_defaults(struct dvb_i2c_bus *i2c)
{ {
at76c651_set_symbolrate(i2c, 6900000); at76c651_set_symbolrate(i2c, 6900000);
...@@ -366,8 +351,7 @@ at76c651_set_defaults(struct dvb_i2c_bus *i2c) ...@@ -366,8 +351,7 @@ at76c651_set_defaults(struct dvb_i2c_bus *i2c)
} }
static int static int at76c651_ioctl(struct dvb_frontend *fe, unsigned int cmd, void *arg)
at76c651_ioctl(struct dvb_frontend *fe, unsigned int cmd, void *arg)
{ {
switch (cmd) { switch (cmd) {
...@@ -463,8 +447,7 @@ at76c651_ioctl(struct dvb_frontend *fe, unsigned int cmd, void *arg) ...@@ -463,8 +447,7 @@ at76c651_ioctl(struct dvb_frontend *fe, unsigned int cmd, void *arg)
} }
static int static int at76c651_attach(struct dvb_i2c_bus *i2c)
at76c651_attach(struct dvb_i2c_bus *i2c)
{ {
if (at76c651_readreg(i2c, 0x0e) != 0x65) { if (at76c651_readreg(i2c, 0x0e) != 0x65) {
...@@ -503,8 +486,7 @@ at76c651_attach(struct dvb_i2c_bus *i2c) ...@@ -503,8 +486,7 @@ at76c651_attach(struct dvb_i2c_bus *i2c)
} }
static void static void at76c651_detach(struct dvb_i2c_bus *i2c)
at76c651_detach(struct dvb_i2c_bus *i2c)
{ {
dvb_unregister_frontend(at76c651_ioctl, i2c); dvb_unregister_frontend(at76c651_ioctl, i2c);
...@@ -513,8 +495,7 @@ at76c651_detach(struct dvb_i2c_bus *i2c) ...@@ -513,8 +495,7 @@ at76c651_detach(struct dvb_i2c_bus *i2c)
} }
static int __init static int __init at76c651_init(void)
at76c651_init(void)
{ {
return dvb_register_i2c_device(THIS_MODULE, at76c651_attach, return dvb_register_i2c_device(THIS_MODULE, at76c651_attach,
...@@ -522,8 +503,7 @@ at76c651_init(void) ...@@ -522,8 +503,7 @@ at76c651_init(void)
} }
static void __exit static void __exit at76c651_exit(void)
at76c651_exit(void)
{ {
dvb_unregister_i2c_device(at76c651_attach); dvb_unregister_i2c_device(at76c651_attach);
......
...@@ -44,8 +44,7 @@ static int debug = 0; ...@@ -44,8 +44,7 @@ static int debug = 0;
#define dprintk if (debug) printk #define dprintk if (debug) printk
static static struct dvb_frontend_info cx24110_info = {
struct dvb_frontend_info cx24110_info = {
.name = "Conexant CX24110 with CX24108 tuner, aka HM1221/HM1811", .name = "Conexant CX24110 with CX24108 tuner, aka HM1221/HM1811",
.type = FE_QPSK, .type = FE_QPSK,
.frequency_min = 950000, .frequency_min = 950000,
...@@ -66,8 +65,7 @@ struct dvb_frontend_info cx24110_info = { ...@@ -66,8 +65,7 @@ struct dvb_frontend_info cx24110_info = {
/* fixme: are these values correct? especially ..._tolerance and caps */ /* fixme: are these values correct? especially ..._tolerance and caps */
static static struct {u8 reg; u8 data;} cx24110_regdata[]=
struct {u8 reg; u8 data;} cx24110_regdata[]=
/* Comments beginning with @ denote this value should /* Comments beginning with @ denote this value should
be the default */ be the default */
{{0x09,0x01}, /* SoftResetAll */ {{0x09,0x01}, /* SoftResetAll */
...@@ -130,8 +128,7 @@ struct {u8 reg; u8 data;} cx24110_regdata[]= ...@@ -130,8 +128,7 @@ struct {u8 reg; u8 data;} cx24110_regdata[]=
}; };
static static int cx24110_writereg (struct dvb_i2c_bus *i2c, int reg, int data)
int cx24110_writereg (struct dvb_i2c_bus *i2c, int reg, int data)
{ {
u8 buf [] = { reg, data }; u8 buf [] = { reg, data };
struct i2c_msg msg = { .addr = 0x55, .flags = 0, .buf = buf, .len = 2 }; struct i2c_msg msg = { .addr = 0x55, .flags = 0, .buf = buf, .len = 2 };
...@@ -148,8 +145,7 @@ int cx24110_writereg (struct dvb_i2c_bus *i2c, int reg, int data) ...@@ -148,8 +145,7 @@ int cx24110_writereg (struct dvb_i2c_bus *i2c, int reg, int data)
} }
static static u8 cx24110_readreg (struct dvb_i2c_bus *i2c, u8 reg)
u8 cx24110_readreg (struct dvb_i2c_bus *i2c, u8 reg)
{ {
int ret; int ret;
u8 b0 [] = { reg }; u8 b0 [] = { reg };
...@@ -166,8 +162,7 @@ u8 cx24110_readreg (struct dvb_i2c_bus *i2c, u8 reg) ...@@ -166,8 +162,7 @@ u8 cx24110_readreg (struct dvb_i2c_bus *i2c, u8 reg)
} }
static static int cx24108_write (struct dvb_i2c_bus *i2c, u32 data)
int cx24108_write (struct dvb_i2c_bus *i2c, u32 data)
{ {
/* tuner data is 21 bits long, must be left-aligned in data */ /* tuner data is 21 bits long, must be left-aligned in data */
/* tuner cx24108 is written through a dedicated 3wire interface on the demod chip */ /* tuner cx24108 is written through a dedicated 3wire interface on the demod chip */
...@@ -201,8 +196,7 @@ dprintk("cx24110 debug: cx24108_write(%8.8x)\n",data); ...@@ -201,8 +196,7 @@ dprintk("cx24110 debug: cx24108_write(%8.8x)\n",data);
} }
static static int cx24108_set_tv_freq (struct dvb_i2c_bus *i2c, u32 freq)
int cx24108_set_tv_freq (struct dvb_i2c_bus *i2c, u32 freq)
{ {
/* fixme (low): error handling */ /* fixme (low): error handling */
int i, a, n, pump; int i, a, n, pump;
...@@ -266,8 +260,7 @@ int cx24108_set_tv_freq (struct dvb_i2c_bus *i2c, u32 freq) ...@@ -266,8 +260,7 @@ int cx24108_set_tv_freq (struct dvb_i2c_bus *i2c, u32 freq)
} }
static static int cx24110_init (struct dvb_i2c_bus *i2c)
int cx24110_init (struct dvb_i2c_bus *i2c)
{ {
/* fixme (low): error handling */ /* fixme (low): error handling */
int i; int i;
...@@ -282,8 +275,7 @@ int cx24110_init (struct dvb_i2c_bus *i2c) ...@@ -282,8 +275,7 @@ int cx24110_init (struct dvb_i2c_bus *i2c)
} }
static static int cx24110_set_inversion (struct dvb_i2c_bus *i2c, fe_spectral_inversion_t inversion)
int cx24110_set_inversion (struct dvb_i2c_bus *i2c, fe_spectral_inversion_t inversion)
{ {
/* fixme (low): error handling */ /* fixme (low): error handling */
...@@ -318,8 +310,7 @@ int cx24110_set_inversion (struct dvb_i2c_bus *i2c, fe_spectral_inversion_t inve ...@@ -318,8 +310,7 @@ int cx24110_set_inversion (struct dvb_i2c_bus *i2c, fe_spectral_inversion_t inve
} }
static static int cx24110_set_fec (struct dvb_i2c_bus *i2c, fe_code_rate_t fec)
int cx24110_set_fec (struct dvb_i2c_bus *i2c, fe_code_rate_t fec)
{ {
/* fixme (low): error handling */ /* fixme (low): error handling */
...@@ -365,8 +356,7 @@ int cx24110_set_fec (struct dvb_i2c_bus *i2c, fe_code_rate_t fec) ...@@ -365,8 +356,7 @@ int cx24110_set_fec (struct dvb_i2c_bus *i2c, fe_code_rate_t fec)
} }
static static fe_code_rate_t cx24110_get_fec (struct dvb_i2c_bus *i2c)
fe_code_rate_t cx24110_get_fec (struct dvb_i2c_bus *i2c)
{ {
int i; int i;
...@@ -383,8 +373,7 @@ fe_code_rate_t cx24110_get_fec (struct dvb_i2c_bus *i2c) ...@@ -383,8 +373,7 @@ fe_code_rate_t cx24110_get_fec (struct dvb_i2c_bus *i2c)
} }
static static int cx24110_set_symbolrate (struct dvb_i2c_bus *i2c, u32 srate)
int cx24110_set_symbolrate (struct dvb_i2c_bus *i2c, u32 srate)
{ {
/* fixme (low): add error handling */ /* fixme (low): add error handling */
u32 ratio; u32 ratio;
...@@ -466,8 +455,7 @@ dprintk("cx24110 debug: entering %s(%d)\n",__FUNCTION__,srate); ...@@ -466,8 +455,7 @@ dprintk("cx24110 debug: entering %s(%d)\n",__FUNCTION__,srate);
} }
static static int cx24110_set_voltage (struct dvb_i2c_bus *i2c, fe_sec_voltage_t voltage)
int cx24110_set_voltage (struct dvb_i2c_bus *i2c, fe_sec_voltage_t voltage)
{ {
switch (voltage) { switch (voltage) {
case SEC_VOLTAGE_13: case SEC_VOLTAGE_13:
...@@ -494,8 +482,7 @@ static void sendDiSEqCMessage(struct dvb_i2c_bus *i2c, struct dvb_diseqc_master_ ...@@ -494,8 +482,7 @@ static void sendDiSEqCMessage(struct dvb_i2c_bus *i2c, struct dvb_diseqc_master_
} }
static static int cx24110_ioctl (struct dvb_frontend *fe, unsigned int cmd, void *arg)
int cx24110_ioctl (struct dvb_frontend *fe, unsigned int cmd, void *arg)
{ {
struct dvb_i2c_bus *i2c = fe->i2c; struct dvb_i2c_bus *i2c = fe->i2c;
static int lastber=0, lastbyer=0,lastbler=0, lastesn0=0, sum_bler=0; static int lastber=0, lastbyer=0,lastbler=0, lastesn0=0, sum_bler=0;
...@@ -656,8 +643,7 @@ int cx24110_ioctl (struct dvb_frontend *fe, unsigned int cmd, void *arg) ...@@ -656,8 +643,7 @@ int cx24110_ioctl (struct dvb_frontend *fe, unsigned int cmd, void *arg)
} }
static static int cx24110_attach (struct dvb_i2c_bus *i2c)
int cx24110_attach (struct dvb_i2c_bus *i2c)
{ {
u8 sig; u8 sig;
...@@ -671,22 +657,19 @@ int cx24110_attach (struct dvb_i2c_bus *i2c) ...@@ -671,22 +657,19 @@ int cx24110_attach (struct dvb_i2c_bus *i2c)
} }
static static void cx24110_detach (struct dvb_i2c_bus *i2c)
void cx24110_detach (struct dvb_i2c_bus *i2c)
{ {
dvb_unregister_frontend (cx24110_ioctl, i2c); dvb_unregister_frontend (cx24110_ioctl, i2c);
} }
static static int __init init_cx24110 (void)
int __init init_cx24110 (void)
{ {
return dvb_register_i2c_device (THIS_MODULE, cx24110_attach, cx24110_detach); return dvb_register_i2c_device (THIS_MODULE, cx24110_attach, cx24110_detach);
} }
static static void __exit exit_cx24110 (void)
void __exit exit_cx24110 (void)
{ {
dvb_unregister_i2c_device (cx24110_attach); dvb_unregister_i2c_device (cx24110_attach);
} }
......
...@@ -30,8 +30,7 @@ static int sct = 0; ...@@ -30,8 +30,7 @@ static int sct = 0;
/* depending on module parameter sct deliver different infos /* depending on module parameter sct deliver different infos
*/ */
static static struct dvb_frontend_info dvb_s_dummyfe_info = {
struct dvb_frontend_info dvb_s_dummyfe_info = {
.name = "DVB-S dummy frontend", .name = "DVB-S dummy frontend",
.type = FE_QPSK, .type = FE_QPSK,
.frequency_min = 950000, .frequency_min = 950000,
...@@ -48,8 +47,7 @@ struct dvb_frontend_info dvb_s_dummyfe_info = { ...@@ -48,8 +47,7 @@ struct dvb_frontend_info dvb_s_dummyfe_info = {
FE_CAN_QPSK FE_CAN_QPSK
}; };
static static struct dvb_frontend_info dvb_c_dummyfe_info = {
struct dvb_frontend_info dvb_c_dummyfe_info = {
.name = "DVB-C dummy frontend", .name = "DVB-C dummy frontend",
.type = FE_QAM, .type = FE_QAM,
.frequency_stepsize = 62500, .frequency_stepsize = 62500,
...@@ -103,8 +101,7 @@ struct dvb_frontend_info *frontend_info(void) ...@@ -103,8 +101,7 @@ struct dvb_frontend_info *frontend_info(void)
} }
static static int dvbdummyfe_ioctl (struct dvb_frontend *fe, unsigned int cmd, void *arg)
int dvbdummyfe_ioctl (struct dvb_frontend *fe, unsigned int cmd, void *arg)
{ {
switch (cmd) { switch (cmd) {
case FE_GET_INFO: case FE_GET_INFO:
...@@ -176,23 +173,20 @@ int dvbdummyfe_ioctl (struct dvb_frontend *fe, unsigned int cmd, void *arg) ...@@ -176,23 +173,20 @@ int dvbdummyfe_ioctl (struct dvb_frontend *fe, unsigned int cmd, void *arg)
} }
static static int dvbdummyfe_attach (struct dvb_i2c_bus *i2c)
int dvbdummyfe_attach (struct dvb_i2c_bus *i2c)
{ {
dvb_register_frontend (dvbdummyfe_ioctl, i2c, NULL, frontend_info()); dvb_register_frontend (dvbdummyfe_ioctl, i2c, NULL, frontend_info());
return 0; return 0;
} }
static static void dvbdummyfe_detach (struct dvb_i2c_bus *i2c)
void dvbdummyfe_detach (struct dvb_i2c_bus *i2c)
{ {
dvb_unregister_frontend (dvbdummyfe_ioctl, i2c); dvb_unregister_frontend (dvbdummyfe_ioctl, i2c);
} }
static static int __init init_dvbdummyfe (void)
int __init init_dvbdummyfe (void)
{ {
return dvb_register_i2c_device (THIS_MODULE, return dvb_register_i2c_device (THIS_MODULE,
dvbdummyfe_attach, dvbdummyfe_attach,
...@@ -201,8 +195,7 @@ int __init init_dvbdummyfe (void) ...@@ -201,8 +195,7 @@ int __init init_dvbdummyfe (void)
} }
static static void __exit exit_dvbdummyfe (void)
void __exit exit_dvbdummyfe (void)
{ {
dvb_unregister_i2c_device (dvbdummyfe_attach); dvb_unregister_i2c_device (dvbdummyfe_attach);
return; return;
......
...@@ -52,8 +52,7 @@ struct dvb_frontend_info grundig_29504_401_info = { ...@@ -52,8 +52,7 @@ struct dvb_frontend_info grundig_29504_401_info = {
}; };
static static int l64781_writereg (struct dvb_i2c_bus *i2c, u8 reg, u8 data)
int l64781_writereg (struct dvb_i2c_bus *i2c, u8 reg, u8 data)
{ {
int ret; int ret;
u8 buf [] = { reg, data }; u8 buf [] = { reg, data };
...@@ -67,8 +66,7 @@ int l64781_writereg (struct dvb_i2c_bus *i2c, u8 reg, u8 data) ...@@ -67,8 +66,7 @@ int l64781_writereg (struct dvb_i2c_bus *i2c, u8 reg, u8 data)
} }
static static u8 l64781_readreg (struct dvb_i2c_bus *i2c, u8 reg)
u8 l64781_readreg (struct dvb_i2c_bus *i2c, u8 reg)
{ {
int ret; int ret;
u8 b0 [] = { reg }; u8 b0 [] = { reg };
...@@ -85,8 +83,7 @@ u8 l64781_readreg (struct dvb_i2c_bus *i2c, u8 reg) ...@@ -85,8 +83,7 @@ u8 l64781_readreg (struct dvb_i2c_bus *i2c, u8 reg)
} }
static static int tsa5060_write (struct dvb_i2c_bus *i2c, u8 data [4])
int tsa5060_write (struct dvb_i2c_bus *i2c, u8 data [4])
{ {
int ret; int ret;
struct i2c_msg msg = { .addr = 0x61, .flags = 0, .buf = data, .len = 4 }; struct i2c_msg msg = { .addr = 0x61, .flags = 0, .buf = data, .len = 4 };
...@@ -103,8 +100,7 @@ int tsa5060_write (struct dvb_i2c_bus *i2c, u8 data [4]) ...@@ -103,8 +100,7 @@ int tsa5060_write (struct dvb_i2c_bus *i2c, u8 data [4])
* reference clock comparision frequency of 166666 Hz. * reference clock comparision frequency of 166666 Hz.
* frequency offset is 36125000 Hz. * frequency offset is 36125000 Hz.
*/ */
static static int tsa5060_set_tv_freq (struct dvb_i2c_bus *i2c, u32 freq)
int tsa5060_set_tv_freq (struct dvb_i2c_bus *i2c, u32 freq)
{ {
u32 div; u32 div;
u8 buf [4]; u8 buf [4];
...@@ -127,8 +123,7 @@ int tsa5060_set_tv_freq (struct dvb_i2c_bus *i2c, u32 freq) ...@@ -127,8 +123,7 @@ int tsa5060_set_tv_freq (struct dvb_i2c_bus *i2c, u32 freq)
} }
static static void apply_tps (struct dvb_i2c_bus *i2c)
void apply_tps (struct dvb_i2c_bus *i2c)
{ {
l64781_writereg (i2c, 0x2a, 0x00); l64781_writereg (i2c, 0x2a, 0x00);
l64781_writereg (i2c, 0x2a, 0x01); l64781_writereg (i2c, 0x2a, 0x01);
...@@ -142,8 +137,7 @@ void apply_tps (struct dvb_i2c_bus *i2c) ...@@ -142,8 +137,7 @@ void apply_tps (struct dvb_i2c_bus *i2c)
} }
static static void reset_afc (struct dvb_i2c_bus *i2c)
void reset_afc (struct dvb_i2c_bus *i2c)
{ {
/* Set AFC stall for the AFC_INIT_FRQ setting, TIM_STALL for /* Set AFC stall for the AFC_INIT_FRQ setting, TIM_STALL for
timing offset */ timing offset */
...@@ -161,8 +155,7 @@ void reset_afc (struct dvb_i2c_bus *i2c) ...@@ -161,8 +155,7 @@ void reset_afc (struct dvb_i2c_bus *i2c)
} }
static static int apply_frontend_param (struct dvb_i2c_bus *i2c,
int apply_frontend_param (struct dvb_i2c_bus *i2c,
struct dvb_frontend_parameters *param) struct dvb_frontend_parameters *param)
{ {
/* The coderates for FEC_NONE, FEC_4_5 and FEC_FEC_6_7 are arbitrary */ /* The coderates for FEC_NONE, FEC_4_5 and FEC_FEC_6_7 are arbitrary */
...@@ -274,8 +267,7 @@ int apply_frontend_param (struct dvb_i2c_bus *i2c, ...@@ -274,8 +267,7 @@ int apply_frontend_param (struct dvb_i2c_bus *i2c,
} }
static static void reset_and_configure (struct dvb_i2c_bus *i2c)
void reset_and_configure (struct dvb_i2c_bus *i2c)
{ {
u8 buf [] = { 0x06 }; u8 buf [] = { 0x06 };
struct i2c_msg msg = { .addr = 0x00, .flags = 0, .buf = buf, .len = 1 }; struct i2c_msg msg = { .addr = 0x00, .flags = 0, .buf = buf, .len = 1 };
...@@ -285,8 +277,7 @@ void reset_and_configure (struct dvb_i2c_bus *i2c) ...@@ -285,8 +277,7 @@ void reset_and_configure (struct dvb_i2c_bus *i2c)
static static int init (struct dvb_i2c_bus *i2c)
int init (struct dvb_i2c_bus *i2c)
{ {
reset_and_configure (i2c); reset_and_configure (i2c);
...@@ -424,8 +415,7 @@ int grundig_29504_401_ioctl (struct dvb_frontend *fe, ...@@ -424,8 +415,7 @@ int grundig_29504_401_ioctl (struct dvb_frontend *fe,
} }
static static int l64781_attach (struct dvb_i2c_bus *i2c)
int l64781_attach (struct dvb_i2c_bus *i2c)
{ {
u8 b0 [] = { 0x1a }; u8 b0 [] = { 0x1a };
u8 b1 [] = { 0x00 }; u8 b1 [] = { 0x00 };
...@@ -449,23 +439,20 @@ int l64781_attach (struct dvb_i2c_bus *i2c) ...@@ -449,23 +439,20 @@ int l64781_attach (struct dvb_i2c_bus *i2c)
} }
static static void l64781_detach (struct dvb_i2c_bus *i2c)
void l64781_detach (struct dvb_i2c_bus *i2c)
{ {
dvb_unregister_frontend (grundig_29504_401_ioctl, i2c); dvb_unregister_frontend (grundig_29504_401_ioctl, i2c);
} }
static static int __init init_grundig_29504_401 (void)
int __init init_grundig_29504_401 (void)
{ {
return dvb_register_i2c_device (THIS_MODULE, return dvb_register_i2c_device (THIS_MODULE,
l64781_attach, l64781_detach); l64781_attach, l64781_detach);
} }
static static void __exit exit_grundig_29504_401 (void)
void __exit exit_grundig_29504_401 (void)
{ {
dvb_unregister_i2c_device (l64781_attach); dvb_unregister_i2c_device (l64781_attach);
} }
......
...@@ -37,8 +37,7 @@ static int debug = 0; ...@@ -37,8 +37,7 @@ static int debug = 0;
#define dprintk if (debug) printk #define dprintk if (debug) printk
static static struct dvb_frontend_info grundig_29504_491_info = {
struct dvb_frontend_info grundig_29504_491_info = {
.name = "Grundig 29504-491, (TDA8083 based)", .name = "Grundig 29504-491, (TDA8083 based)",
.type = FE_QPSK, .type = FE_QPSK,
.frequency_min = 950000, /* FIXME: guessed! */ .frequency_min = 950000, /* FIXME: guessed! */
...@@ -59,8 +58,7 @@ struct dvb_frontend_info grundig_29504_491_info = { ...@@ -59,8 +58,7 @@ struct dvb_frontend_info grundig_29504_491_info = {
static static u8 tda8083_init_tab [] = {
u8 tda8083_init_tab [] = {
0x04, 0x00, 0x4a, 0x79, 0x04, 0x00, 0xff, 0xea, 0x04, 0x00, 0x4a, 0x79, 0x04, 0x00, 0xff, 0xea,
0x48, 0x42, 0x79, 0x60, 0x70, 0x52, 0x9a, 0x10, 0x48, 0x42, 0x79, 0x60, 0x70, 0x52, 0x9a, 0x10,
0x0e, 0x10, 0xf2, 0xa7, 0x93, 0x0b, 0x05, 0xc8, 0x0e, 0x10, 0xf2, 0xa7, 0x93, 0x0b, 0x05, 0xc8,
...@@ -71,8 +69,7 @@ u8 tda8083_init_tab [] = { ...@@ -71,8 +69,7 @@ u8 tda8083_init_tab [] = {
static static int tda8083_writereg (struct dvb_i2c_bus *i2c, u8 reg, u8 data)
int tda8083_writereg (struct dvb_i2c_bus *i2c, u8 reg, u8 data)
{ {
int ret; int ret;
u8 buf [] = { reg, data }; u8 buf [] = { reg, data };
...@@ -88,8 +85,7 @@ int tda8083_writereg (struct dvb_i2c_bus *i2c, u8 reg, u8 data) ...@@ -88,8 +85,7 @@ int tda8083_writereg (struct dvb_i2c_bus *i2c, u8 reg, u8 data)
} }
static static int tda8083_readregs (struct dvb_i2c_bus *i2c, u8 reg1, u8 *b, u8 len)
int tda8083_readregs (struct dvb_i2c_bus *i2c, u8 reg1, u8 *b, u8 len)
{ {
int ret; int ret;
struct i2c_msg msg [] = { { .addr = 0x68, .flags = 0, .buf = &reg1, .len = 1 }, struct i2c_msg msg [] = { { .addr = 0x68, .flags = 0, .buf = &reg1, .len = 1 },
...@@ -105,8 +101,7 @@ int tda8083_readregs (struct dvb_i2c_bus *i2c, u8 reg1, u8 *b, u8 len) ...@@ -105,8 +101,7 @@ int tda8083_readregs (struct dvb_i2c_bus *i2c, u8 reg1, u8 *b, u8 len)
} }
static inline static inline u8 tda8083_readreg (struct dvb_i2c_bus *i2c, u8 reg)
u8 tda8083_readreg (struct dvb_i2c_bus *i2c, u8 reg)
{ {
u8 val; u8 val;
...@@ -116,8 +111,7 @@ u8 tda8083_readreg (struct dvb_i2c_bus *i2c, u8 reg) ...@@ -116,8 +111,7 @@ u8 tda8083_readreg (struct dvb_i2c_bus *i2c, u8 reg)
} }
static static int tsa5522_write (struct dvb_i2c_bus *i2c, u8 data [4])
int tsa5522_write (struct dvb_i2c_bus *i2c, u8 data [4])
{ {
int ret; int ret;
struct i2c_msg msg = { .addr = 0x61, .flags = 0, .buf = data, .len = 4 }; struct i2c_msg msg = { .addr = 0x61, .flags = 0, .buf = data, .len = 4 };
...@@ -135,8 +129,7 @@ int tsa5522_write (struct dvb_i2c_bus *i2c, u8 data [4]) ...@@ -135,8 +129,7 @@ int tsa5522_write (struct dvb_i2c_bus *i2c, u8 data [4])
* set up the downconverter frequency divisor for a * set up the downconverter frequency divisor for a
* reference clock comparision frequency of 125 kHz. * reference clock comparision frequency of 125 kHz.
*/ */
static static int tsa5522_set_tv_freq (struct dvb_i2c_bus *i2c, u32 freq)
int tsa5522_set_tv_freq (struct dvb_i2c_bus *i2c, u32 freq)
{ {
u32 div = freq / 125; u32 div = freq / 125;
u8 buf [4] = { (div >> 8) & 0x7f, div & 0xff, 0x8e, 0x00 }; u8 buf [4] = { (div >> 8) & 0x7f, div & 0xff, 0x8e, 0x00 };
...@@ -145,8 +138,7 @@ int tsa5522_set_tv_freq (struct dvb_i2c_bus *i2c, u32 freq) ...@@ -145,8 +138,7 @@ int tsa5522_set_tv_freq (struct dvb_i2c_bus *i2c, u32 freq)
} }
static int static int tda8083_init (struct dvb_i2c_bus *i2c)
tda8083_init (struct dvb_i2c_bus *i2c)
{ {
int i; int i;
...@@ -159,8 +151,7 @@ tda8083_init (struct dvb_i2c_bus *i2c) ...@@ -159,8 +151,7 @@ tda8083_init (struct dvb_i2c_bus *i2c)
} }
static int static int tda8083_set_inversion (struct dvb_i2c_bus *i2c, fe_spectral_inversion_t inversion)
tda8083_set_inversion (struct dvb_i2c_bus *i2c, fe_spectral_inversion_t inversion)
{ {
/* XXX FIXME: implement other modes than FEC_AUTO */ /* XXX FIXME: implement other modes than FEC_AUTO */
if (inversion == INVERSION_AUTO) if (inversion == INVERSION_AUTO)
...@@ -170,8 +161,7 @@ tda8083_set_inversion (struct dvb_i2c_bus *i2c, fe_spectral_inversion_t inversio ...@@ -170,8 +161,7 @@ tda8083_set_inversion (struct dvb_i2c_bus *i2c, fe_spectral_inversion_t inversio
} }
static int static int tda8083_set_fec (struct dvb_i2c_bus *i2c, fe_code_rate_t fec)
tda8083_set_fec (struct dvb_i2c_bus *i2c, fe_code_rate_t fec)
{ {
if (fec == FEC_AUTO) if (fec == FEC_AUTO)
return tda8083_writereg (i2c, 0x07, 0xff); return tda8083_writereg (i2c, 0x07, 0xff);
...@@ -183,8 +173,7 @@ tda8083_set_fec (struct dvb_i2c_bus *i2c, fe_code_rate_t fec) ...@@ -183,8 +173,7 @@ tda8083_set_fec (struct dvb_i2c_bus *i2c, fe_code_rate_t fec)
} }
static static fe_code_rate_t tda8083_get_fec (struct dvb_i2c_bus *i2c)
fe_code_rate_t tda8083_get_fec (struct dvb_i2c_bus *i2c)
{ {
u8 index; u8 index;
static fe_code_rate_t fec_tab [] = { FEC_8_9, FEC_1_2, FEC_2_3, FEC_3_4, static fe_code_rate_t fec_tab [] = { FEC_8_9, FEC_1_2, FEC_2_3, FEC_3_4,
...@@ -199,8 +188,7 @@ fe_code_rate_t tda8083_get_fec (struct dvb_i2c_bus *i2c) ...@@ -199,8 +188,7 @@ fe_code_rate_t tda8083_get_fec (struct dvb_i2c_bus *i2c)
} }
static static int tda8083_set_symbolrate (struct dvb_i2c_bus *i2c, u32 srate)
int tda8083_set_symbolrate (struct dvb_i2c_bus *i2c, u32 srate)
{ {
u32 ratio; u32 ratio;
u32 tmp; u32 tmp;
...@@ -240,8 +228,7 @@ int tda8083_set_symbolrate (struct dvb_i2c_bus *i2c, u32 srate) ...@@ -240,8 +228,7 @@ int tda8083_set_symbolrate (struct dvb_i2c_bus *i2c, u32 srate)
} }
static static void tda8083_wait_diseqc_fifo (struct dvb_i2c_bus *i2c, int timeout)
void tda8083_wait_diseqc_fifo (struct dvb_i2c_bus *i2c, int timeout)
{ {
unsigned long start = jiffies; unsigned long start = jiffies;
...@@ -253,8 +240,7 @@ void tda8083_wait_diseqc_fifo (struct dvb_i2c_bus *i2c, int timeout) ...@@ -253,8 +240,7 @@ void tda8083_wait_diseqc_fifo (struct dvb_i2c_bus *i2c, int timeout)
} }
static static int tda8083_send_diseqc_msg (struct dvb_i2c_bus *i2c,
int tda8083_send_diseqc_msg (struct dvb_i2c_bus *i2c,
struct dvb_diseqc_master_cmd *m) struct dvb_diseqc_master_cmd *m)
{ {
int i; int i;
...@@ -272,8 +258,7 @@ int tda8083_send_diseqc_msg (struct dvb_i2c_bus *i2c, ...@@ -272,8 +258,7 @@ int tda8083_send_diseqc_msg (struct dvb_i2c_bus *i2c,
} }
static static int tda8083_send_diseqc_burst (struct dvb_i2c_bus *i2c, fe_sec_mini_cmd_t burst)
int tda8083_send_diseqc_burst (struct dvb_i2c_bus *i2c, fe_sec_mini_cmd_t burst)
{ {
switch (burst) { switch (burst) {
case SEC_MINI_A: case SEC_MINI_A:
...@@ -292,8 +277,7 @@ int tda8083_send_diseqc_burst (struct dvb_i2c_bus *i2c, fe_sec_mini_cmd_t burst) ...@@ -292,8 +277,7 @@ int tda8083_send_diseqc_burst (struct dvb_i2c_bus *i2c, fe_sec_mini_cmd_t burst)
} }
static static int tda8083_set_tone (struct dvb_i2c_bus *i2c, fe_sec_tone_mode_t tone)
int tda8083_set_tone (struct dvb_i2c_bus *i2c, fe_sec_tone_mode_t tone)
{ {
tda8083_writereg (i2c, 0x26, 0xf1); tda8083_writereg (i2c, 0x26, 0xf1);
...@@ -308,8 +292,7 @@ int tda8083_set_tone (struct dvb_i2c_bus *i2c, fe_sec_tone_mode_t tone) ...@@ -308,8 +292,7 @@ int tda8083_set_tone (struct dvb_i2c_bus *i2c, fe_sec_tone_mode_t tone)
} }
static static int tda8083_set_voltage (struct dvb_i2c_bus *i2c, fe_sec_voltage_t voltage)
int tda8083_set_voltage (struct dvb_i2c_bus *i2c, fe_sec_voltage_t voltage)
{ {
switch (voltage) { switch (voltage) {
case SEC_VOLTAGE_13: case SEC_VOLTAGE_13:
...@@ -322,8 +305,7 @@ int tda8083_set_voltage (struct dvb_i2c_bus *i2c, fe_sec_voltage_t voltage) ...@@ -322,8 +305,7 @@ int tda8083_set_voltage (struct dvb_i2c_bus *i2c, fe_sec_voltage_t voltage)
} }
static static int grundig_29504_491_ioctl (struct dvb_frontend *fe, unsigned int cmd,
int grundig_29504_491_ioctl (struct dvb_frontend *fe, unsigned int cmd,
void *arg) void *arg)
{ {
struct dvb_i2c_bus *i2c = fe->i2c; struct dvb_i2c_bus *i2c = fe->i2c;
...@@ -454,8 +436,7 @@ int grundig_29504_491_ioctl (struct dvb_frontend *fe, unsigned int cmd, ...@@ -454,8 +436,7 @@ int grundig_29504_491_ioctl (struct dvb_frontend *fe, unsigned int cmd,
} }
static static int tda8083_attach (struct dvb_i2c_bus *i2c)
int tda8083_attach (struct dvb_i2c_bus *i2c)
{ {
if ((tda8083_readreg (i2c, 0x00)) != 0x05) if ((tda8083_readreg (i2c, 0x00)) != 0x05)
return -ENODEV; return -ENODEV;
...@@ -467,23 +448,20 @@ int tda8083_attach (struct dvb_i2c_bus *i2c) ...@@ -467,23 +448,20 @@ int tda8083_attach (struct dvb_i2c_bus *i2c)
} }
static static void tda8083_detach (struct dvb_i2c_bus *i2c)
void tda8083_detach (struct dvb_i2c_bus *i2c)
{ {
dvb_unregister_frontend (grundig_29504_491_ioctl, i2c); dvb_unregister_frontend (grundig_29504_491_ioctl, i2c);
} }
static static int __init init_tda8083 (void)
int __init init_tda8083 (void)
{ {
return dvb_register_i2c_device (THIS_MODULE, return dvb_register_i2c_device (THIS_MODULE,
tda8083_attach, tda8083_detach); tda8083_attach, tda8083_detach);
} }
static static void __exit exit_tda8083 (void)
void __exit exit_tda8083 (void)
{ {
dvb_unregister_i2c_device (tda8083_attach); dvb_unregister_i2c_device (tda8083_attach);
} }
......
...@@ -60,8 +60,7 @@ ...@@ -60,8 +60,7 @@
/* Master Clock = 88 MHz */ /* Master Clock = 88 MHz */
#define M_CLK (88000000UL) #define M_CLK (88000000UL)
static static struct dvb_frontend_info uni0299_info = {
struct dvb_frontend_info uni0299_info = {
.name = "STV0299/TSA5059/SL1935 based", .name = "STV0299/TSA5059/SL1935 based",
.type = FE_QPSK, .type = FE_QPSK,
.frequency_min = 950000, .frequency_min = 950000,
...@@ -80,8 +79,7 @@ struct dvb_frontend_info uni0299_info = { ...@@ -80,8 +79,7 @@ struct dvb_frontend_info uni0299_info = {
}; };
static static u8 init_tab [] = {
u8 init_tab [] = {
0x04, 0x7d, /* F22FR = 0x7d */ 0x04, 0x7d, /* F22FR = 0x7d */
/* F22 = f_VCO / 128 / 0x7d = 22 kHz */ /* F22 = f_VCO / 128 / 0x7d = 22 kHz */
...@@ -144,8 +142,7 @@ u8 init_tab [] = { ...@@ -144,8 +142,7 @@ u8 init_tab [] = {
}; };
static static int stv0299_writereg (struct dvb_i2c_bus *i2c, u8 reg, u8 data)
int stv0299_writereg (struct dvb_i2c_bus *i2c, u8 reg, u8 data)
{ {
int ret; int ret;
u8 buf [] = { reg, data }; u8 buf [] = { reg, data };
...@@ -161,8 +158,7 @@ int stv0299_writereg (struct dvb_i2c_bus *i2c, u8 reg, u8 data) ...@@ -161,8 +158,7 @@ int stv0299_writereg (struct dvb_i2c_bus *i2c, u8 reg, u8 data)
} }
static static u8 stv0299_readreg (struct dvb_i2c_bus *i2c, u8 reg)
u8 stv0299_readreg (struct dvb_i2c_bus *i2c, u8 reg)
{ {
int ret; int ret;
u8 b0 [] = { reg }; u8 b0 [] = { reg };
...@@ -179,8 +175,7 @@ u8 stv0299_readreg (struct dvb_i2c_bus *i2c, u8 reg) ...@@ -179,8 +175,7 @@ u8 stv0299_readreg (struct dvb_i2c_bus *i2c, u8 reg)
} }
static static int stv0299_readregs (struct dvb_i2c_bus *i2c, u8 reg1, u8 *b, u8 len)
int stv0299_readregs (struct dvb_i2c_bus *i2c, u8 reg1, u8 *b, u8 len)
{ {
int ret; int ret;
struct i2c_msg msg [] = { { .addr = 0x68, .flags = 0, .buf = &reg1, .len = 1 }, struct i2c_msg msg [] = { { .addr = 0x68, .flags = 0, .buf = &reg1, .len = 1 },
...@@ -195,8 +190,7 @@ int stv0299_readregs (struct dvb_i2c_bus *i2c, u8 reg1, u8 *b, u8 len) ...@@ -195,8 +190,7 @@ int stv0299_readregs (struct dvb_i2c_bus *i2c, u8 reg1, u8 *b, u8 len)
} }
static static int pll_write (struct dvb_i2c_bus *i2c, u8 addr, u8 *data, int len)
int pll_write (struct dvb_i2c_bus *i2c, u8 addr, u8 *data, int len)
{ {
int ret; int ret;
u8 rpt1 [] = { 0x05, 0xb5 }; /* enable i2c repeater on stv0299 */ u8 rpt1 [] = { 0x05, 0xb5 }; /* enable i2c repeater on stv0299 */
...@@ -214,8 +208,7 @@ int pll_write (struct dvb_i2c_bus *i2c, u8 addr, u8 *data, int len) ...@@ -214,8 +208,7 @@ int pll_write (struct dvb_i2c_bus *i2c, u8 addr, u8 *data, int len)
} }
static static int sl1935_set_tv_freq (struct dvb_i2c_bus *i2c, u32 freq, int ftype)
int sl1935_set_tv_freq (struct dvb_i2c_bus *i2c, u32 freq, int ftype)
{ {
u8 buf[4]; u8 buf[4];
u32 div; u32 div;
...@@ -245,8 +238,7 @@ int sl1935_set_tv_freq (struct dvb_i2c_bus *i2c, u32 freq, int ftype) ...@@ -245,8 +238,7 @@ int sl1935_set_tv_freq (struct dvb_i2c_bus *i2c, u32 freq, int ftype)
* set up the downconverter frequency divisor for a * set up the downconverter frequency divisor for a
* reference clock comparision frequency of 125 kHz. * reference clock comparision frequency of 125 kHz.
*/ */
static static int tsa5059_set_tv_freq (struct dvb_i2c_bus *i2c, u32 freq, int ftype)
int tsa5059_set_tv_freq (struct dvb_i2c_bus *i2c, u32 freq, int ftype)
{ {
u8 addr = (ftype == PHILIPS_SU1278SH) ? 0x60 : 0x61; u8 addr = (ftype == PHILIPS_SU1278SH) ? 0x60 : 0x61;
u32 div = freq / 125; u32 div = freq / 125;
...@@ -270,8 +262,7 @@ int tsa5059_set_tv_freq (struct dvb_i2c_bus *i2c, u32 freq, int ftype) ...@@ -270,8 +262,7 @@ int tsa5059_set_tv_freq (struct dvb_i2c_bus *i2c, u32 freq, int ftype)
#define MIN2(a,b) ((a) < (b) ? (a) : (b)) #define MIN2(a,b) ((a) < (b) ? (a) : (b))
#define MIN3(a,b,c) MIN2(MIN2(a,b),c) #define MIN3(a,b,c) MIN2(MIN2(a,b),c)
static static int tua6100_set_tv_freq (struct dvb_i2c_bus *i2c, u32 freq,
int tua6100_set_tv_freq (struct dvb_i2c_bus *i2c, u32 freq,
int ftype, int srate) int ftype, int srate)
{ {
u8 reg0 [2] = { 0x00, 0x00 }; u8 reg0 [2] = { 0x00, 0x00 };
...@@ -392,8 +383,7 @@ int tua6100_set_tv_freq (struct dvb_i2c_bus *i2c, u32 freq, ...@@ -392,8 +383,7 @@ int tua6100_set_tv_freq (struct dvb_i2c_bus *i2c, u32 freq,
} }
static static int pll_set_tv_freq (struct dvb_i2c_bus *i2c, u32 freq, int ftype, int srate)
int pll_set_tv_freq (struct dvb_i2c_bus *i2c, u32 freq, int ftype, int srate)
{ {
if (ftype == LG_TDQF_S001F) if (ftype == LG_TDQF_S001F)
return sl1935_set_tv_freq(i2c, freq, ftype); return sl1935_set_tv_freq(i2c, freq, ftype);
...@@ -404,8 +394,7 @@ int pll_set_tv_freq (struct dvb_i2c_bus *i2c, u32 freq, int ftype, int srate) ...@@ -404,8 +394,7 @@ int pll_set_tv_freq (struct dvb_i2c_bus *i2c, u32 freq, int ftype, int srate)
} }
#if 0 #if 0
static static int tsa5059_read_status (struct dvb_i2c_bus *i2c)
int tsa5059_read_status (struct dvb_i2c_bus *i2c)
{ {
int ret; int ret;
u8 rpt1 [] = { 0x05, 0xb5 }; u8 rpt1 [] = { 0x05, 0xb5 };
...@@ -426,8 +415,7 @@ int tsa5059_read_status (struct dvb_i2c_bus *i2c) ...@@ -426,8 +415,7 @@ int tsa5059_read_status (struct dvb_i2c_bus *i2c)
#endif #endif
static static int stv0299_init (struct dvb_i2c_bus *i2c, int ftype)
int stv0299_init (struct dvb_i2c_bus *i2c, int ftype)
{ {
int i; int i;
...@@ -452,8 +440,7 @@ int stv0299_init (struct dvb_i2c_bus *i2c, int ftype) ...@@ -452,8 +440,7 @@ int stv0299_init (struct dvb_i2c_bus *i2c, int ftype)
} }
static static int stv0299_check_inversion (struct dvb_i2c_bus *i2c)
int stv0299_check_inversion (struct dvb_i2c_bus *i2c)
{ {
dprintk ("%s\n", __FUNCTION__); dprintk ("%s\n", __FUNCTION__);
...@@ -469,8 +456,7 @@ int stv0299_check_inversion (struct dvb_i2c_bus *i2c) ...@@ -469,8 +456,7 @@ int stv0299_check_inversion (struct dvb_i2c_bus *i2c)
} }
static static int stv0299_set_FEC (struct dvb_i2c_bus *i2c, fe_code_rate_t fec)
int stv0299_set_FEC (struct dvb_i2c_bus *i2c, fe_code_rate_t fec)
{ {
dprintk ("%s\n", __FUNCTION__); dprintk ("%s\n", __FUNCTION__);
...@@ -493,8 +479,7 @@ int stv0299_set_FEC (struct dvb_i2c_bus *i2c, fe_code_rate_t fec) ...@@ -493,8 +479,7 @@ int stv0299_set_FEC (struct dvb_i2c_bus *i2c, fe_code_rate_t fec)
} }
static static fe_code_rate_t stv0299_get_fec (struct dvb_i2c_bus *i2c)
fe_code_rate_t stv0299_get_fec (struct dvb_i2c_bus *i2c)
{ {
static fe_code_rate_t fec_tab [] = { FEC_2_3, FEC_3_4, FEC_5_6, static fe_code_rate_t fec_tab [] = { FEC_2_3, FEC_3_4, FEC_5_6,
FEC_7_8, FEC_1_2 }; FEC_7_8, FEC_1_2 };
...@@ -512,8 +497,7 @@ fe_code_rate_t stv0299_get_fec (struct dvb_i2c_bus *i2c) ...@@ -512,8 +497,7 @@ fe_code_rate_t stv0299_get_fec (struct dvb_i2c_bus *i2c)
} }
static static int stv0299_wait_diseqc_fifo (struct dvb_i2c_bus *i2c, int timeout)
int stv0299_wait_diseqc_fifo (struct dvb_i2c_bus *i2c, int timeout)
{ {
unsigned long start = jiffies; unsigned long start = jiffies;
...@@ -531,8 +515,7 @@ int stv0299_wait_diseqc_fifo (struct dvb_i2c_bus *i2c, int timeout) ...@@ -531,8 +515,7 @@ int stv0299_wait_diseqc_fifo (struct dvb_i2c_bus *i2c, int timeout)
} }
static static int stv0299_wait_diseqc_idle (struct dvb_i2c_bus *i2c, int timeout)
int stv0299_wait_diseqc_idle (struct dvb_i2c_bus *i2c, int timeout)
{ {
unsigned long start = jiffies; unsigned long start = jiffies;
...@@ -550,8 +533,7 @@ int stv0299_wait_diseqc_idle (struct dvb_i2c_bus *i2c, int timeout) ...@@ -550,8 +533,7 @@ int stv0299_wait_diseqc_idle (struct dvb_i2c_bus *i2c, int timeout)
} }
static static int stv0299_send_diseqc_msg (struct dvb_i2c_bus *i2c,
int stv0299_send_diseqc_msg (struct dvb_i2c_bus *i2c,
struct dvb_diseqc_master_cmd *m) struct dvb_diseqc_master_cmd *m)
{ {
u8 val; u8 val;
...@@ -582,8 +564,7 @@ int stv0299_send_diseqc_msg (struct dvb_i2c_bus *i2c, ...@@ -582,8 +564,7 @@ int stv0299_send_diseqc_msg (struct dvb_i2c_bus *i2c,
} }
static static int stv0299_send_diseqc_burst (struct dvb_i2c_bus *i2c, fe_sec_mini_cmd_t burst)
int stv0299_send_diseqc_burst (struct dvb_i2c_bus *i2c, fe_sec_mini_cmd_t burst)
{ {
u8 val; u8 val;
...@@ -610,8 +591,7 @@ int stv0299_send_diseqc_burst (struct dvb_i2c_bus *i2c, fe_sec_mini_cmd_t burst) ...@@ -610,8 +591,7 @@ int stv0299_send_diseqc_burst (struct dvb_i2c_bus *i2c, fe_sec_mini_cmd_t burst)
} }
static static int stv0299_set_tone (struct dvb_i2c_bus *i2c, fe_sec_tone_mode_t tone)
int stv0299_set_tone (struct dvb_i2c_bus *i2c, fe_sec_tone_mode_t tone)
{ {
u8 val; u8 val;
...@@ -635,8 +615,7 @@ int stv0299_set_tone (struct dvb_i2c_bus *i2c, fe_sec_tone_mode_t tone) ...@@ -635,8 +615,7 @@ int stv0299_set_tone (struct dvb_i2c_bus *i2c, fe_sec_tone_mode_t tone)
} }
static static int stv0299_set_voltage (struct dvb_i2c_bus *i2c, fe_sec_voltage_t voltage)
int stv0299_set_voltage (struct dvb_i2c_bus *i2c, fe_sec_voltage_t voltage)
{ {
u8 reg0x08; u8 reg0x08;
u8 reg0x0c; u8 reg0x0c;
...@@ -672,8 +651,7 @@ int stv0299_set_voltage (struct dvb_i2c_bus *i2c, fe_sec_voltage_t voltage) ...@@ -672,8 +651,7 @@ int stv0299_set_voltage (struct dvb_i2c_bus *i2c, fe_sec_voltage_t voltage)
} }
static static int stv0299_set_symbolrate (struct dvb_i2c_bus *i2c, u32 srate)
int stv0299_set_symbolrate (struct dvb_i2c_bus *i2c, u32 srate)
{ {
u32 ratio; u32 ratio;
u32 tmp; u32 tmp;
...@@ -711,8 +689,7 @@ int stv0299_set_symbolrate (struct dvb_i2c_bus *i2c, u32 srate) ...@@ -711,8 +689,7 @@ int stv0299_set_symbolrate (struct dvb_i2c_bus *i2c, u32 srate)
} }
static static int stv0299_get_symbolrate (struct dvb_i2c_bus *i2c)
int stv0299_get_symbolrate (struct dvb_i2c_bus *i2c)
{ {
u32 Mclk = M_CLK / 4096L; u32 Mclk = M_CLK / 4096L;
u32 srate; u32 srate;
...@@ -743,8 +720,7 @@ int stv0299_get_symbolrate (struct dvb_i2c_bus *i2c) ...@@ -743,8 +720,7 @@ int stv0299_get_symbolrate (struct dvb_i2c_bus *i2c)
} }
static static int uni0299_ioctl (struct dvb_frontend *fe, unsigned int cmd, void *arg)
int uni0299_ioctl (struct dvb_frontend *fe, unsigned int cmd, void *arg)
{ {
int tuner_type = (long) fe->data; int tuner_type = (long) fe->data;
struct dvb_i2c_bus *i2c = fe->i2c; struct dvb_i2c_bus *i2c = fe->i2c;
...@@ -881,8 +857,7 @@ int uni0299_ioctl (struct dvb_frontend *fe, unsigned int cmd, void *arg) ...@@ -881,8 +857,7 @@ int uni0299_ioctl (struct dvb_frontend *fe, unsigned int cmd, void *arg)
return 0; return 0;
} }
static static long probe_tuner (struct dvb_i2c_bus *i2c)
long probe_tuner (struct dvb_i2c_bus *i2c)
{ {
/* read the status register of TSA5059 */ /* read the status register of TSA5059 */
u8 rpt[] = { 0x05, 0xb5 }; u8 rpt[] = { 0x05, 0xb5 };
...@@ -935,8 +910,7 @@ long probe_tuner (struct dvb_i2c_bus *i2c) ...@@ -935,8 +910,7 @@ long probe_tuner (struct dvb_i2c_bus *i2c)
} }
static static int uni0299_attach (struct dvb_i2c_bus *i2c)
int uni0299_attach (struct dvb_i2c_bus *i2c)
{ {
long tuner_type; long tuner_type;
u8 id = stv0299_readreg (i2c, 0x00); u8 id = stv0299_readreg (i2c, 0x00);
...@@ -958,8 +932,7 @@ int uni0299_attach (struct dvb_i2c_bus *i2c) ...@@ -958,8 +932,7 @@ int uni0299_attach (struct dvb_i2c_bus *i2c)
} }
static static void uni0299_detach (struct dvb_i2c_bus *i2c)
void uni0299_detach (struct dvb_i2c_bus *i2c)
{ {
dprintk ("%s\n", __FUNCTION__); dprintk ("%s\n", __FUNCTION__);
...@@ -967,16 +940,14 @@ void uni0299_detach (struct dvb_i2c_bus *i2c) ...@@ -967,16 +940,14 @@ void uni0299_detach (struct dvb_i2c_bus *i2c)
} }
static static int __init init_uni0299 (void)
int __init init_uni0299 (void)
{ {
dprintk ("%s\n", __FUNCTION__); dprintk ("%s\n", __FUNCTION__);
return dvb_register_i2c_device (NULL, uni0299_attach, uni0299_detach); return dvb_register_i2c_device (NULL, uni0299_attach, uni0299_detach);
} }
static static void __exit exit_uni0299 (void)
void __exit exit_uni0299 (void)
{ {
dprintk ("%s\n", __FUNCTION__); dprintk ("%s\n", __FUNCTION__);
......
...@@ -72,8 +72,7 @@ ...@@ -72,8 +72,7 @@
static static struct dvb_frontend_info ves1820_info = {
struct dvb_frontend_info ves1820_info = {
.name = "VES1820 based DVB-C frontend", .name = "VES1820 based DVB-C frontend",
.type = FE_QAM, .type = FE_QAM,
.frequency_stepsize = 62500, .frequency_stepsize = 62500,
...@@ -94,8 +93,7 @@ struct dvb_frontend_info ves1820_info = { ...@@ -94,8 +93,7 @@ struct dvb_frontend_info ves1820_info = {
static static u8 ves1820_inittab [] =
u8 ves1820_inittab [] =
{ {
0x69, 0x6A, 0x9B, 0x0A, 0x52, 0x46, 0x26, 0x1A, 0x69, 0x6A, 0x9B, 0x0A, 0x52, 0x46, 0x26, 0x1A,
0x43, 0x6A, 0xAA, 0xAA, 0x1E, 0x85, 0x43, 0x28, 0x43, 0x6A, 0xAA, 0xAA, 0x1E, 0x85, 0x43, 0x28,
...@@ -107,8 +105,7 @@ u8 ves1820_inittab [] = ...@@ -107,8 +105,7 @@ u8 ves1820_inittab [] =
}; };
static static int ves1820_writereg (struct dvb_frontend *fe, u8 reg, u8 data)
int ves1820_writereg (struct dvb_frontend *fe, u8 reg, u8 data)
{ {
u8 addr = GET_DEMOD_ADDR(fe->data); u8 addr = GET_DEMOD_ADDR(fe->data);
u8 buf[] = { 0x00, reg, data }; u8 buf[] = { 0x00, reg, data };
...@@ -128,8 +125,7 @@ int ves1820_writereg (struct dvb_frontend *fe, u8 reg, u8 data) ...@@ -128,8 +125,7 @@ int ves1820_writereg (struct dvb_frontend *fe, u8 reg, u8 data)
} }
static static u8 ves1820_readreg (struct dvb_frontend *fe, u8 reg)
u8 ves1820_readreg (struct dvb_frontend *fe, u8 reg)
{ {
u8 b0 [] = { 0x00, reg }; u8 b0 [] = { 0x00, reg };
u8 b1 [] = { 0 }; u8 b1 [] = { 0 };
...@@ -148,8 +144,7 @@ u8 ves1820_readreg (struct dvb_frontend *fe, u8 reg) ...@@ -148,8 +144,7 @@ u8 ves1820_readreg (struct dvb_frontend *fe, u8 reg)
} }
static static int tuner_write (struct dvb_i2c_bus *i2c, u8 addr, u8 data [4])
int tuner_write (struct dvb_i2c_bus *i2c, u8 addr, u8 data [4])
{ {
int ret; int ret;
struct i2c_msg msg = { addr: addr, .flags = 0, .buf = data, .len = 4 }; struct i2c_msg msg = { addr: addr, .flags = 0, .buf = data, .len = 4 };
...@@ -167,8 +162,7 @@ int tuner_write (struct dvb_i2c_bus *i2c, u8 addr, u8 data [4]) ...@@ -167,8 +162,7 @@ int tuner_write (struct dvb_i2c_bus *i2c, u8 addr, u8 data [4])
* set up the downconverter frequency divisor for a * set up the downconverter frequency divisor for a
* reference clock comparision frequency of 62.5 kHz. * reference clock comparision frequency of 62.5 kHz.
*/ */
static static int tuner_set_tv_freq (struct dvb_frontend *fe, u32 freq)
int tuner_set_tv_freq (struct dvb_frontend *fe, u32 freq)
{ {
u32 div, ifreq; u32 div, ifreq;
static u8 addr [] = { 0x61, 0x62 }; static u8 addr [] = { 0x61, 0x62 };
...@@ -203,8 +197,7 @@ int tuner_set_tv_freq (struct dvb_frontend *fe, u32 freq) ...@@ -203,8 +197,7 @@ int tuner_set_tv_freq (struct dvb_frontend *fe, u32 freq)
} }
static static int ves1820_setup_reg0 (struct dvb_frontend *fe, u8 reg0,
int ves1820_setup_reg0 (struct dvb_frontend *fe, u8 reg0,
fe_spectral_inversion_t inversion) fe_spectral_inversion_t inversion)
{ {
reg0 |= GET_REG0(fe->data) & 0x62; reg0 |= GET_REG0(fe->data) & 0x62;
...@@ -235,8 +228,7 @@ int ves1820_setup_reg0 (struct dvb_frontend *fe, u8 reg0, ...@@ -235,8 +228,7 @@ int ves1820_setup_reg0 (struct dvb_frontend *fe, u8 reg0,
} }
static static int ves1820_init (struct dvb_frontend *fe)
int ves1820_init (struct dvb_frontend *fe)
{ {
int i; int i;
...@@ -253,8 +245,7 @@ int ves1820_init (struct dvb_frontend *fe) ...@@ -253,8 +245,7 @@ int ves1820_init (struct dvb_frontend *fe)
} }
static static int ves1820_set_symbolrate (struct dvb_frontend *fe, u32 symbolrate)
int ves1820_set_symbolrate (struct dvb_frontend *fe, u32 symbolrate)
{ {
s32 BDR; s32 BDR;
s32 BDRI; s32 BDRI;
...@@ -309,8 +300,7 @@ int ves1820_set_symbolrate (struct dvb_frontend *fe, u32 symbolrate) ...@@ -309,8 +300,7 @@ int ves1820_set_symbolrate (struct dvb_frontend *fe, u32 symbolrate)
} }
static static int ves1820_set_parameters (struct dvb_frontend *fe,
int ves1820_set_parameters (struct dvb_frontend *fe,
struct dvb_frontend_parameters *p) struct dvb_frontend_parameters *p)
{ {
static const u8 reg0x00 [] = { 0x00, 0x04, 0x08, 0x0c, 0x10 }; static const u8 reg0x00 [] = { 0x00, 0x04, 0x08, 0x0c, 0x10 };
...@@ -339,8 +329,7 @@ int ves1820_set_parameters (struct dvb_frontend *fe, ...@@ -339,8 +329,7 @@ int ves1820_set_parameters (struct dvb_frontend *fe,
static static int ves1820_ioctl (struct dvb_frontend *fe, unsigned int cmd, void *arg)
int ves1820_ioctl (struct dvb_frontend *fe, unsigned int cmd, void *arg)
{ {
switch (cmd) { switch (cmd) {
case FE_GET_INFO: case FE_GET_INFO:
...@@ -450,13 +439,12 @@ int ves1820_ioctl (struct dvb_frontend *fe, unsigned int cmd, void *arg) ...@@ -450,13 +439,12 @@ int ves1820_ioctl (struct dvb_frontend *fe, unsigned int cmd, void *arg)
} }
static static long probe_tuner (struct dvb_i2c_bus *i2c)
long probe_tuner (struct dvb_i2c_bus *i2c)
{ {
static const static const struct i2c_msg msg1 =
struct i2c_msg msg1 = { .addr = 0x61, .flags = 0, .buf = NULL, .len = 0 }; { .addr = 0x61, .flags = 0, .buf = NULL, .len = 0 };
static const static const struct i2c_msg msg2 =
struct i2c_msg msg2 = { .addr = 0x62, .flags = 0, .buf = NULL, .len = 0 }; { .addr = 0x62, .flags = 0, .buf = NULL, .len = 0 };
int type; int type;
if (i2c->xfer(i2c, &msg1, 1) == 1) { if (i2c->xfer(i2c, &msg1, 1) == 1) {
...@@ -476,8 +464,7 @@ long probe_tuner (struct dvb_i2c_bus *i2c) ...@@ -476,8 +464,7 @@ long probe_tuner (struct dvb_i2c_bus *i2c)
} }
static static u8 read_pwm (struct dvb_i2c_bus *i2c)
u8 read_pwm (struct dvb_i2c_bus *i2c)
{ {
u8 b = 0xff; u8 b = 0xff;
u8 pwm; u8 pwm;
...@@ -495,8 +482,7 @@ u8 read_pwm (struct dvb_i2c_bus *i2c) ...@@ -495,8 +482,7 @@ u8 read_pwm (struct dvb_i2c_bus *i2c)
} }
static static long probe_demod_addr (struct dvb_i2c_bus *i2c)
long probe_demod_addr (struct dvb_i2c_bus *i2c)
{ {
u8 b [] = { 0x00, 0x1a }; u8 b [] = { 0x00, 0x1a };
u8 id; u8 id;
...@@ -515,8 +501,7 @@ long probe_demod_addr (struct dvb_i2c_bus *i2c) ...@@ -515,8 +501,7 @@ long probe_demod_addr (struct dvb_i2c_bus *i2c)
} }
static static int ves1820_attach (struct dvb_i2c_bus *i2c)
int ves1820_attach (struct dvb_i2c_bus *i2c)
{ {
void *data = NULL; void *data = NULL;
long demod_addr; long demod_addr;
...@@ -539,23 +524,20 @@ int ves1820_attach (struct dvb_i2c_bus *i2c) ...@@ -539,23 +524,20 @@ int ves1820_attach (struct dvb_i2c_bus *i2c)
} }
static static void ves1820_detach (struct dvb_i2c_bus *i2c)
void ves1820_detach (struct dvb_i2c_bus *i2c)
{ {
dvb_unregister_frontend (ves1820_ioctl, i2c); dvb_unregister_frontend (ves1820_ioctl, i2c);
} }
static static int __init init_ves1820 (void)
int __init init_ves1820 (void)
{ {
return dvb_register_i2c_device (THIS_MODULE, return dvb_register_i2c_device (THIS_MODULE,
ves1820_attach, ves1820_detach); ves1820_attach, ves1820_detach);
} }
static static void __exit exit_ves1820 (void)
void __exit exit_ves1820 (void)
{ {
dvb_unregister_i2c_device (ves1820_attach); dvb_unregister_i2c_device (ves1820_attach);
} }
......
This diff is collapsed.
#include <asm/types.h> #include <linux/types.h>
u8 Dpram [] __initdata = { u8 Dpram [] __initdata = {
0xe5, 0x9f, 0xf0, 0x1c, 0xe1, 0xb0, 0xf0, 0x0e, 0xe5, 0x9f, 0xf0, 0x1c, 0xe1, 0xb0, 0xf0, 0x0e,
...@@ -40,8 +40,7 @@ void av7110_ipack_free(struct ipack * p) ...@@ -40,8 +40,7 @@ void av7110_ipack_free(struct ipack * p)
} }
static static void send_ipack(struct ipack *p)
void send_ipack(struct ipack *p)
{ {
int off; int off;
struct dvb_audio_info ai; struct dvb_audio_info ai;
...@@ -122,8 +121,7 @@ void av7110_ipack_flush(struct ipack *p) ...@@ -122,8 +121,7 @@ void av7110_ipack_flush(struct ipack *p)
} }
static static void write_ipack(struct ipack *p, const u8 *data, int count)
void write_ipack(struct ipack *p, const u8 *data, int count)
{ {
u8 headr[3] = { 0x00, 0x00, 0x01} ; u8 headr[3] = { 0x00, 0x00, 0x01} ;
......
#include <asm/types.h> #include <linux/types.h>
#include <asm/bitops.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/input.h> #include <linux/input.h>
#include <linux/proc_fs.h> #include <linux/proc_fs.h>
#include <asm/bitops.h>
#include "av7110.h" #include "av7110.h"
...@@ -18,8 +18,7 @@ static struct input_dev input_dev; ...@@ -18,8 +18,7 @@ static struct input_dev input_dev;
static u32 ir_config; static u32 ir_config;
static static u16 key_map [256] = {
u16 key_map [256] = {
KEY_0, KEY_1, KEY_2, KEY_3, KEY_4, KEY_5, KEY_6, KEY_7, KEY_0, KEY_1, KEY_2, KEY_3, KEY_4, KEY_5, KEY_6, KEY_7,
KEY_8, KEY_9, KEY_BACK, 0, KEY_POWER, KEY_MUTE, 0, KEY_INFO, KEY_8, KEY_9, KEY_BACK, 0, KEY_POWER, KEY_MUTE, 0, KEY_INFO,
KEY_VOLUMEUP, KEY_VOLUMEDOWN, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, KEY_VOLUMEUP, KEY_VOLUMEDOWN, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
...@@ -43,8 +42,7 @@ u16 key_map [256] = { ...@@ -43,8 +42,7 @@ u16 key_map [256] = {
}; };
static static void av7110_emit_keyup (unsigned long data)
void av7110_emit_keyup (unsigned long data)
{ {
if (!data || !test_bit (data, input_dev.key)) if (!data || !test_bit (data, input_dev.key))
return; return;
...@@ -53,12 +51,10 @@ void av7110_emit_keyup (unsigned long data) ...@@ -53,12 +51,10 @@ void av7110_emit_keyup (unsigned long data)
} }
static static struct timer_list keyup_timer = { function: av7110_emit_keyup };
struct timer_list keyup_timer = { function: av7110_emit_keyup };
static static void av7110_emit_key (u32 ircom)
void av7110_emit_key (u32 ircom)
{ {
u8 data; u8 data;
u8 addr; u8 addr;
...@@ -117,8 +113,7 @@ void av7110_emit_key (u32 ircom) ...@@ -117,8 +113,7 @@ void av7110_emit_key (u32 ircom)
old_toggle = new_toggle; old_toggle = new_toggle;
} }
static static void input_register_keys (void)
void input_register_keys (void)
{ {
int i; int i;
...@@ -139,8 +134,7 @@ static void input_repeat_key(unsigned long data) ...@@ -139,8 +134,7 @@ static void input_repeat_key(unsigned long data)
} }
static static int av7110_ir_write_proc (struct file *file, const char *buffer,
int av7110_ir_write_proc (struct file *file, const char *buffer,
unsigned long count, void *data) unsigned long count, void *data)
{ {
char *page; char *page;
......
...@@ -46,8 +46,7 @@ struct budget_av { ...@@ -46,8 +46,7 @@ struct budget_av {
****************************************************************************/ ****************************************************************************/
static static u8 i2c_readreg (struct dvb_i2c_bus *i2c, u8 id, u8 reg)
u8 i2c_readreg (struct dvb_i2c_bus *i2c, u8 id, u8 reg)
{ {
u8 mm1[] = {0x00}; u8 mm1[] = {0x00};
u8 mm2[] = {0x00}; u8 mm2[] = {0x00};
...@@ -66,8 +65,7 @@ u8 i2c_readreg (struct dvb_i2c_bus *i2c, u8 id, u8 reg) ...@@ -66,8 +65,7 @@ u8 i2c_readreg (struct dvb_i2c_bus *i2c, u8 id, u8 reg)
} }
static static int i2c_writereg (struct dvb_i2c_bus *i2c, u8 id, u8 reg, u8 val)
int i2c_writereg (struct dvb_i2c_bus *i2c, u8 id, u8 reg, u8 val)
{ {
u8 msg[2]={ reg, val }; u8 msg[2]={ reg, val };
struct i2c_msg msgs; struct i2c_msg msgs;
...@@ -80,8 +78,7 @@ int i2c_writereg (struct dvb_i2c_bus *i2c, u8 id, u8 reg, u8 val) ...@@ -80,8 +78,7 @@ int i2c_writereg (struct dvb_i2c_bus *i2c, u8 id, u8 reg, u8 val)
} }
static const static const u8 saa7113_tab[] = {
u8 saa7113_tab[] = {
0x01, 0x08, 0x01, 0x08,
0x02, 0xc0, 0x02, 0xc0,
0x03, 0x33, 0x03, 0x33,
...@@ -111,8 +108,7 @@ u8 saa7113_tab[] = { ...@@ -111,8 +108,7 @@ u8 saa7113_tab[] = {
}; };
static static int saa7113_init (struct budget_av *budget_av)
int saa7113_init (struct budget_av *budget_av)
{ {
struct budget *budget = &budget_av->budget; struct budget *budget = &budget_av->budget;
const u8 *data = saa7113_tab; const u8 *data = saa7113_tab;
...@@ -136,8 +132,7 @@ int saa7113_init (struct budget_av *budget_av) ...@@ -136,8 +132,7 @@ int saa7113_init (struct budget_av *budget_av)
} }
static static int saa7113_setinput (struct budget_av *budget_av, int input)
int saa7113_setinput (struct budget_av *budget_av, int input)
{ {
struct budget *budget = &budget_av->budget; struct budget *budget = &budget_av->budget;
...@@ -155,8 +150,7 @@ int saa7113_setinput (struct budget_av *budget_av, int input) ...@@ -155,8 +150,7 @@ int saa7113_setinput (struct budget_av *budget_av, int input)
} }
static static int budget_av_detach (struct saa7146_dev *dev)
int budget_av_detach (struct saa7146_dev *dev)
{ {
struct budget_av *budget_av = (struct budget_av*) dev->ext_priv; struct budget_av *budget_av = (struct budget_av*) dev->ext_priv;
int err; int err;
...@@ -177,8 +171,7 @@ int budget_av_detach (struct saa7146_dev *dev) ...@@ -177,8 +171,7 @@ int budget_av_detach (struct saa7146_dev *dev)
} }
static static int budget_av_attach (struct saa7146_dev* dev,
int budget_av_attach (struct saa7146_dev* dev,
struct saa7146_pci_extension_data *info) struct saa7146_pci_extension_data *info)
{ {
struct budget_av *budget_av; struct budget_av *budget_av;
...@@ -255,8 +248,7 @@ static struct v4l2_input knc1_inputs[KNC1_INPUTS] = { ...@@ -255,8 +248,7 @@ static struct v4l2_input knc1_inputs[KNC1_INPUTS] = {
}; };
static static struct saa7146_extension_ioctls ioctls[] = {
struct saa7146_extension_ioctls ioctls[] = {
{ VIDIOC_ENUMINPUT, SAA7146_EXCLUSIVE }, { VIDIOC_ENUMINPUT, SAA7146_EXCLUSIVE },
{ VIDIOC_G_INPUT, SAA7146_EXCLUSIVE }, { VIDIOC_G_INPUT, SAA7146_EXCLUSIVE },
{ VIDIOC_S_INPUT, SAA7146_EXCLUSIVE }, { VIDIOC_S_INPUT, SAA7146_EXCLUSIVE },
...@@ -264,8 +256,7 @@ struct saa7146_extension_ioctls ioctls[] = { ...@@ -264,8 +256,7 @@ struct saa7146_extension_ioctls ioctls[] = {
}; };
static static int av_ioctl(struct saa7146_dev *dev, unsigned int cmd, void *arg)
int av_ioctl(struct saa7146_dev *dev, unsigned int cmd, void *arg)
{ {
struct budget_av *budget_av = (struct budget_av*) dev->ext_priv; struct budget_av *budget_av = (struct budget_av*) dev->ext_priv;
/* /*
...@@ -307,15 +298,13 @@ int av_ioctl(struct saa7146_dev *dev, unsigned int cmd, void *arg) ...@@ -307,15 +298,13 @@ int av_ioctl(struct saa7146_dev *dev, unsigned int cmd, void *arg)
return 0; return 0;
} }
static static struct saa7146_standard standard[] = {
struct saa7146_standard standard[] = {
{ "PAL", V4L2_STD_PAL, SAA7146_PAL_VALUES }, { "PAL", V4L2_STD_PAL, SAA7146_PAL_VALUES },
{ "NTSC", V4L2_STD_NTSC, SAA7146_NTSC_VALUES }, { "NTSC", V4L2_STD_NTSC, SAA7146_NTSC_VALUES },
}; };
static static struct saa7146_ext_vv vv_data = {
struct saa7146_ext_vv vv_data = {
.inputs = 2, .inputs = 2,
.capabilities = 0, // perhaps later: V4L2_CAP_VBI_CAPTURE, but that need tweaking with the saa7113 .capabilities = 0, // perhaps later: V4L2_CAP_VBI_CAPTURE, but that need tweaking with the saa7113
.flags = 0, .flags = 0,
...@@ -332,8 +321,7 @@ static struct saa7146_extension budget_extension; ...@@ -332,8 +321,7 @@ static struct saa7146_extension budget_extension;
MAKE_BUDGET_INFO(knc1, "KNC1 DVB-S", BUDGET_KNC1); MAKE_BUDGET_INFO(knc1, "KNC1 DVB-S", BUDGET_KNC1);
static static struct pci_device_id pci_tbl [] = {
struct pci_device_id pci_tbl [] = {
MAKE_EXTENSION_PCI(knc1, 0x1131, 0x4f56), MAKE_EXTENSION_PCI(knc1, 0x1131, 0x4f56),
{ {
.vendor = 0, .vendor = 0,
...@@ -342,8 +330,7 @@ struct pci_device_id pci_tbl [] = { ...@@ -342,8 +330,7 @@ struct pci_device_id pci_tbl [] = {
MODULE_DEVICE_TABLE(pci, pci_tbl); MODULE_DEVICE_TABLE(pci, pci_tbl);
static static struct saa7146_extension budget_extension = {
struct saa7146_extension budget_extension = {
.name = "budget dvb /w video in\0", .name = "budget dvb /w video in\0",
.pci_tbl = pci_tbl, .pci_tbl = pci_tbl,
...@@ -358,8 +345,7 @@ struct saa7146_extension budget_extension = { ...@@ -358,8 +345,7 @@ struct saa7146_extension budget_extension = {
}; };
static static int __init budget_av_init(void)
int __init budget_av_init(void)
{ {
DEB_EE((".\n")); DEB_EE((".\n"));
...@@ -370,8 +356,7 @@ int __init budget_av_init(void) ...@@ -370,8 +356,7 @@ int __init budget_av_init(void)
} }
static static void __exit budget_av_exit(void)
void __exit budget_av_exit(void)
{ {
DEB_EE((".\n")); DEB_EE((".\n"));
saa7146_unregister_extension(&budget_extension); saa7146_unregister_extension(&budget_extension);
......
...@@ -68,8 +68,7 @@ void gpio_set(struct saa7146_dev* saa, u8 pin, u8 data) ...@@ -68,8 +68,7 @@ void gpio_set(struct saa7146_dev* saa, u8 pin, u8 data)
static static int wait_for_debi_done(struct saa7146_dev *saa)
int wait_for_debi_done(struct saa7146_dev *saa)
{ {
int start = jiffies; int start = jiffies;
...@@ -103,8 +102,7 @@ int wait_for_debi_done(struct saa7146_dev *saa) ...@@ -103,8 +102,7 @@ int wait_for_debi_done(struct saa7146_dev *saa)
} }
static static u32 debiread (struct saa7146_dev *saa, u32 config, int addr, int count)
u32 debiread (struct saa7146_dev *saa, u32 config, int addr, int count)
{ {
u32 result = 0; u32 result = 0;
...@@ -131,8 +129,7 @@ u32 debiread (struct saa7146_dev *saa, u32 config, int addr, int count) ...@@ -131,8 +129,7 @@ u32 debiread (struct saa7146_dev *saa, u32 config, int addr, int count)
/* DEBI during interrupt */ /* DEBI during interrupt */
static inline static inline u32 irdebi(struct saa7146_dev *saa, u32 config, int addr, u32 val, int count)
u32 irdebi(struct saa7146_dev *saa, u32 config, int addr, u32 val, int count)
{ {
u32 res; u32 res;
res = debiread(saa, config, addr, count); res = debiread(saa, config, addr, count);
...@@ -148,8 +145,7 @@ u32 irdebi(struct saa7146_dev *saa, u32 config, int addr, u32 val, int count) ...@@ -148,8 +145,7 @@ u32 irdebi(struct saa7146_dev *saa, u32 config, int addr, u32 val, int count)
Hauppauge (from NOVA-CI-s box product) Hauppauge (from NOVA-CI-s box product)
i've taken a "middle of the road" approach and note the differences i've taken a "middle of the road" approach and note the differences
*/ */
static static u16 key_map[64] = {
u16 key_map[64] = {
/* 0x0X */ /* 0x0X */
KEY_0, KEY_1, KEY_2, KEY_3, KEY_4, KEY_5, KEY_6, KEY_7, KEY_8, KEY_0, KEY_1, KEY_2, KEY_3, KEY_4, KEY_5, KEY_6, KEY_7, KEY_8,
KEY_9, KEY_9,
...@@ -199,8 +195,7 @@ static ...@@ -199,8 +195,7 @@ static
}; };
static static void msp430_ir_debounce (unsigned long data)
void msp430_ir_debounce (unsigned long data)
{ {
struct input_dev *dev = (struct input_dev *) data; struct input_dev *dev = (struct input_dev *) data;
...@@ -217,8 +212,7 @@ void msp430_ir_debounce (unsigned long data) ...@@ -217,8 +212,7 @@ void msp430_ir_debounce (unsigned long data)
static static void msp430_ir_interrupt (unsigned long data)
void msp430_ir_interrupt (unsigned long data)
{ {
struct budget_ci *budget_ci = (struct budget_ci*) data; struct budget_ci *budget_ci = (struct budget_ci*) data;
struct saa7146_dev *saa = budget_ci->budget.dev; struct saa7146_dev *saa = budget_ci->budget.dev;
...@@ -256,8 +250,7 @@ void msp430_ir_interrupt (unsigned long data) ...@@ -256,8 +250,7 @@ void msp430_ir_interrupt (unsigned long data)
} }
static static int msp430_ir_init (struct budget_ci *budget_ci)
int msp430_ir_init (struct budget_ci *budget_ci)
{ {
struct saa7146_dev *saa = budget_ci->budget.dev; struct saa7146_dev *saa = budget_ci->budget.dev;
int i; int i;
...@@ -284,8 +277,7 @@ int msp430_ir_init (struct budget_ci *budget_ci) ...@@ -284,8 +277,7 @@ int msp430_ir_init (struct budget_ci *budget_ci)
} }
static static void msp430_ir_deinit (struct budget_ci *budget_ci)
void msp430_ir_deinit (struct budget_ci *budget_ci)
{ {
struct saa7146_dev *saa = budget_ci->budget.dev; struct saa7146_dev *saa = budget_ci->budget.dev;
struct input_dev *dev = &budget_ci->input_dev; struct input_dev *dev = &budget_ci->input_dev;
...@@ -301,8 +293,7 @@ void msp430_ir_deinit (struct budget_ci *budget_ci) ...@@ -301,8 +293,7 @@ void msp430_ir_deinit (struct budget_ci *budget_ci)
} }
static static void budget_ci_irq (struct saa7146_dev *dev, u32 *isr)
void budget_ci_irq (struct saa7146_dev *dev, u32 *isr)
{ {
struct budget_ci *budget_ci = (struct budget_ci*) dev->ext_priv; struct budget_ci *budget_ci = (struct budget_ci*) dev->ext_priv;
...@@ -317,8 +308,7 @@ void budget_ci_irq (struct saa7146_dev *dev, u32 *isr) ...@@ -317,8 +308,7 @@ void budget_ci_irq (struct saa7146_dev *dev, u32 *isr)
static static int budget_ci_attach (struct saa7146_dev* dev,
int budget_ci_attach (struct saa7146_dev* dev,
struct saa7146_pci_extension_data *info) struct saa7146_pci_extension_data *info)
{ {
struct budget_ci *budget_ci; struct budget_ci *budget_ci;
...@@ -346,8 +336,7 @@ int budget_ci_attach (struct saa7146_dev* dev, ...@@ -346,8 +336,7 @@ int budget_ci_attach (struct saa7146_dev* dev,
static static int budget_ci_detach (struct saa7146_dev* dev)
int budget_ci_detach (struct saa7146_dev* dev)
{ {
struct budget_ci *budget_ci = (struct budget_ci*) dev->ext_priv; struct budget_ci *budget_ci = (struct budget_ci*) dev->ext_priv;
int err; int err;
...@@ -369,8 +358,7 @@ static struct saa7146_extension budget_extension; ...@@ -369,8 +358,7 @@ static struct saa7146_extension budget_extension;
MAKE_BUDGET_INFO(ttbci, "TT-Budget/WinTV-NOVA-CI PCI", BUDGET_TT_HW_DISEQC); MAKE_BUDGET_INFO(ttbci, "TT-Budget/WinTV-NOVA-CI PCI", BUDGET_TT_HW_DISEQC);
static static struct pci_device_id pci_tbl[] = {
struct pci_device_id pci_tbl[] = {
MAKE_EXTENSION_PCI(ttbci, 0x13c2, 0x100c), MAKE_EXTENSION_PCI(ttbci, 0x13c2, 0x100c),
MAKE_EXTENSION_PCI(ttbci, 0x13c2, 0x100f), MAKE_EXTENSION_PCI(ttbci, 0x13c2, 0x100f),
{ {
...@@ -380,8 +368,7 @@ struct pci_device_id pci_tbl[] = { ...@@ -380,8 +368,7 @@ struct pci_device_id pci_tbl[] = {
MODULE_DEVICE_TABLE(pci, pci_tbl); MODULE_DEVICE_TABLE(pci, pci_tbl);
static static struct saa7146_extension budget_extension = {
struct saa7146_extension budget_extension = {
.name = "budget_ci dvb\0", .name = "budget_ci dvb\0",
.flags = 0, .flags = 0,
.ext_vv_data = NULL, .ext_vv_data = NULL,
...@@ -396,8 +383,7 @@ struct saa7146_extension budget_extension = { ...@@ -396,8 +383,7 @@ struct saa7146_extension budget_extension = {
}; };
static static int __init budget_ci_init(void)
int __init budget_ci_init(void)
{ {
if (saa7146_register_extension(&budget_extension)) if (saa7146_register_extension(&budget_extension))
return -ENODEV; return -ENODEV;
...@@ -406,8 +392,7 @@ int __init budget_ci_init(void) ...@@ -406,8 +392,7 @@ int __init budget_ci_init(void)
} }
static static void __exit budget_ci_exit(void)
void __exit budget_ci_exit(void)
{ {
DEB_EE((".\n")); DEB_EE((".\n"));
saa7146_unregister_extension(&budget_extension); saa7146_unregister_extension(&budget_extension);
......
...@@ -6,8 +6,7 @@ int budget_debug = 0; ...@@ -6,8 +6,7 @@ int budget_debug = 0;
* TT budget / WinTV Nova * TT budget / WinTV Nova
****************************************************************************/ ****************************************************************************/
static static int stop_ts_capture(struct budget *budget)
int stop_ts_capture(struct budget *budget)
{ {
DEB_EE(("budget: %p\n",budget)); DEB_EE(("budget: %p\n",budget));
...@@ -20,8 +19,7 @@ int stop_ts_capture(struct budget *budget) ...@@ -20,8 +19,7 @@ int stop_ts_capture(struct budget *budget)
} }
static static int start_ts_capture (struct budget *budget)
int start_ts_capture (struct budget *budget)
{ {
struct saa7146_dev *dev=budget->dev; struct saa7146_dev *dev=budget->dev;
...@@ -62,8 +60,7 @@ int start_ts_capture (struct budget *budget) ...@@ -62,8 +60,7 @@ int start_ts_capture (struct budget *budget)
} }
static static void vpeirq (unsigned long data)
void vpeirq (unsigned long data)
{ {
struct budget *budget = (struct budget*) data; struct budget *budget = (struct budget*) data;
u8 *mem = (u8 *)(budget->grabbing); u8 *mem = (u8 *)(budget->grabbing);
...@@ -100,8 +97,7 @@ void vpeirq (unsigned long data) ...@@ -100,8 +97,7 @@ void vpeirq (unsigned long data)
* DVB API SECTION * DVB API SECTION
****************************************************************************/ ****************************************************************************/
static static int budget_start_feed(struct dvb_demux_feed *feed)
int budget_start_feed(struct dvb_demux_feed *feed)
{ {
struct dvb_demux *demux = feed->demux; struct dvb_demux *demux = feed->demux;
struct budget *budget = (struct budget*) demux->priv; struct budget *budget = (struct budget*) demux->priv;
...@@ -114,8 +110,7 @@ int budget_start_feed(struct dvb_demux_feed *feed) ...@@ -114,8 +110,7 @@ int budget_start_feed(struct dvb_demux_feed *feed)
return start_ts_capture (budget); return start_ts_capture (budget);
} }
static static int budget_stop_feed(struct dvb_demux_feed *feed)
int budget_stop_feed(struct dvb_demux_feed *feed)
{ {
struct dvb_demux *demux = feed->demux; struct dvb_demux *demux = feed->demux;
struct budget *budget = (struct budget *) demux->priv; struct budget *budget = (struct budget *) demux->priv;
...@@ -126,8 +121,7 @@ int budget_stop_feed(struct dvb_demux_feed *feed) ...@@ -126,8 +121,7 @@ int budget_stop_feed(struct dvb_demux_feed *feed)
} }
static static int budget_register(struct budget *budget)
int budget_register(struct budget *budget)
{ {
struct dvb_demux *dvbdemux=&budget->demux; struct dvb_demux *dvbdemux=&budget->demux;
int ret; int ret;
...@@ -178,8 +172,7 @@ int budget_register(struct budget *budget) ...@@ -178,8 +172,7 @@ int budget_register(struct budget *budget)
} }
static static void budget_unregister(struct budget *budget)
void budget_unregister(struct budget *budget)
{ {
struct dvb_demux *dvbdemux=&budget->demux; struct dvb_demux *dvbdemux=&budget->demux;
...@@ -196,8 +189,7 @@ void budget_unregister(struct budget *budget) ...@@ -196,8 +189,7 @@ void budget_unregister(struct budget *budget)
} }
static static int master_xfer (struct dvb_i2c_bus *i2c, const struct i2c_msg msgs[], int num)
int master_xfer (struct dvb_i2c_bus *i2c, const struct i2c_msg msgs[], int num)
{ {
struct saa7146_dev *dev = i2c->data; struct saa7146_dev *dev = i2c->data;
return saa7146_i2c_transfer(dev, msgs, num, 6); return saa7146_i2c_transfer(dev, msgs, num, 6);
......
This diff is collapsed.
This diff is collapsed.
...@@ -9,6 +9,16 @@ ...@@ -9,6 +9,16 @@
#define MAX_SAA7146_CAPTURE_BUFFERS 32 /* arbitrary */ #define MAX_SAA7146_CAPTURE_BUFFERS 32 /* arbitrary */
#define BUFFER_TIMEOUT (HZ/2) /* 0.5 seconds */ #define BUFFER_TIMEOUT (HZ/2) /* 0.5 seconds */
#define WRITE_RPS0(x) do { \
static int count = 0; \
dev->d_rps0.cpu_addr[ count++ ] = cpu_to_le32(x); \
} while (0);
#define WRITE_RPS1(x) do { \
static int count = 0; \
dev->d_rps1.cpu_addr[ count++ ] = cpu_to_le32(x); \
} while (0);
struct saa7146_video_dma { struct saa7146_video_dma {
u32 base_odd; u32 base_odd;
u32 base_even; u32 base_even;
......
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