aboutsummaryrefslogtreecommitdiffstats
path: root/arch/alpha
diff options
context:
space:
mode:
authorNishanth Aravamudan <nacc@us.ibm.com>2005-05-16 21:53:55 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-17 07:59:21 -0700
commit24d568ed1b97cb93c2a917cd90296655a8b661a6 (patch)
treef31d45cba83e1e5ab1f5d198735159c5b3da823b /arch/alpha
parent3407c0fec3456325826c31792e77a80a6dec0e20 (diff)
downloadkernel_goldelico_gta04-24d568ed1b97cb93c2a917cd90296655a8b661a6.zip
kernel_goldelico_gta04-24d568ed1b97cb93c2a917cd90296655a8b661a6.tar.gz
kernel_goldelico_gta04-24d568ed1b97cb93c2a917cd90296655a8b661a6.tar.bz2
[PATCH] alpha/osf_sys: use helper functions to convert between tv and jiffies
Use helper functions to convert between timeval structure and jiffies rather than custom logic. Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com> Signed-off-by: Domen Puncer <domen@coderock.org> Acked-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/alpha')
-rw-r--r--arch/alpha/kernel/osf_sys.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c
index 64e450d..167fd89f 100644
--- a/arch/alpha/kernel/osf_sys.c
+++ b/arch/alpha/kernel/osf_sys.c
@@ -1150,16 +1150,13 @@ osf_usleep_thread(struct timeval32 __user *sleep, struct timeval32 __user *remai
if (get_tv32(&tmp, sleep))
goto fault;
- ticks = tmp.tv_usec;
- ticks = (ticks + (1000000 / HZ) - 1) / (1000000 / HZ);
- ticks += tmp.tv_sec * HZ;
+ ticks = timeval_to_jiffies(&tmp);
current->state = TASK_INTERRUPTIBLE;
ticks = schedule_timeout(ticks);
if (remain) {
- tmp.tv_sec = ticks / HZ;
- tmp.tv_usec = ticks % HZ;
+ jiffies_to_timeval(ticks, &tmp);
if (put_tv32(remain, &tmp))
goto fault;
}