From 05eb48be91e6675c225b5f86c88ecbb83152119c Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Mon, 2 Apr 2012 13:53:49 +0200 Subject: TTY: isdn, remove callout I wonder how this survived there during the whole 2.6 series until now :D. Callouts are not used for a decade, so let us remove it also from isdn. This means removal of ISDN_ASYNC_CALLOUT_ACTIVE which is never raised in info->flags and callout_termios which are never used. This will help us to get rid of ISDN_ASYNC_* flags and use ASYNC ones from serial.h. And then we will switch to tty_port. Signed-off-by: Jiri Slaby Cc: Karsten Keil Signed-off-by: Greg Kroah-Hartman --- include/linux/isdn.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'include/linux/isdn.h') diff --git a/include/linux/isdn.h b/include/linux/isdn.h index 292f27a..d13b76d 100644 --- a/include/linux/isdn.h +++ b/include/linux/isdn.h @@ -393,7 +393,6 @@ typedef struct isdn_net_dev_s { #define ISDN_ASYNC_MAGIC 0x49344C01 /* for paranoia-checking */ #define ISDN_ASYNC_INITIALIZED 0x80000000 /* port was initialized */ -#define ISDN_ASYNC_CALLOUT_ACTIVE 0x40000000 /* Call out device active */ #define ISDN_ASYNC_NORMAL_ACTIVE 0x20000000 /* Normal device active */ #define ISDN_ASYNC_CLOSING 0x08000000 /* Serial port is closing */ #define ISDN_ASYNC_CTS_FLOW 0x04000000 /* Do CTS flow control */ @@ -498,8 +497,6 @@ typedef struct modem_info { #endif struct tty_struct *tty; /* Pointer to corresponding tty */ atemu emu; /* AT-emulator data */ - struct ktermios normal_termios; /* For saving termios structs */ - struct ktermios callout_termios; wait_queue_head_t open_wait, close_wait; spinlock_t readlock; } modem_info; -- cgit v1.1 From 6776a2f07924192fd168bdceb1a00d10630edb4d Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Mon, 2 Apr 2012 13:53:50 +0200 Subject: TTY: isdn, remove ISDN_ASYNC_* flags They are the same as TTY ones. So there is no need to redefine them. Remove ISDN_ASYNC_* and use only ASYNC_*. Except the MAGIC number, of course. While we are there, remove also the SERIAL_TYPE flags which are unused. Perhaps we should move the ASYNC flags from serial.h to tty.h given they are used by the tty layer and tty drivers, not only serial? Signed-off-by: Jiri Slaby Cc: Karsten Keil Signed-off-by: Greg Kroah-Hartman --- include/linux/isdn.h | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'include/linux/isdn.h') diff --git a/include/linux/isdn.h b/include/linux/isdn.h index d13b76d..1b4b4c1 100644 --- a/include/linux/isdn.h +++ b/include/linux/isdn.h @@ -392,20 +392,8 @@ typedef struct isdn_net_dev_s { /*======================= Start of ISDN-tty stuff ===========================*/ #define ISDN_ASYNC_MAGIC 0x49344C01 /* for paranoia-checking */ -#define ISDN_ASYNC_INITIALIZED 0x80000000 /* port was initialized */ -#define ISDN_ASYNC_NORMAL_ACTIVE 0x20000000 /* Normal device active */ -#define ISDN_ASYNC_CLOSING 0x08000000 /* Serial port is closing */ -#define ISDN_ASYNC_CTS_FLOW 0x04000000 /* Do CTS flow control */ -#define ISDN_ASYNC_CHECK_CD 0x02000000 /* i.e., CLOCAL */ -#define ISDN_ASYNC_HUP_NOTIFY 0x0001 /* Notify tty on hangups/closes */ -#define ISDN_ASYNC_SESSION_LOCKOUT 0x0100 /* Lock cua opens on session */ -#define ISDN_ASYNC_PGRP_LOCKOUT 0x0200 /* Lock cua opens on pgrp */ -#define ISDN_ASYNC_CALLOUT_NOHUP 0x0400 /* No hangup for cui */ -#define ISDN_ASYNC_SPLIT_TERMIOS 0x0008 /* Sep. termios for dialin/out */ #define ISDN_SERIAL_XMIT_SIZE 1024 /* Default bufsize for write */ #define ISDN_SERIAL_XMIT_MAX 4000 /* Maximum bufsize for write */ -#define ISDN_SERIAL_TYPE_NORMAL 1 -#define ISDN_SERIAL_TYPE_CALLOUT 2 #ifdef CONFIG_ISDN_AUDIO /* For using sk_buffs with audio we need some private variables -- cgit v1.1 From ce93d33cf45db9893cfc725a2b470da15bfe4435 Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Mon, 2 Apr 2012 13:53:51 +0200 Subject: TTY: isdn, do not play with module refcounts The module which called allocate_tty_driver is already refcounted by the TTY layer automatically. And since THIS_MODULE is isdn_tty and it allocated the tty_driver, there is no need to do the counts in isdn's tty->ops->open/close. Signed-off-by: Jiri Slaby Cc: Karsten Keil Signed-off-by: Greg Kroah-Hartman --- include/linux/isdn.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include/linux/isdn.h') diff --git a/include/linux/isdn.h b/include/linux/isdn.h index 1b4b4c1..66d9d71 100644 --- a/include/linux/isdn.h +++ b/include/linux/isdn.h @@ -435,7 +435,6 @@ typedef struct atemu { /* Private data (similar to async_struct in ) */ typedef struct modem_info { int magic; - struct module *owner; int flags; /* defined in tty.h */ int x_char; /* xon/xoff character */ int mcr; /* Modem control register */ -- cgit v1.1 From ed722ead61e3776cbcda3805bb872ff2b856d3b9 Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Mon, 2 Apr 2012 13:53:53 +0200 Subject: TTY: isdn, remove unused members from modem_info session and pgrp are unused. Prune them. Signed-off-by: Jiri Slaby Cc: Karsten Keil Signed-off-by: Greg Kroah-Hartman --- include/linux/isdn.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'include/linux/isdn.h') diff --git a/include/linux/isdn.h b/include/linux/isdn.h index 66d9d71..63af320 100644 --- a/include/linux/isdn.h +++ b/include/linux/isdn.h @@ -443,8 +443,6 @@ typedef struct modem_info { int line; int count; /* # of fd on device */ int blocked_open; /* # of blocked opens */ - long session; /* Session of opening process */ - long pgrp; /* pgrp of opening process */ int online; /* 1 = B-Channel is up, drop data */ /* 2 = B-Channel is up, deliver d.*/ int dialing; /* Dial in progress or ATA */ -- cgit v1.1 From 48decc1c743fa4eb5ba5dd3f556e7fcbefe65440 Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Mon, 2 Apr 2012 13:53:54 +0200 Subject: TTY: isdn, add tty_port And use tty_port->flags now. Other members will follow. Signed-off-by: Jiri Slaby Cc: Karsten Keil Signed-off-by: Greg Kroah-Hartman --- include/linux/isdn.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/linux/isdn.h') diff --git a/include/linux/isdn.h b/include/linux/isdn.h index 63af320..bb71041 100644 --- a/include/linux/isdn.h +++ b/include/linux/isdn.h @@ -15,6 +15,7 @@ #define __ISDN_H__ #include +#include #define ISDN_MAX_DRIVERS 32 #define ISDN_MAX_CHANNELS 64 @@ -435,7 +436,7 @@ typedef struct atemu { /* Private data (similar to async_struct in ) */ typedef struct modem_info { int magic; - int flags; /* defined in tty.h */ + struct tty_port port; int x_char; /* xon/xoff character */ int mcr; /* Modem control register */ int msr; /* Modem status register */ -- cgit v1.1 From c6e92b63d711c12ffb47f4dbb53902b7f26032e7 Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Mon, 2 Apr 2012 13:53:55 +0200 Subject: TTY: isdn, use open/close_wait from tty_port Hmm, the isdn ones were initialized twice. Signed-off-by: Jiri Slaby Cc: Karsten Keil Signed-off-by: Greg Kroah-Hartman --- include/linux/isdn.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include/linux/isdn.h') diff --git a/include/linux/isdn.h b/include/linux/isdn.h index bb71041..c3ddf20 100644 --- a/include/linux/isdn.h +++ b/include/linux/isdn.h @@ -483,7 +483,6 @@ typedef struct modem_info { #endif struct tty_struct *tty; /* Pointer to corresponding tty */ atemu emu; /* AT-emulator data */ - wait_queue_head_t open_wait, close_wait; spinlock_t readlock; } modem_info; -- cgit v1.1 From 1b05f030a90569d9617d0fe42910f9e5c8cc59ec Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Mon, 2 Apr 2012 13:53:56 +0200 Subject: TTY: isdn, use counts from tty_port blocked_open and count this time. Signed-off-by: Jiri Slaby Cc: Karsten Keil Signed-off-by: Greg Kroah-Hartman --- include/linux/isdn.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'include/linux/isdn.h') diff --git a/include/linux/isdn.h b/include/linux/isdn.h index c3ddf20..a4b71fe 100644 --- a/include/linux/isdn.h +++ b/include/linux/isdn.h @@ -442,8 +442,6 @@ typedef struct modem_info { int msr; /* Modem status register */ int lsr; /* Line status register */ int line; - int count; /* # of fd on device */ - int blocked_open; /* # of blocked opens */ int online; /* 1 = B-Channel is up, drop data */ /* 2 = B-Channel is up, deliver d.*/ int dialing; /* Dial in progress or ATA */ -- cgit v1.1 From ba43294d51ac6491e60c2fc33a974a9a1002dfed Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Mon, 2 Apr 2012 13:53:57 +0200 Subject: TTY: isdn, use tty from tty_port No recounting this time, just a plain switch. Signed-off-by: Jiri Slaby Cc: Karsten Keil Signed-off-by: Greg Kroah-Hartman --- include/linux/isdn.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include/linux/isdn.h') diff --git a/include/linux/isdn.h b/include/linux/isdn.h index a4b71fe..95883ac 100644 --- a/include/linux/isdn.h +++ b/include/linux/isdn.h @@ -479,7 +479,6 @@ typedef struct modem_info { struct T30_s *fax; /* T30 Fax Group 3 data/interface */ int faxonline; /* Fax-channel status */ #endif - struct tty_struct *tty; /* Pointer to corresponding tty */ atemu emu; /* AT-emulator data */ spinlock_t readlock; } modem_info; -- cgit v1.1 From 82e46b31908244678a6e7404c4204dd3f6fea9f0 Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Mon, 2 Apr 2012 13:53:58 +0200 Subject: TTY: isdn, use xmit_buf from tty_port Signed-off-by: Jiri Slaby Cc: Karsten Keil Signed-off-by: Greg Kroah-Hartman --- include/linux/isdn.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include/linux/isdn.h') diff --git a/include/linux/isdn.h b/include/linux/isdn.h index 95883ac..215c416 100644 --- a/include/linux/isdn.h +++ b/include/linux/isdn.h @@ -461,7 +461,6 @@ typedef struct modem_info { int send_outstanding;/* # of outstanding send-requests */ int xmit_size; /* max. # of chars in xmit_buf */ int xmit_count; /* # of chars in xmit_buf */ - unsigned char *xmit_buf; /* transmit buffer */ struct sk_buff_head xmit_queue; /* transmit queue */ atomic_t xmit_lock; /* Semaphore for isdn_tty_write */ #ifdef CONFIG_ISDN_AUDIO -- cgit v1.1