aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Documentation/driver-api
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2022-09-23 11:26:50 +0200
committerAlex Williamson <alex.williamson@redhat.com>2022-10-04 12:06:58 -0600
commitf2fbc72e6da4f8e01fe5fe3d6871a791e76271c3 (patch)
treeee1b8729387da228a9f23f5a2d7be303cad86155 /Documentation/driver-api
parentvfio/mdev: consolidate all the name sysfs into the core code (diff)
downloadwireguard-linux-f2fbc72e6da4f8e01fe5fe3d6871a791e76271c3.tar.xz
wireguard-linux-f2fbc72e6da4f8e01fe5fe3d6871a791e76271c3.zip
vfio/mdev: consolidate all the available_instance sysfs into the core code
Every driver just print a number, simply add a method to the mdev_driver to return it 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-13-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.rst3
1 files changed, 2 insertions, 1 deletions
diff --git a/Documentation/driver-api/vfio-mediated-device.rst b/Documentation/driver-api/vfio-mediated-device.rst
index dcd1231a6fa8..558bd7ebced8 100644
--- a/Documentation/driver-api/vfio-mediated-device.rst
+++ b/Documentation/driver-api/vfio-mediated-device.rst
@@ -103,6 +103,7 @@ structure to represent a mediated device's driver::
struct mdev_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;
struct device_driver driver;
};
@@ -207,7 +208,7 @@ Directories and files under the sysfs for Each Physical Device
* available_instances
- This attribute should show the number of devices of type <type-id> that can be
+ This attribute shows the number of devices of type <type-id> that can be
created.
* [device]