linux/drivers/media/dvb-core/dvbdev.c

// SPDX-License-Identifier: LGPL-2.1-or-later
/*
 * dvbdev.c
 *
 * Copyright (C) 2000 Ralph  Metzler <[email protected]>
 *                  & Marcus Metzler <[email protected]>
 *                    for convergence integrated media GmbH
 */

#define pr_fmt(fmt)

#include <linux/types.h>
#include <linux/errno.h>
#include <linux/string.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/i2c.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/device.h>
#include <linux/fs.h>
#include <linux/cdev.h>
#include <linux/mutex.h>
#include <media/dvbdev.h>

/* Due to enum tuner_pad_index */
#include <media/tuner.h>

static DEFINE_MUTEX(dvbdev_mutex);
static LIST_HEAD(dvbdevfops_list);
static int dvbdev_debug;

module_param(dvbdev_debug, int, 0644);
MODULE_PARM_DESC();

#define dprintk(fmt, arg...)

static LIST_HEAD(dvb_adapter_list);
static DEFINE_MUTEX(dvbdev_register_lock);

static const char * const dnames[] =;

#ifdef CONFIG_DVB_DYNAMIC_MINORS
#define MAX_DVB_MINORS
#define DVB_MAX_IDS
#else
#define DVB_MAX_IDS

static const u8 minor_type[] = {
	[DVB_DEVICE_VIDEO]      = 0,
	[DVB_DEVICE_AUDIO]      = 1,
	[DVB_DEVICE_SEC]        = 2,
	[DVB_DEVICE_FRONTEND]   = 3,
	[DVB_DEVICE_DEMUX]      = 4,
	[DVB_DEVICE_DVR]        = 5,
	[DVB_DEVICE_CA]         = 6,
	[DVB_DEVICE_NET]        = 7,
	[DVB_DEVICE_OSD]        = 8,
};

#define nums2minor

#define MAX_DVB_MINORS
#endif

static struct class *dvb_class;

static struct dvb_device *dvb_minors[MAX_DVB_MINORS];
static DECLARE_RWSEM(minor_rwsem);

static int dvb_device_open(struct inode *inode, struct file *file)
{}

static const struct file_operations dvb_device_fops =;

static struct cdev dvb_device_cdev;

int dvb_generic_open(struct inode *inode, struct file *file)
{}
EXPORT_SYMBOL();

int dvb_generic_release(struct inode *inode, struct file *file)
{}
EXPORT_SYMBOL();

long dvb_generic_ioctl(struct file *file,
		       unsigned int cmd, unsigned long arg)
{}
EXPORT_SYMBOL();

static int dvbdev_get_free_id(struct dvb_adapter *adap, int type)
{}

static void dvb_media_device_free(struct dvb_device *dvbdev)
{}

#if defined(CONFIG_MEDIA_CONTROLLER_DVB)
static int dvb_create_tsout_entity(struct dvb_device *dvbdev,
				   const char *name, int npads)
{}

#define DEMUX_TSOUT
#define DVR_TSOUT

static int dvb_create_media_entity(struct dvb_device *dvbdev,
				   int type, int demux_sink_pads)
{}
#endif

static int dvb_register_media_device(struct dvb_device *dvbdev,
				     int type, int minor,
				     unsigned int demux_sink_pads)
{}

int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev,
			const struct dvb_device *template, void *priv,
			enum dvb_device_type type, int demux_sink_pads)
{}
EXPORT_SYMBOL();

void dvb_remove_device(struct dvb_device *dvbdev)
{}
EXPORT_SYMBOL();

static void dvb_free_device(struct kref *ref)
{}

struct dvb_device *dvb_device_get(struct dvb_device *dvbdev)
{}
EXPORT_SYMBOL();

void dvb_device_put(struct dvb_device *dvbdev)
{}

void dvb_unregister_device(struct dvb_device *dvbdev)
{}
EXPORT_SYMBOL();

#ifdef CONFIG_MEDIA_CONTROLLER_DVB

static int dvb_create_io_intf_links(struct dvb_adapter *adap,
				    struct media_interface *intf,
				    char *name)
{}

int dvb_create_media_graph(struct dvb_adapter *adap,
			   bool create_rf_connector)
{}
EXPORT_SYMBOL_GPL();
#endif

static int dvbdev_check_free_adapter_num(int num)
{}

static int dvbdev_get_free_adapter_num(void)
{}

int dvb_register_adapter(struct dvb_adapter *adap, const char *name,
			 struct module *module, struct device *device,
			 short *adapter_nums)
{}
EXPORT_SYMBOL();

int dvb_unregister_adapter(struct dvb_adapter *adap)
{}
EXPORT_SYMBOL();

/*
 * if the miracle happens and "generic_usercopy()" is included into
 * the kernel, then this can vanish. please don't make the mistake and
 * define this as video_usercopy(). this will introduce a dependency
 * to the v4l "videodev.o" module, which is unnecessary for some
 * cards (ie. the budget dvb-cards don't need the v4l module...)
 */
int dvb_usercopy(struct file *file,
		 unsigned int cmd, unsigned long arg,
		 int (*func)(struct file *file,
			     unsigned int cmd, void *arg))
{}

#if IS_ENABLED(CONFIG_I2C)
struct i2c_client *dvb_module_probe(const char *module_name,
				    const char *name,
				    struct i2c_adapter *adap,
				    unsigned char addr,
				    void *platform_data)
{}
EXPORT_SYMBOL_GPL();

void dvb_module_release(struct i2c_client *client)
{}
EXPORT_SYMBOL_GPL();
#endif

static int dvb_uevent(const struct device *dev, struct kobj_uevent_env *env)
{}

static char *dvb_devnode(const struct device *dev, umode_t *mode)
{}

static int __init init_dvbdev(void)
{}

static void __exit exit_dvbdev(void)
{}

subsys_initcall(init_dvbdev);
module_exit(exit_dvbdev);

MODULE_DESCRIPTION();
MODULE_AUTHOR();
MODULE_LICENSE();