[PATCH 6/8] staging: dgcn: removes unnecessary commands in ioctl

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The commands TIOCGETP, TCGETS, and TCGETA are not supposed to be seen by the ioctl. This patch removes the switch cases for these commands.

Signed-off-by: Lidza Louina <lidza.louina@xxxxxxxxx>
---
 drivers/staging/dgnc/dgnc_tty.c | 34 ----------------------------------
 1 file changed, 34 deletions(-)

diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c
index c174bf8..9dbe7bd 100644
--- a/drivers/staging/dgnc/dgnc_tty.c
+++ b/drivers/staging/dgnc/dgnc_tty.c
@@ -3336,40 +3336,6 @@ static int dgnc_tty_ioctl(struct tty_struct *tty, struct file *file, unsigned in
 		/* pretend we didn't recognize this IOCTL */  
 		DGNC_UNLOCK(ch->ch_lock, lock_flags);
 		return(-ENOIOCTLCMD);
-
-#ifdef TIOCGETP
-	case TIOCGETP:
-#endif
-	case TCGETS:
-	case TCGETA:
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,30)
-		if (tty->ldisc->ops->ioctl) {
-#else
-		if (tty->ldisc.ops->ioctl) {
-#endif
-			int retval = (-ENXIO);
-
-			DGNC_UNLOCK(ch->ch_lock, lock_flags);
-
-			if (tty->termios) {
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,30)
-				retval = ((tty->ldisc->ops->ioctl) (tty, file, cmd, arg));
-#else
-				retval = ((tty->ldisc.ops->ioctl) (tty, file, cmd, arg));
-#endif
-			}
-
-			DPR_IOCTL(("dgnc_tty_ioctl (LINE:%d) finish on port %d - cmd %s (%x), arg %lx\n", 
-				__LINE__, ch->ch_portnum, dgnc_ioctl_name(cmd), cmd, arg));
-			return(retval);
-		}
-
-		DGNC_UNLOCK(ch->ch_lock, lock_flags);
-		DPR_IOCTL(("dgnc_tty_ioctl (LINE:%d) finish on port %d - cmd %s (%x), arg %lx\n", 
-			__LINE__, ch->ch_portnum, dgnc_ioctl_name(cmd), cmd, arg));
-
-		return(-ENOIOCTLCMD);
-
 	case TCSETSF:
 	case TCSETSW:
 		/*
-- 
1.8.1.2

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux