[PATCH 2/5] drm/vgem: fops should be separate and constified

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



...or else it just won't build.

Signed-off-by: Ben Widawsky <ben@xxxxxxxxxxxx>
---
 drivers/gpu/drm/vgem/vgem_drv.c |   20 +++++++++++---------
 1 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/drivers/gpu/drm/vgem/vgem_drv.c b/drivers/gpu/drm/vgem/vgem_drv.c
index 82c6787..3084389 100644
--- a/drivers/gpu/drm/vgem/vgem_drv.c
+++ b/drivers/gpu/drm/vgem/vgem_drv.c
@@ -173,6 +173,16 @@ static struct drm_ioctl_desc vgem_ioctls[] = {
 			  DRM_UNLOCKED | DRM_AUTH),
 };
 
+static const struct file_operations vgem_driver_fops = {
+	.owner		= THIS_MODULE,
+	.open		= drm_open,
+	.mmap		= drm_gem_mmap,
+	.poll		= drm_poll,
+	.read		= drm_read,
+	.unlocked_ioctl = drm_ioctl,
+	.release	= drm_release,
+};
+
 static struct drm_driver vgem_driver = {
 	.driver_features	= DRIVER_BUS_PLATFORM | DRIVER_GEM,
 	.load			= vgem_load,
@@ -183,15 +193,7 @@ static struct drm_driver vgem_driver = {
 	.gem_free_object	= vgem_gem_free_object,
 	.gem_vm_ops		= &vgem_gem_vm_ops,
 	.ioctls			= vgem_ioctls,
-	.fops = {
-		.owner		= THIS_MODULE,
-		.open		= drm_open,
-		.mmap		= drm_gem_mmap,
-		.poll		= drm_poll,
-		.read		= drm_read,
-		.unlocked_ioctl = drm_ioctl,
-		.release	= drm_release,
-	},
+	.fops			= &vgem_driver_fops,
 	.name	= DRIVER_NAME,
 	.desc	= DRIVER_DESC,
 	.date	= DRIVER_DATE,
-- 
1.7.9

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux