#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/input.h>
#include <linux/usb.h>
#include <linux/hid.h>
#include <linux/mutex.h>
#include <linux/videodev2.h>
#include <asm/unaligned.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(…) …;
static const struct usb_device_id usb_raremono_device_table[] = …;
MODULE_DEVICE_TABLE(usb, usb_raremono_device_table);
#define BUFFER_LENGTH …
#define USB_TIMEOUT …
#define FM_FREQ_RANGE_LOW …
#define FM_FREQ_RANGE_HIGH …
#define AM_FREQ_RANGE_LOW …
#define AM_FREQ_RANGE_HIGH …
#define SW_FREQ_RANGE_LOW …
#define SW_FREQ_RANGE_HIGH …
enum { … };
static const struct v4l2_frequency_band bands[] = …;
struct raremono_device { … };
static inline struct raremono_device *to_raremono_dev(struct v4l2_device *v4l2_dev)
{ … }
static int raremono_cmd_main(struct raremono_device *radio, unsigned band, unsigned freq)
{ … }
static void usb_raremono_disconnect(struct usb_interface *intf)
{ … }
static int vidioc_querycap(struct file *file, void *priv,
struct v4l2_capability *v)
{ … }
static int vidioc_enum_freq_bands(struct file *file, void *priv,
struct v4l2_frequency_band *band)
{ … }
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 void raremono_device_release(struct v4l2_device *v4l2_dev)
{ … }
static const struct v4l2_file_operations usb_raremono_fops = …;
static const struct v4l2_ioctl_ops usb_raremono_ioctl_ops = …;
static int usb_raremono_probe(struct usb_interface *intf,
const struct usb_device_id *id)
{ … }
static struct usb_driver usb_raremono_driver = …;
module_usb_driver(…) …;