]> Pileus Git - ~andy/linux/blob - drivers/staging/csr/csr_framework_ext.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph...
[~andy/linux] / drivers / staging / csr / csr_framework_ext.c
1 /*****************************************************************************
2
3             (c) Cambridge Silicon Radio Limited 2010
4             All rights reserved and confidential information of CSR
5
6             Refer to LICENSE.txt included with this source for details
7             on the license terms.
8
9 *****************************************************************************/
10
11 #include <linux/kernel.h>
12 #include <linux/kthread.h>
13 #include <linux/module.h>
14 #include <linux/freezer.h>
15 #include <linux/semaphore.h>
16 #include <linux/slab.h>
17 #include <linux/bitops.h>
18
19 #include "csr_framework_ext.h"
20
21 /*----------------------------------------------------------------------------*
22  *  NAME
23  *      CsrThreadSleep
24  *
25  *  DESCRIPTION
26  *      Sleep for a given period.
27  *
28  *  RETURNS
29  *      void
30  *
31  *----------------------------------------------------------------------------*/
32 void CsrThreadSleep(u16 sleepTimeInMs)
33 {
34     unsigned long t;
35
36     /* Convert t in ms to jiffies and round up */
37     t = ((sleepTimeInMs * HZ) + 999) / 1000;
38     schedule_timeout_uninterruptible(t);
39 }
40 EXPORT_SYMBOL_GPL(CsrThreadSleep);