lkml.org 
[lkml]   [2008]   [Nov]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Store the relevant miscdevice in file->private_data in misc_open()
On Fri, Nov 14, 2008 at 10:54:41AM +1100, Michael Ellerman wrote:
> On Thu, 2008-11-13 at 09:31 -0800, Greg KH wrote:
> > On Thu, Nov 13, 2008 at 03:49:50PM +1100, Michael Ellerman wrote:
> > > Currently it's not easy to share file_operations between multiple
> > > instances of a miscdevice. In order to do this, the device code needs to
> > > store a list of all it's miscdevice instances, and when fops->open() is
> > > called, search the list and find the right device based on the minor
> > > number.
> > >
> > > However the generic miscdevice code already has a list of miscdevices,
> > > and uses this to find the right device in misc_open(). If misc_open()
> > > would store the miscdevice it found in file->private_data, then the
> > > device code wouldn't need to worry about storing it's own separate list
> > > and searching that as well.
> > >
> > > The rest of the miscdevice code does not use file->private_data, so the
> > > device code is still free to use file->private_data for something else
> > > if it wants to.
> > >
> > > Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
> >
> > Do you have a follow-on patch for some misc device using code that would
> > take advantage of this change?
>
> Ah, good point. I do, but not for upstream :/

Hm, then I have to ask why should we take this change?

And why would the driver not be availble for upstream to take?

thanks,

greg k-h


\
 
 \ /
  Last update: 2008-11-14 01:21    [W:0.053 / U:0.972 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site