OSDN Git Service

staging: dgnc: delete dgnc_utils.c
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 Jan 2018 16:50:16 +0000 (17:50 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 15 Jan 2018 15:07:08 +0000 (16:07 +0100)
There was just one function in it, and it duplicated what
msleep_interruptable() was doing, which is pointless, so delete it and
fix up the one calling site.

Cc: Lidza Louina <lidza.louina@gmail.com>
Cc: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/dgnc/Makefile
drivers/staging/dgnc/dgnc_tty.c
drivers/staging/dgnc/dgnc_utils.c [deleted file]
drivers/staging/dgnc/dgnc_utils.h [deleted file]

index 40ff0d0..6db5847 100644 (file)
@@ -2,4 +2,4 @@ obj-$(CONFIG_DGNC) += dgnc.o
 
 dgnc-objs :=   dgnc_cls.o dgnc_driver.o\
                dgnc_mgmt.o dgnc_neo.o\
-               dgnc_tty.o dgnc_utils.o
+               dgnc_tty.o
index d2809f6..1323d7f 100644 (file)
@@ -26,7 +26,6 @@
 #include "dgnc_tty.h"
 #include "dgnc_neo.h"
 #include "dgnc_cls.h"
-#include "dgnc_utils.h"
 
 /* Default transparent print information. */
 
@@ -1229,7 +1228,7 @@ static void dgnc_tty_close(struct tty_struct *tty, struct file *file)
                        if (ch->ch_close_delay) {
                                spin_unlock_irqrestore(&ch->ch_lock,
                                                       flags);
-                               dgnc_ms_sleep(ch->ch_close_delay);
+                               msleep_interruptible(ch->ch_close_delay);
                                spin_lock_irqsave(&ch->ch_lock, flags);
                        }
                }
diff --git a/drivers/staging/dgnc/dgnc_utils.c b/drivers/staging/dgnc/dgnc_utils.c
deleted file mode 100644 (file)
index 620f574..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-#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);
-}
diff --git a/drivers/staging/dgnc/dgnc_utils.h b/drivers/staging/dgnc/dgnc_utils.h
deleted file mode 100644 (file)
index b30527f..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-#ifndef _DGNC_UTILS_H
-#define _DGNC_UTILS_H
-
-int dgnc_ms_sleep(ulong ms);
-
-#endif /* _DGNC_UTILS_H */