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>] [day] [month] [year] [list]
Message-Id: <1374782792-2088-1-git-send-email-jfrederich@gmail.com>
Date:	Thu, 25 Jul 2013 22:06:32 +0200
From:	Jens Frederich <jfrederich@...il.com>
To:	gregkh@...uxfoundation.org
Cc:	jon.nettleton@...il.com, cjb@...top.org, dilinger@...ued.net,
	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
	Jens Frederich <jfrederich@...il.com>
Subject: [PATCH] Staging: olpc_dcon: change to msleep to usleep_range

The resolution of msleep is related to HZ, so with HZ set to
100 any msleep of less then 10ms will become ~10ms. This is
not what we want. Use usleep_range to get more control of
what is happening here.

Signed-off-by: Jens Frederich <jfrederich@...il.com>
---
 drivers/staging/olpc_dcon/olpc_dcon.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/olpc_dcon/olpc_dcon.c b/drivers/staging/olpc_dcon/olpc_dcon.c
index 193e1c6..7c460f2 100644
--- a/drivers/staging/olpc_dcon/olpc_dcon.c
+++ b/drivers/staging/olpc_dcon/olpc_dcon.c
@@ -131,13 +131,13 @@ power_up:
 			pr_warn("unable to force dcon to power up: %d!\n", x);
 			return x;
 		}
-		msleep(10); /* we'll be conservative */
+		usleep_range(10000, 11000);  /* we'll be conservative */
 	}
 
 	pdata->bus_stabilize_wiggle();
 
 	for (x = -1, timeout = 50; timeout && x < 0; timeout--) {
-		msleep(1);
+		usleep_range(1000, 1100);
 		x = dcon_read(dcon, DCON_REG_ID);
 	}
 	if (x < 0) {
-- 
1.7.9.5

--
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