lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK9yfHyw=6-e28mHrhyhTuC2uykeqQzpsGRfXcWmcaON=NvcPw@mail.gmail.com>
Date:	Mon, 6 Aug 2012 10:17:49 +0530
From:	Sachin Kamat <sachin.kamat@...aro.org>
To:	Jingoo Han <jg1.han@...sung.com>
Cc:	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

Hi Jingoo,

On 6 August 2012 10:13, Jingoo Han <jg1.han@...sung.com> wrote:
> Since msleep might not sleep for the desired amount when less
> than 20ms, use usleep_range.
>
> Cc: Ashish Jangam <ashish.jangam@...tcummins.com>
> Cc: Richard Purdie <rpurdie@...ys.net>
> Signed-off-by: Jingoo Han <jg1.han@...sung.com>
> ---
>  drivers/video/backlight/da9052_bl.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/video/backlight/da9052_bl.c b/drivers/video/backlight/da9052_bl.c
> index b628d68..10485c9 100644
> --- a/drivers/video/backlight/da9052_bl.c
> +++ b/drivers/video/backlight/da9052_bl.c
> @@ -72,7 +72,7 @@ static int da9052_adjust_wled_brightness(struct da9052_bl *wleds)
>         if (ret < 0)
>                 return ret;
>
> -       msleep(10);
> +       usleep_range(10000, 11000);

Can't we just use usleep(10000) instead?


>
>         if (wleds->brightness) {
>                 ret = da9052_reg_write(wleds->da9052, wled_bank[wleds->led_reg],
> --
> 1.7.1
>
>
> --
> 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/



-- 
With warm regards,
Sachin
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ