linux/drivers/vfio/mdev/mdev_core.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Mediated device Core Driver
 *
 * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
 *     Author: Neo Jia <[email protected]>
 *             Kirti Wankhede <[email protected]>
 */

#include <linux/module.h>
#include <linux/slab.h>
#include <linux/sysfs.h>
#include <linux/mdev.h>

#include "mdev_private.h"

#define DRIVER_VERSION
#define DRIVER_AUTHOR
#define DRIVER_DESC

static struct class_compat *mdev_bus_compat_class;

static LIST_HEAD(mdev_list);
static DEFINE_MUTEX(mdev_list_lock);

/* Caller must hold parent unreg_sem read or write lock */
static void mdev_device_remove_common(struct mdev_device *mdev)
{}

static int mdev_device_remove_cb(struct device *dev, void *data)
{}

/*
 * mdev_register_parent: Register a device as parent for mdevs
 * @parent: parent structure registered
 * @dev: device structure representing parent device.
 * @mdev_driver: Device driver to bind to the newly created mdev
 * @types: Array of supported mdev types
 * @nr_types: Number of entries in @types
 *
 * Registers the @parent stucture as a parent for mdev types and thus mdev
 * devices.  The caller needs to hold a reference on @dev that must not be
 * released until after the call to mdev_unregister_parent().
 *
 * Returns a negative value on error, otherwise 0.
 */
int mdev_register_parent(struct mdev_parent *parent, struct device *dev,
		struct mdev_driver *mdev_driver, struct mdev_type **types,
		unsigned int nr_types)
{}
EXPORT_SYMBOL();

/*
 * mdev_unregister_parent : Unregister a parent device
 * @parent: parent structure to unregister
 */
void mdev_unregister_parent(struct mdev_parent *parent)
{}
EXPORT_SYMBOL();

static void mdev_device_release(struct device *dev)
{}

int mdev_device_create(struct mdev_type *type, const guid_t *uuid)
{}

int mdev_device_remove(struct mdev_device *mdev)
{}

static int __init mdev_init(void)
{}

static void __exit mdev_exit(void)
{}

subsys_initcall()
module_exit()

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