#include <linux/module.h>
#include <linux/init.h>
#include <linux/ioport.h>
#include <linux/delay.h>
#include <linux/videodev2.h>
#include <linux/param.h>
#include <linux/pnp.h>
#include <linux/sched.h>
#include <linux/io.h>
#include <media/v4l2-device.h>
#include <media/v4l2-ioctl.h>
#include <media/v4l2-ctrls.h>
#include <media/v4l2-fh.h>
#include <media/v4l2-event.h>
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_VERSION(…) …;
static int io = …;
static int radio_nr = …;
module_param(io, int, 0);
MODULE_PARM_DESC(…) …;
module_param(radio_nr, int, 0);
#define RDS_BUFFER …
#define RDS_RX_FLAG …
#define MBS_RX_FLAG …
struct cadet { … };
static struct cadet cadet_card;
static u16 sigtable[2][4] = …;
static const struct v4l2_frequency_band bands[] = …;
static int cadet_getstereo(struct cadet *dev)
{ … }
static unsigned cadet_gettune(struct cadet *dev)
{ … }
static unsigned cadet_getfreq(struct cadet *dev)
{ … }
static void cadet_settune(struct cadet *dev, unsigned fifo)
{ … }
static void cadet_setfreq(struct cadet *dev, unsigned freq)
{ … }
static bool cadet_has_rds_data(struct cadet *dev)
{ … }
static void cadet_handler(struct timer_list *t)
{ … }
static void cadet_start_rds(struct cadet *dev)
{ … }
static ssize_t cadet_read(struct file *file, char __user *data, size_t count, loff_t *ppos)
{ … }
static int vidioc_querycap(struct file *file, void *priv,
struct v4l2_capability *v)
{ … }
static int vidioc_g_tuner(struct file *file, void *priv,
struct v4l2_tuner *v)
{ … }
static int vidioc_s_tuner(struct file *file, void *priv,
const struct v4l2_tuner *v)
{ … }
static int vidioc_enum_freq_bands(struct file *file, void *priv,
struct v4l2_frequency_band *band)
{ … }
static int vidioc_g_frequency(struct file *file, void *priv,
struct v4l2_frequency *f)
{ … }
static int vidioc_s_frequency(struct file *file, void *priv,
const struct v4l2_frequency *f)
{ … }
static int cadet_s_ctrl(struct v4l2_ctrl *ctrl)
{ … }
static int cadet_open(struct file *file)
{ … }
static int cadet_release(struct file *file)
{ … }
static __poll_t cadet_poll(struct file *file, struct poll_table_struct *wait)
{ … }
static const struct v4l2_file_operations cadet_fops = …;
static const struct v4l2_ioctl_ops cadet_ioctl_ops = …;
static const struct v4l2_ctrl_ops cadet_ctrl_ops = …;
#ifdef CONFIG_PNP
static const struct pnp_device_id cadet_pnp_devices[] = …;
MODULE_DEVICE_TABLE(pnp, cadet_pnp_devices);
static int cadet_pnp_probe(struct pnp_dev *dev, const struct pnp_device_id *dev_id)
{ … }
static struct pnp_driver cadet_pnp_driver = …;
#else
static struct pnp_driver cadet_pnp_driver;
#endif
static void cadet_probe(struct cadet *dev)
{ … }
static int __init cadet_init(void)
{ … }
static void __exit cadet_exit(void)
{ … }
module_init(…) …;
module_exit(cadet_exit);