[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20120807162821.GA14711@sirena.org.uk>
Date: Tue, 7 Aug 2012 17:28:22 +0100
From: Mark Brown <broonie@...nsource.wolfsonmicro.com>
To: Jingoo Han <jg1.han@...sung.com>
Cc: 'Sachin Kamat' <sachin.kamat@...aro.org>,
'Andrew Morton' <akpm@...ux-foundation.org>,
'LKML' <linux-kernel@...r.kernel.org>,
'Richard Purdie' <rpurdie@...ys.net>,
'Ashish Jangam' <ashish.jangam@...tcummins.com>
Subject: Re: [PATCH 1/3] backlight: da9052: Use usleep_range() instead of
msleep() for small sleeps
On Mon, Aug 06, 2012 at 01:59:38PM +0900, Jingoo Han wrote:
> On Monday, August 06, 2012 1:48 PM Sachin Kamat wrote:
> > > + usleep_range(10000, 11000);
> > Can't we just use usleep(10000) instead?
> usleep() is not available.
> For more details, refer to Documentation/timers/timers-howto.txt.
Given how common this pattern is is it not more sensible to just
provide usleep() even if just as an inline that's something like
void usleep(unsigned long t)
{
usleep_range(t, t + (t / 10));
}
since the usleep_range() isn't ideal for clarity (and usually the upper
bound isn't a particular concern for the driver, it just wants the usual
"delay for at least x" semantics).
--
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