Re: [GPIO]implement sleeping GPIO chip removal

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

 



On Wed, Nov 10, 2010 at 02:45:16PM -0800, Greg KH wrote:
> On Wed, Nov 10, 2010 at 02:15:40PM -0700, Grant Likely wrote:
> > On Wed, Nov 10, 2010 at 10:07:05PM +0100, Thomas Gleixner wrote:
> > > > I understand that it could be simplified by removing redundant code
> > > > (as Grant Likely had suggested before), and moving it to completion
> > > > interface instead of manipulating a task structure directly, but
> > > > this doesn't mean that the whole GPIO code has to be rewritten just
> > > > to add one functionality.
> > > 
> > > It's not about rewriting, it's about fixing the problem in the right
> > > way and not just hacking around it.
> > > 
> > > If we see a shortcoming like this, we fix it and do not magically work
> > > around it.
> > 
> > +1
> > 
> > Thomas is right.  kobject reference counting is the correct solution.
> > Nack on this approach.
> 
> Only use a kobject if you want to be in the sysfs hierarchy (which I
> don't think you want to do here.)  If you want proper reference
> counting, use a 'struct kref' instead.
> 
This is actually an interesting problem. The gpiolib code presently has
its own hand-rolled sysfs support, which is entirely optional. If someone
is going to go through and do some refactoring anyways it would be
worthwile to see how much tidying up using a kobject would permit. 
kobject-based refcounting could in effect be used like kref-refcounting
with the sysfs interface disabled, too.
--
To unsubscribe from this list: send the line "unsubscribe linux-arch" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux