#include <linux/init.h>
#include <linux/list.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/kmod.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/interrupt.h>
#include <linux/debugfs.h>
#include <linux/delay.h>
#include <asm/div64.h>
#include "saa7164.h"
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;
unsigned int saa_debug;
module_param_named(debug, saa_debug, int, 0644);
MODULE_PARM_DESC(…) …;
static unsigned int fw_debug;
module_param(fw_debug, int, 0644);
MODULE_PARM_DESC(…) …;
unsigned int encoder_buffers = …;
module_param(encoder_buffers, int, 0644);
MODULE_PARM_DESC(…) …;
unsigned int vbi_buffers = …;
module_param(vbi_buffers, int, 0644);
MODULE_PARM_DESC(…) …;
unsigned int waitsecs = …;
module_param(waitsecs, int, 0644);
MODULE_PARM_DESC(…) …;
static unsigned int card[] = …;
module_param_array(…);
MODULE_PARM_DESC(…) …;
static unsigned int print_histogram = …;
module_param(print_histogram, int, 0644);
MODULE_PARM_DESC(…) …;
unsigned int crc_checking = …;
module_param(crc_checking, int, 0644);
MODULE_PARM_DESC(…) …;
static unsigned int guard_checking = …;
module_param(guard_checking, int, 0644);
MODULE_PARM_DESC(…) …;
static bool enable_msi = …;
module_param(enable_msi, bool, 0444);
MODULE_PARM_DESC(…) …;
static unsigned int saa7164_devcount;
static DEFINE_MUTEX(devlist);
LIST_HEAD(…);
#define INT_SIZE …
static void saa7164_pack_verifier(struct saa7164_buffer *buf)
{ … }
#define FIXED_VIDEO_PID …
#define FIXED_AUDIO_PID …
static void saa7164_ts_verifier(struct saa7164_buffer *buf)
{ … }
static void saa7164_histogram_reset(struct saa7164_histogram *hg, char *name)
{ … }
void saa7164_histogram_update(struct saa7164_histogram *hg, u32 val)
{ … }
static void saa7164_histogram_print(struct saa7164_port *port,
struct saa7164_histogram *hg)
{ … }
static void saa7164_work_enchandler_helper(struct saa7164_port *port, int bufnr)
{ … }
static void saa7164_work_enchandler(struct work_struct *w)
{ … }
static void saa7164_work_vbihandler(struct work_struct *w)
{ … }
static void saa7164_work_cmdhandler(struct work_struct *w)
{ … }
static void saa7164_buffer_deliver(struct saa7164_buffer *buf)
{ … }
static irqreturn_t saa7164_irq_vbi(struct saa7164_port *port)
{ … }
static irqreturn_t saa7164_irq_encoder(struct saa7164_port *port)
{ … }
static irqreturn_t saa7164_irq_ts(struct saa7164_port *port)
{ … }
static irqreturn_t saa7164_irq(int irq, void *dev_id)
{ … }
void saa7164_getfirmwarestatus(struct saa7164_dev *dev)
{ … }
u32 saa7164_getcurrentfirmwareversion(struct saa7164_dev *dev)
{ … }
void saa7164_dumpregs(struct saa7164_dev *dev, u32 addr)
{ … }
static void saa7164_dump_hwdesc(struct saa7164_dev *dev)
{ … }
static void saa7164_dump_intfdesc(struct saa7164_dev *dev)
{ … }
static void saa7164_dump_busdesc(struct saa7164_dev *dev)
{ … }
static void saa7164_get_descriptors(struct saa7164_dev *dev)
{ … }
static int saa7164_pci_quirks(struct saa7164_dev *dev)
{ … }
static int get_resources(struct saa7164_dev *dev)
{ … }
static int saa7164_port_init(struct saa7164_dev *dev, int portnr)
{ … }
static int saa7164_dev_setup(struct saa7164_dev *dev)
{ … }
static void saa7164_dev_unregister(struct saa7164_dev *dev)
{ … }
#ifdef CONFIG_DEBUG_FS
static void *saa7164_seq_start(struct seq_file *s, loff_t *pos)
{ … }
static void *saa7164_seq_next(struct seq_file *s, void *v, loff_t *pos)
{ … }
static void saa7164_seq_stop(struct seq_file *s, void *v)
{ … }
static int saa7164_seq_show(struct seq_file *m, void *v)
{ … }
static const struct seq_operations saa7164_sops = …;
DEFINE_SEQ_ATTRIBUTE(…);
static struct dentry *saa7614_dentry;
static void __init saa7164_debugfs_create(void)
{ … }
static void __exit saa7164_debugfs_remove(void)
{ … }
#else
static void saa7164_debugfs_create(void) { }
static void saa7164_debugfs_remove(void) { }
#endif
static int saa7164_thread_function(void *data)
{ … }
static bool saa7164_enable_msi(struct pci_dev *pci_dev, struct saa7164_dev *dev)
{ … }
static int saa7164_initdev(struct pci_dev *pci_dev,
const struct pci_device_id *pci_id)
{ … }
static void saa7164_shutdown(struct saa7164_dev *dev)
{ … }
static void saa7164_finidev(struct pci_dev *pci_dev)
{ … }
static const struct pci_device_id saa7164_pci_tbl[] = …;
MODULE_DEVICE_TABLE(pci, saa7164_pci_tbl);
static struct pci_driver saa7164_pci_driver = …;
static int __init saa7164_init(void)
{ … }
static void __exit saa7164_fini(void)
{ … }
module_init(…) …;
module_exit(saa7164_fini);