From 7ac3e2a7d2c23ea71adeb56d8afbe1b1cbeee4df Mon Sep 17 00:00:00 2001 From: reinelt Date: Sun, 20 Jun 2004 10:09:56 +0000 Subject: [lcd4linux @ 2004-06-20 10:09:52 by reinelt] 'const'ified the whole source git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@476 3ae390bd-cb1e-0410-b409-cd5a39f66f1f --- udelay.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'udelay.c') diff --git a/udelay.c b/udelay.c index f332bb0..bfbdf00 100644 --- a/udelay.c +++ b/udelay.c @@ -1,4 +1,4 @@ -/* $Id: udelay.c,v 1.16 2004/04/12 05:14:42 reinelt Exp $ +/* $Id: udelay.c,v 1.17 2004/06/20 10:09:56 reinelt Exp $ * * short delays * @@ -22,6 +22,10 @@ * * * $Log: udelay.c,v $ + * Revision 1.17 2004/06/20 10:09:56 reinelt + * + * 'const'ified the whole source + * * Revision 1.16 2004/04/12 05:14:42 reinelt * another BIG FAT WARNING on the use of raw ports instead of ppdev * @@ -146,7 +150,7 @@ unsigned long loops_per_usec; -void ndelay (unsigned long nsec) +void ndelay (const unsigned long nsec) { unsigned long loop=(nsec*loops_per_usec+999)/1000; @@ -265,7 +269,7 @@ void udelay_init (void) } -void ndelay (unsigned long nsec) +void ndelay (const unsigned long nsec) { #ifdef HAVE_ASM_MSR_H @@ -273,14 +277,15 @@ void ndelay (unsigned long nsec) if (ticks_per_usec) { unsigned int t1, t2; - - nsec=(nsec*ticks_per_usec+999)/1000; + unsigned long tsc; + + tsc=(nsec*ticks_per_usec+999)/1000; rdtscl(t1); do { rep_nop(); rdtscl(t2); - } while ((t2-t1)