From: Paul Mundt <lethal@linux-sh.org>
To: Greg KH <gregkh@suse.de>
Cc: Grant Likely <grant.likely@secretlab.ca>,
Thomas Gleixner <tglx@linutronix.de>,
Maciej Szmigiero <mhej@o2.pl>,
linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org,
Anton Vorontsov <avorontsov@ru.mvista.com>,
Uwe Kleine-K?nig <u.kleine-koenig@pengutronix.de>,
Andrew Morton <akpm@linux-foundation.org>,
Arnd Bergmann <arnd@arndb.de>, Jonathan Cameron <jic23@cam.ac.uk>,
Ben Nizette <bn@niasdigital.com>
Subject: Re: [GPIO]implement sleeping GPIO chip removal
Date: Thu, 11 Nov 2010 08:15:08 +0900 [thread overview]
Message-ID: <20101110231507.GA6758@linux-sh.org> (raw)
In-Reply-To: <20101110224516.GA19567@suse.de>
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.
next prev parent reply other threads:[~2010-11-10 23:15 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-07 18:30 [GPIO]implement sleeping GPIO chip removal Maciej Szmigiero
2010-11-07 18:30 ` Maciej Szmigiero
2010-11-10 5:09 ` Grant Likely
2010-11-10 9:49 ` Thomas Gleixner
2010-11-10 15:28 ` Maciej Szmigiero
2010-11-10 15:28 ` Maciej Szmigiero
2010-11-10 20:42 ` Thomas Gleixner
2010-11-10 20:42 ` Thomas Gleixner
2010-11-10 21:01 ` Maciej Szmigiero
2010-11-10 21:01 ` Maciej Szmigiero
2010-11-10 21:07 ` Thomas Gleixner
2010-11-10 21:15 ` Grant Likely
2010-11-10 22:45 ` Greg KH
2010-11-10 22:47 ` Thomas Gleixner
2010-11-10 23:15 ` Paul Mundt [this message]
2010-11-10 22:14 ` Grant Likely
2010-11-12 20:46 ` Maciej Szmigiero
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20101110231507.GA6758@linux-sh.org \
--to=lethal@linux-sh.org \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=avorontsov@ru.mvista.com \
--cc=bn@niasdigital.com \
--cc=grant.likely@secretlab.ca \
--cc=gregkh@suse.de \
--cc=jic23@cam.ac.uk \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mhej@o2.pl \
--cc=tglx@linutronix.de \
--cc=u.kleine-koenig@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox