[Openpvrsgx-devgroup] [PATCH 3/4] pvr-drv: Add missing postclose

Tony Lindgren tony at atomide.com
Fri Nov 15 02:05:12 CET 2019


I missed adding postlose earlier.

Signed-off-by: Tony Lindgren <tony at atomide.com>
---
 drivers/staging/pvr/pvr-drv.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/staging/pvr/pvr-drv.c b/drivers/staging/pvr/pvr-drv.c
--- a/drivers/staging/pvr/pvr-drv.c
+++ b/drivers/staging/pvr/pvr-drv.c
@@ -72,6 +72,13 @@ static int pvr_open(struct drm_device *dev, struct drm_file *file)
 	return PVRSRVOpen(dev, file);
 }
 
+static void pvr_postclose(struct drm_device *dev, struct drm_file *file)
+{
+	PVRSRVRelease(file->driver_priv);
+
+	file->driver_priv = NULL;
+}
+
 static int pvr_ioctl_command(struct drm_device *dev, void *arg, struct drm_file *filp)
 {
 	dev_dbg(dev->dev, "%s: dev: %px arg: %px filp: %px\n", __func__, dev, arg, filp);
@@ -136,6 +143,7 @@ static struct drm_driver pvr_drm_driver = {
 	.driver_features = DRIVER_RENDER,
 	.dev_priv_size = 0,
 	.open = pvr_open,
+	.postclose = pvr_postclose,
 	.ioctls = pvr_ioctls,
 	.num_ioctls = ARRAY_SIZE(pvr_ioctls),
 	.fops = &pvr_fops,
-- 
2.23.0


More information about the openpvrsgx-devgroup mailing list