[Openpvrsgx-devgroup] [PATCH] pvr-drv: Add missing release

Tony Lindgren tony at atomide.com
Fri Nov 15 03:23:36 CET 2019


Add missing release

Signed-off-by: Tony Lindgren <tony at atomide.com>
---
 drivers/staging/pvr/pvr-drv.c | 15 +++++++++++++++
 1 file changed, 15 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
@@ -121,9 +121,24 @@ struct device *PVRLDMGetDevice(void)
 	return gpsPVRDRMDev->dev;
 }
 
+static int pvr_drm_release(struct inode *inode, struct file *filp)
+{
+	struct drm_file *file_priv = filp->private_data;
+	int error;
+
+	error = drm_release(inode, filp);
+	if (error)
+		return error;
+
+	PVRSRVRelease(file_priv->driver_priv);
+
+	return 0;
+}
+
 static const struct file_operations pvr_fops = {
 	.owner = THIS_MODULE,
 	.open = drm_open,
+	.release = pvr_drm_release,
 	.unlocked_ioctl = drm_ioctl,
 	.compat_ioctl = drm_compat_ioctl,
 	.mmap = PVRMMap,
-- 
2.23.0


More information about the openpvrsgx-devgroup mailing list