summaryrefslogtreecommitdiffstats
path: root/samples/vfio-mdev/mtty.c
diff options
context:
space:
mode:
authorAlex Williamson <alex.williamson@redhat.com>2016-12-30 16:13:41 +0100
committerAlex Williamson <alex.williamson@redhat.com>2016-12-30 16:13:41 +0100
commit9372e6feaafb65d88f667ffb5b7b425f8568344f (patch)
tree2fa165cb84cc92d297d283f4fe171b045dcbeb61 /samples/vfio-mdev/mtty.c
parentvfio-mdev: de-polute the namespace, rename parent_device & parent_ops (diff)
downloadlinux-9372e6feaafb65d88f667ffb5b7b425f8568344f.tar.xz
linux-9372e6feaafb65d88f667ffb5b7b425f8568344f.zip
vfio-mdev: Make mdev_parent private
Rather than hoping for good behavior by marking some elements internal, enforce it by making the entire structure private and creating an accessor function for the one useful external field. Cc: Zhenyu Wang <zhenyuw@linux.intel.com> Cc: Zhi Wang <zhi.a.wang@intel.com> Cc: Jike Song <jike.song@intel.com> Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Reviewed by: Kirti Wankhede <kwankhede@nvidia.com>
Diffstat (limited to 'samples/vfio-mdev/mtty.c')
-rw-r--r--samples/vfio-mdev/mtty.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/samples/vfio-mdev/mtty.c b/samples/vfio-mdev/mtty.c
index 1a74f0e488da..5e13efc62bad 100644
--- a/samples/vfio-mdev/mtty.c
+++ b/samples/vfio-mdev/mtty.c
@@ -734,7 +734,7 @@ int mtty_create(struct kobject *kobj, struct mdev_device *mdev)
for (i = 0; i < 2; i++) {
snprintf(name, MTTY_STRING_LEN, "%s-%d",
- dev_driver_string(mdev->parent->dev), i + 1);
+ dev_driver_string(mdev_parent_dev(mdev)), i + 1);
if (!strcmp(kobj->name, name)) {
nr_ports = i + 1;
break;