[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.00.1011101045230.2900@localhost6.localdomain6>
Date: Wed, 10 Nov 2010 10:49:44 +0100 (CET)
From: Thomas Gleixner <tglx@...utronix.de>
To: Grant Likely <grant.likely@...retlab.ca>
cc: Maciej Szmigiero <mhej@...pl>, linux-kernel@...r.kernel.org,
linux-arch@...r.kernel.org,
Anton Vorontsov <avorontsov@...mvista.com>,
Greg Kroah-Hartman <gregkh@...e.de>,
Uwe Kleine-K?nig <u.kleine-koenig@...gutronix.de>,
Andrew Morton <akpm@...ux-foundation.org>,
Arnd Bergmann <arnd@...db.de>,
Jonathan Cameron <jic23@....ac.uk>,
Ben Nizette <bn@...sdigital.com>
Subject: Re: [GPIO]implement sleeping GPIO chip removal
On Tue, 9 Nov 2010, Grant Likely wrote:
> On Sun, Nov 07, 2010 at 07:30:33PM +0100, Maciej Szmigiero wrote:
> > [GPIO]implement sleeping GPIO chip removal
> >
> > Existing GPIO chip removal code is only of "non-blocking" type: if the chip is currently
> > requested it just returns -EBUSY.
> > This is bad for devices which disappear and reappear, like those on hot pluggable buses,
> > because it forces the driver to call gpiochip_remove() in loop until it returns 0.
> >
> > This patch implements a new function which sleeps until device is free instead of
> > returning -EBUSY like gpiochip_remove().
> >
> > Signed-off-by: Maciej Szmigiero <mhej@...pl>
>
> This patch makes me uncomfortable, but I'm not entirely sure why. Is
Maybe because it open codes a sloppy refcounting with a loop and magic
sleeps instead of converting the code to kobjects and proper
refcounting ?
Thanks,
tglx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists