![Tobin C. Harding](/assets/img/avatar_default.png)
TODO file lists task to remove unnecessary comments. Make initial attempt at removing unnecessary comments. Choose not to be to vicious in removal. We can remove more once the driver is cleaned up/tested some more. For functions with internal linkage, reduce the function comment where possible. For functions with external linkage, migrate the function comment to kernel doc format. Signed-off-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
17 lines
378 B
C
17 lines
378 B
C
#include <linux/tty.h>
|
|
#include <linux/sched/signal.h>
|
|
#include "dgnc_utils.h"
|
|
|
|
/**
|
|
* dgnc_ms_sleep - Put the driver to sleep
|
|
* @ms - milliseconds to sleep
|
|
*
|
|
* Return: 0 if timed out, if interrupted by a signal return signal.
|
|
*/
|
|
int dgnc_ms_sleep(ulong ms)
|
|
{
|
|
__set_current_state(TASK_INTERRUPTIBLE);
|
|
schedule_timeout((ms * HZ) / 1000);
|
|
return signal_pending(current);
|
|
}
|