#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/input.h>
#include <linux/videodev2.h>
#include <linux/usb.h>
#include <media/v4l2-device.h>
#include <media/v4l2-ioctl.h>
#include <media/v4l2-ctrls.h>
#include <media/v4l2-event.h>
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_VERSION(…) …;
#define DSB100_VENDOR …
#define DSB100_PRODUCT …
#define DSB100_TUNE …
#define DSB100_ONOFF …
#define TB_LEN …
#define FREQ_MIN …
#define FREQ_MAX …
#define FREQ_MUL …
#define v4l2_dev_to_radio(d) …
static int radio_nr = …;
module_param(radio_nr, int, 0);
struct dsbr100_device { … };
static int dsbr100_setfreq(struct dsbr100_device *radio, unsigned freq)
{ … }
static int dsbr100_start(struct dsbr100_device *radio)
{ … }
static int dsbr100_stop(struct dsbr100_device *radio)
{ … }
static void dsbr100_getstat(struct dsbr100_device *radio)
{ … }
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_s_frequency(struct file *file, void *priv,
const struct v4l2_frequency *f)
{ … }
static int vidioc_g_frequency(struct file *file, void *priv,
struct v4l2_frequency *f)
{ … }
static int usb_dsbr100_s_ctrl(struct v4l2_ctrl *ctrl)
{ … }
static void usb_dsbr100_disconnect(struct usb_interface *intf)
{ … }
static int usb_dsbr100_suspend(struct usb_interface *intf, pm_message_t message)
{ … }
static int usb_dsbr100_resume(struct usb_interface *intf)
{ … }
static void usb_dsbr100_release(struct v4l2_device *v4l2_dev)
{ … }
static const struct v4l2_ctrl_ops usb_dsbr100_ctrl_ops = …;
static const struct v4l2_file_operations usb_dsbr100_fops = …;
static const struct v4l2_ioctl_ops usb_dsbr100_ioctl_ops = …;
static int usb_dsbr100_probe(struct usb_interface *intf,
const struct usb_device_id *id)
{ … }
static const struct usb_device_id usb_dsbr100_device_table[] = …;
MODULE_DEVICE_TABLE(usb, usb_dsbr100_device_table);
static struct usb_driver usb_dsbr100_driver = …;
module_usb_driver(…) …;