summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornorly <ny-git@enpas.org>2022-04-27 00:33:15 +0200
committernorly <ny-git@enpas.org>2022-04-28 02:23:34 +0200
commit7733766253b5d880a1a63ee7957449ad9e390c05 (patch)
treeea4c1dbb38df3d825697e96e3f6ae1ab74187fd1
parent3e68b297c23584d52a0d51b63516018cb90faf55 (diff)
Remove .hangup()
We were just calling .close(), which the TTY layer does for us anyway. And it does so with the correct locking.
-rw-r--r--module/elmcan.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/module/elmcan.c b/module/elmcan.c
index 75f1359..7bb2784 100644
--- a/module/elmcan.c
+++ b/module/elmcan.c
@@ -1113,18 +1113,6 @@ static void elmcan_ldisc_close(struct tty_struct *tty)
free_candev(elm->dev);
}
-#if LINUX_VERSION_CODE < KERNEL_VERSION(5,16,0)
-static int elmcan_ldisc_hangup(struct tty_struct *tty)
-#else
-static void elmcan_ldisc_hangup(struct tty_struct *tty)
-#endif
-{
- elmcan_ldisc_close(tty);
-#if LINUX_VERSION_CODE < KERNEL_VERSION(5,16,0)
- return 0;
-#endif
-}
-
static int elmcan_ldisc_ioctl(struct tty_struct *tty,
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,17,0)
struct file *file,
@@ -1161,7 +1149,6 @@ static struct tty_ldisc_ops elmcan_ldisc = {
.write_wakeup = elmcan_ldisc_tx_wakeup,
.open = elmcan_ldisc_open,
.close = elmcan_ldisc_close,
- .hangup = elmcan_ldisc_hangup,
.ioctl = elmcan_ldisc_ioctl,
};