diff options
author | Christoph Hellwig <hch@lst.de> | 2022-09-23 11:26:51 +0200 |
---|---|---|
committer | Alex Williamson <alex.williamson@redhat.com> | 2022-10-04 12:06:58 -0600 |
commit | 685a1537f4c603cfcaf4b9be56ff6a571f7ddd08 (patch) | |
tree | 7319267ff8a1b392c167e693b34eed5f41ff5d94 /Documentation/driver-api | |
parent | f2fbc72e6da4f8e01fe5fe3d6871a791e76271c3 (diff) | |
download | linux-riscv-685a1537f4c603cfcaf4b9be56ff6a571f7ddd08.tar.gz linux-riscv-685a1537f4c603cfcaf4b9be56ff6a571f7ddd08.tar.bz2 linux-riscv-685a1537f4c603cfcaf4b9be56ff6a571f7ddd08.zip |
vfio/mdev: consolidate all the description sysfs into the core code
Every driver just emits a string, simply add a method to the mdev_driver
to return it and provide a standard sysfs show function.
Remove the now unused types_attrs field in struct mdev_driver and the
support code for it.
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>
Link: https://lore.kernel.org/r/20220923092652.100656-14-hch@lst.de
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'Documentation/driver-api')
-rw-r--r-- | Documentation/driver-api/vfio-mediated-device.rst | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Documentation/driver-api/vfio-mediated-device.rst b/Documentation/driver-api/vfio-mediated-device.rst index 558bd7ebced8..fdf7d69378ec 100644 --- a/Documentation/driver-api/vfio-mediated-device.rst +++ b/Documentation/driver-api/vfio-mediated-device.rst @@ -104,7 +104,7 @@ structure to represent a mediated device's driver:: int (*probe) (struct mdev_device *dev); void (*remove) (struct mdev_device *dev); unsigned int (*get_available)(struct mdev_type *mtype); - const struct attribute * const *types_attrs; + ssize_t (*show_description)(struct mdev_type *mtype, char *buf); struct device_driver driver; }; @@ -222,7 +222,7 @@ Directories and files under the sysfs for Each Physical Device * description - This attribute should show brief features/description of the type. This is + This attribute can show brief features/description of the type. This is an optional attribute. Directories and Files Under the sysfs for Each mdev Device |