mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 16:13:19 +09:00
vfio/mdev: consolidate all the name sysfs into the core code
Every driver just emits a static string, simply add a field to the mdev_type for the driver to fill out or fall back to the sysfs name and provide a standard sysfs show function. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Reviewed-by: Kevin Tian <kevin.tian@intel.com> Reviewed-by: Kirti Wankhede <kwankhede@nvidia.com> Reviewed-by: Eric Farman <farman@linux.ibm.com> Link: https://lore.kernel.org/r/20220923092652.100656-12-hch@lst.de Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
This commit is contained in:
committed by
Alex Williamson
parent
290aac5df8
commit
0bc79069cc
@@ -26,6 +26,7 @@ struct mdev_device {
|
||||
struct mdev_type {
|
||||
/* set by the driver before calling mdev_register parent: */
|
||||
const char *sysfs_name;
|
||||
const char *pretty_name;
|
||||
|
||||
/* set by the core, can be used drivers */
|
||||
struct mdev_parent *parent;
|
||||
|
||||
Reference in New Issue
Block a user