31 lines · c
1/* SPDX-License-Identifier: GPL-2.0-only */2/*3 * Mediated device internal definitions4 *5 * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.6 * Author: Neo Jia <cjia@nvidia.com>7 * Kirti Wankhede <kwankhede@nvidia.com>8 */9 10#ifndef MDEV_PRIVATE_H11#define MDEV_PRIVATE_H12 13extern const struct bus_type mdev_bus_type;14extern const struct attribute_group *mdev_device_groups[];15 16#define to_mdev_type_attr(_attr) \17 container_of(_attr, struct mdev_type_attribute, attr)18#define to_mdev_type(_kobj) \19 container_of(_kobj, struct mdev_type, kobj)20 21int parent_create_sysfs_files(struct mdev_parent *parent);22void parent_remove_sysfs_files(struct mdev_parent *parent);23 24int mdev_create_sysfs_files(struct mdev_device *mdev);25void mdev_remove_sysfs_files(struct mdev_device *mdev);26 27int mdev_device_create(struct mdev_type *kobj, const guid_t *uuid);28int mdev_device_remove(struct mdev_device *dev);29 30#endif /* MDEV_PRIVATE_H */31