summaryrefslogtreecommitdiff
path: root/drivers/vfio/platform/vfio_platform_private.h
diff options
context:
space:
mode:
authorJason Gunthorpe <jgg@nvidia.com>2021-08-05 22:19:03 -0300
committerAlex Williamson <alex.williamson@redhat.com>2021-08-11 09:50:11 -0600
commitab7e5e34a9f661f5649f48d4531c4a75713ff7cf (patch)
treeb894176e74ab550ba7048b0350f5d4203cdfbd8c /drivers/vfio/platform/vfio_platform_private.h
parentda119f387e94642da959a22ae9c22e09abe34926 (diff)
vfio/platform: Use open_device() instead of open coding a refcnt scheme
Platform simply wants to run some code when the device is first opened/last closed. Use the core framework and locking for this. Aside from removing a bit of code this narrows the locking scope from a global lock. Reviewed-by: Cornelia Huck <cohuck@redhat.com> Reviewed-by: Eric Auger <eric.auger@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Signed-off-by: Yishai Hadas <yishaih@nvidia.com> Link: https://lore.kernel.org/r/7-v4-9ea22c5e6afb+1adf-vfio_reflck_jgg@nvidia.com Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'drivers/vfio/platform/vfio_platform_private.h')
-rw-r--r--drivers/vfio/platform/vfio_platform_private.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/vfio/platform/vfio_platform_private.h b/drivers/vfio/platform/vfio_platform_private.h
index dfb834c13659..520d2a8e8375 100644
--- a/drivers/vfio/platform/vfio_platform_private.h
+++ b/drivers/vfio/platform/vfio_platform_private.h
@@ -48,7 +48,6 @@ struct vfio_platform_device {
u32 num_regions;
struct vfio_platform_irq *irqs;
u32 num_irqs;
- int refcnt;
struct mutex igate;
const char *compat;
const char *acpihid;