]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - kernel/hrtimer.c
ARM: OMAP: Turn on hrtimer sys_nanosleep again
[linux-2.6-omap-h63xx.git] / kernel / hrtimer.c
index 47a6bc7e7e6bbc2a5641aa7b50b16fbc103275c2..5ae51f1bc7c80347d091bd4da0df2e8840c0bae4 100644 (file)
@@ -727,6 +727,20 @@ long hrtimer_nanosleep(struct timespec *rqtp, struct timespec __user *rmtp,
        return -ERESTART_RESTARTBLOCK;
 }
 
+asmlinkage long
+sys_nanosleep(struct timespec __user *rqtp, struct timespec __user *rmtp)
+{
+       struct timespec tu;
+
+       if (copy_from_user(&tu, rqtp, sizeof(tu)))
+               return -EFAULT;
+
+       if (!timespec_valid(&tu))
+               return -EINVAL;
+
+       return hrtimer_nanosleep(&tu, rmtp, HRTIMER_REL, CLOCK_MONOTONIC);
+}
+
 /*
  * Functions related to boot-time initialization:
  */