]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - drivers/staging/dgnc/dgnc_utils.c
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[mirror_ubuntu-bionic-kernel.git] / drivers / staging / dgnc / dgnc_utils.c
CommitLineData
b2441318 1// SPDX-License-Identifier: GPL-2.0
9a633d00 2#include <linux/tty.h>
174cd4b1 3#include <linux/sched/signal.h>
9a633d00 4#include "dgnc_utils.h"
9a633d00 5
51061652
TH
6/**
7 * dgnc_ms_sleep - Put the driver to sleep
8 * @ms - milliseconds to sleep
9a633d00 9 *
51061652 10 * Return: 0 if timed out, if interrupted by a signal return signal.
9a633d00
KZ
11 */
12int dgnc_ms_sleep(ulong ms)
13{
2be90fef 14 __set_current_state(TASK_INTERRUPTIBLE);
9a633d00
KZ
15 schedule_timeout((ms * HZ) / 1000);
16 return signal_pending(current);
17}