diff mbox

[1/2] drm/omap: drm API update: make fops struct const

Message ID 1323737384-3145-2-git-send-email-rob.clark@linaro.org
State Superseded
Headers show

Commit Message

Rob Clark Dec. 13, 2011, 12:49 a.m. UTC
From: Rob Clark <rob@ti.com>

Update to reflect changes in:
"Make the per-driver file_operations struct const"

Signed-off-by: Rob Clark <rob@ti.com>
---
 drivers/staging/omapdrm/omap_drv.c |   24 +++++++++++++-----------
 1 files changed, 13 insertions(+), 11 deletions(-)

Comments

Greg KH Dec. 13, 2011, 12:55 a.m. UTC | #1
On Mon, Dec 12, 2011 at 06:49:43PM -0600, Rob Clark wrote:
> From: Rob Clark <rob@ti.com>
> 
> Update to reflect changes in:
> "Make the per-driver file_operations struct const"

This one I could take today, no need for me to rely on the drm api
changes, right?

greg k-h
Rob Clark Dec. 13, 2011, 12:59 a.m. UTC | #2
On Mon, Dec 12, 2011 at 6:55 PM, Greg KH <greg@kroah.com> wrote:
> On Mon, Dec 12, 2011 at 06:49:43PM -0600, Rob Clark wrote:
>> From: Rob Clark <rob@ti.com>
>>
>> Update to reflect changes in:
>> "Make the per-driver file_operations struct const"
>
> This one I could take today, no need for me to rely on the drm api
> changes, right?

I don't think so, at least not if you want it to compile ;-)

Previously the 'struct file_operations' was inline with the 'struct
drm_driver' rather than a pointer.  But if it it makes it easier for
you to keep track I can keep a tree that you can pull from w/ a branch
on top with the patches that depend on stuff coming in thru drm-next.

BR,
-R

> greg k-h
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
Greg KH Dec. 13, 2011, 1:04 a.m. UTC | #3
On Mon, Dec 12, 2011 at 06:59:59PM -0600, Rob Clark wrote:
> On Mon, Dec 12, 2011 at 6:55 PM, Greg KH <greg@kroah.com> wrote:
> > On Mon, Dec 12, 2011 at 06:49:43PM -0600, Rob Clark wrote:
> >> From: Rob Clark <rob@ti.com>
> >>
> >> Update to reflect changes in:
> >> "Make the per-driver file_operations struct const"
> >
> > This one I could take today, no need for me to rely on the drm api
> > changes, right?
> 
> I don't think so, at least not if you want it to compile ;-)

Doh, you are right, sorry about that.

> Previously the 'struct file_operations' was inline with the 'struct
> drm_driver' rather than a pointer.  But if it it makes it easier for
> you to keep track I can keep a tree that you can pull from w/ a branch
> on top with the patches that depend on stuff coming in thru drm-next.

No, that would mix the two branches, and I can't do that, right?

So let's just wait for the drm-next branch to be merged with Linus, and
I'll hold onto these until then, ok?

thanks,

greg k-h
Rob Clark Dec. 13, 2011, 1:09 a.m. UTC | #4
On Mon, Dec 12, 2011 at 7:04 PM, Greg KH <greg@kroah.com> wrote:
> On Mon, Dec 12, 2011 at 06:59:59PM -0600, Rob Clark wrote:
>> On Mon, Dec 12, 2011 at 6:55 PM, Greg KH <greg@kroah.com> wrote:
>> > On Mon, Dec 12, 2011 at 06:49:43PM -0600, Rob Clark wrote:
>> >> From: Rob Clark <rob@ti.com>
>> >>
>> >> Update to reflect changes in:
>> >> "Make the per-driver file_operations struct const"
>> >
>> > This one I could take today, no need for me to rely on the drm api
>> > changes, right?
>>
>> I don't think so, at least not if you want it to compile ;-)
>
> Doh, you are right, sorry about that.
>
>> Previously the 'struct file_operations' was inline with the 'struct
>> drm_driver' rather than a pointer.  But if it it makes it easier for
>> you to keep track I can keep a tree that you can pull from w/ a branch
>> on top with the patches that depend on stuff coming in thru drm-next.
>
> No, that would mix the two branches, and I can't do that, right?

hmm, yeah

> So let's just wait for the drm-next branch to be merged with Linus, and
> I'll hold onto these until then, ok?

ok, great.. if you don't mind just holding them until drm-next gets
pulled into Linus's tree, that would be perfect.  Thanks!

BR,
-R


> thanks,
>
> greg k-h
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
diff mbox

Patch

diff --git a/drivers/staging/omapdrm/omap_drv.c b/drivers/staging/omapdrm/omap_drv.c
index 7ecf578..d05e2b4 100644
--- a/drivers/staging/omapdrm/omap_drv.c
+++ b/drivers/staging/omapdrm/omap_drv.c
@@ -708,6 +708,18 @@  static struct vm_operations_struct omap_gem_vm_ops = {
 	.close = drm_gem_vm_close,
 };
 
+static const struct file_operations omapdriver_fops = {
+		.owner = THIS_MODULE,
+		.open = drm_open,
+		.unlocked_ioctl = drm_ioctl,
+		.release = drm_release,
+		.mmap = omap_gem_mmap,
+		.poll = drm_poll,
+		.fasync = drm_fasync,
+		.read = drm_read,
+		.llseek = noop_llseek,
+};
+
 static struct drm_driver omap_drm_driver = {
 		.driver_features =
 				DRIVER_HAVE_IRQ | DRIVER_MODESET | DRIVER_GEM,
@@ -734,17 +746,7 @@  static struct drm_driver omap_drm_driver = {
 		.dumb_destroy = omap_gem_dumb_destroy,
 		.ioctls = ioctls,
 		.num_ioctls = DRM_OMAP_NUM_IOCTLS,
-		.fops = {
-				.owner = THIS_MODULE,
-				.open = drm_open,
-				.unlocked_ioctl = drm_ioctl,
-				.release = drm_release,
-				.mmap = omap_gem_mmap,
-				.poll = drm_poll,
-				.fasync = drm_fasync,
-				.read = drm_read,
-				.llseek = noop_llseek,
-		},
+		.fops = &omapdriver_fops,
 		.name = DRIVER_NAME,
 		.desc = DRIVER_DESC,
 		.date = DRIVER_DATE,