linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/7] drivers: tty: Fix kernel-docs comments
@ 2018-10-18 22:37 Tobin C. Harding
  2018-10-18 22:37 ` [PATCH v2 1/7] tty: Fix whitespace before tab warnings Tobin C. Harding
                   ` (6 more replies)
  0 siblings, 7 replies; 9+ messages in thread
From: Tobin C. Harding @ 2018-10-18 22:37 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Jiri Slaby
  Cc: Tobin C. Harding, Geert Uytterhoeven, linux-kernel

Hi,

v2 with the author amended to use the correct _new_ email address
(thanks Geert and Greg) so that the SoB is correct.

Applies on top of tty-next tree.

From v1:

My first patch set using kernel.org email address.  I've been so careful
with this one I'm expecting some epic fail :)

This set is an attempt to clean up the kernel docs comments under
drivers/tty/.  I do not know what time in the kernel dev cycle would be
best for this set.  If now is not the time please do not hesitate to say
so and stop reading here.

I included a couple of whitespace patches to kick off with, in hindsight
these might be nothing more than code churn (if so I can remove them).

I had a real hard time breaking these changes up into separate patches.
This was mainly because I was super conscious that this set is
borderline trivial yet large enough to be a P in the A to review.  I
have reviewed these patches a bunch of times myself and am happy with
the result being as easy to review as I know how.  If there was anything
more I could have done please say.  Patch 3 and 7 are the two that are
most arduous to review.

Apart from the first two whitespace patches only comments are touched by
this set.  The set builds cleanly but does _not_ checkpatch cleanly -
there is a limit to the code churn I was willing to risk posting :)

Extra thanks to anyone who reviews this.  This set is super non-critical
so please only review at your leisure.

thanks,
Tobin.


v2:
 - Check author of each patch, run when required:
    `git commit --amend --author="Tobin C. Harding <tobin@kernel.org>"
 - Fix introduced 'space before tab warnings' in patch 3 and 7.
 

Tobin C. Harding (7):
  tty: Fix whitespace before tab warnings
  tty: Remove trailing whitespace
  tty: Partially fix kernel-docs layout
  tty: Fix kernel-doc variable typos
  tty: Fix spacing between kernel-doc sections
  tty: Remove newline after function kernel-doc
  tty: Fix section format

 drivers/tty/amiserial.c                     |   62 +-
 drivers/tty/cyclades.c                      |    2 +-
 drivers/tty/ehv_bytechan.c                  |    2 +-
 drivers/tty/hvc/hvc_console.c               |    8 +-
 drivers/tty/hvc/hvc_iucv.c                  |   14 +-
 drivers/tty/hvc/hvc_xen.c                   |    2 +-
 drivers/tty/hvc/hvcs.c                      |    4 +-
 drivers/tty/ipwireless/tty.c                |    2 +-
 drivers/tty/isicom.c                        |    4 +-
 drivers/tty/mips_ejtag_fdc.c                |    4 +-
 drivers/tty/moxa.c                          |   38 +-
 drivers/tty/mxser.c                         |   14 +-
 drivers/tty/n_gsm.c                         |  754 +++++++-------
 drivers/tty/n_hdlc.c                        |  208 ++--
 drivers/tty/n_r3964.c                       |    6 +-
 drivers/tty/n_tracerouter.c                 |   18 +-
 drivers/tty/n_tracesink.c                   |   24 +-
 drivers/tty/n_tty.c                         |  688 ++++++-------
 drivers/tty/pty.c                           |  126 ++-
 drivers/tty/rocket.c                        |   78 +-
 drivers/tty/serdev/core.c                   |    2 +-
 drivers/tty/serial/21285.c                  |    2 +-
 drivers/tty/serial/8250/8250_core.c         |   72 +-
 drivers/tty/serial/8250/8250_dw.c           |    4 +-
 drivers/tty/serial/8250/8250_port.c         |   42 +-
 drivers/tty/serial/amba-pl010.c             |    2 +-
 drivers/tty/serial/amba-pl011.c             |   34 +-
 drivers/tty/serial/cpm_uart/cpm_uart_core.c |    8 +-
 drivers/tty/serial/earlycon.c               |   26 +-
 drivers/tty/serial/icom.c                   |    5 +-
 drivers/tty/serial/ifx6x60.c                |  387 ++++---
 drivers/tty/serial/ioc3_serial.c            |   73 +-
 drivers/tty/serial/ioc4_serial.c            |   85 +-
 drivers/tty/serial/ip22zilog.c              |    2 +-
 drivers/tty/serial/jsm/jsm_neo.c            |    2 +-
 drivers/tty/serial/kgdb_nmi.c               |    2 +-
 drivers/tty/serial/max3100.c                |    2 +-
 drivers/tty/serial/max310x.c                |    2 +-
 drivers/tty/serial/men_z135_uart.c          |    5 +-
 drivers/tty/serial/mux.c                    |   62 +-
 drivers/tty/serial/mxs-auart.c              |    2 +-
 drivers/tty/serial/pmac_zilog.c             |   62 +-
 drivers/tty/serial/pxa.c                    |   20 +-
 drivers/tty/serial/sa1100.c                 |    2 +-
 drivers/tty/serial/serial-tegra.c           |    4 +-
 drivers/tty/serial/serial_core.c            |  198 ++--
 drivers/tty/serial/serial_txx9.c            |   23 +-
 drivers/tty/serial/sn_console.c             |  105 +-
 drivers/tty/serial/sunsab.c                 |   16 +-
 drivers/tty/serial/sunsu.c                  |    8 +-
 drivers/tty/serial/sunzilog.c               |   10 +-
 drivers/tty/serial/uartlite.c               |   15 +-
 drivers/tty/serial/ucc_uart.c               |  134 +--
 drivers/tty/serial/vr41xx_siu.c             |    2 +-
 drivers/tty/serial/xilinx_uartps.c          |   71 +-
 drivers/tty/serial/zs.c                     |   12 +-
 drivers/tty/synclink.c                      | 1016 +++++++++----------
 drivers/tty/synclinkmp.c                    |   16 +-
 drivers/tty/sysrq.c                         |   34 +-
 drivers/tty/tty_audit.c                     |   39 +-
 drivers/tty/tty_baudrate.c                  |   77 +-
 drivers/tty/tty_buffer.c                    |  245 +++--
 drivers/tty/tty_io.c                        |  847 ++++++++--------
 drivers/tty/tty_ioctl.c                     |  222 ++--
 drivers/tty/tty_jobctrl.c                   |  140 ++-
 drivers/tty/tty_ldisc.c                     |  290 +++---
 drivers/tty/tty_port.c                      |  124 ++-
 drivers/tty/vt/consolemap.c                 |   84 +-
 drivers/tty/vt/keyboard.c                   |  165 +--
 drivers/tty/vt/selection.c                  |   40 +-
 drivers/tty/vt/vt.c                         |  138 ++-
 drivers/tty/vt/vt_ioctl.c                   |   70 +-
 72 files changed, 3452 insertions(+), 3656 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v2 1/7] tty: Fix whitespace before tab warnings
  2018-10-18 22:37 [PATCH v2 0/7] drivers: tty: Fix kernel-docs comments Tobin C. Harding
@ 2018-10-18 22:37 ` Tobin C. Harding
  2018-11-09 16:42   ` Greg Kroah-Hartman
  2018-10-18 22:37 ` [PATCH v2 2/7] tty: Remove trailing whitespace Tobin C. Harding
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 9+ messages in thread
From: Tobin C. Harding @ 2018-10-18 22:37 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Jiri Slaby
  Cc: Tobin C. Harding, Geert Uytterhoeven, linux-kernel

This patch is whitespace only.

Checkpatch emits a BUNCH of warnings of type

	WARNING: please, no spaces at the start of a line
	WARNING: please, no space before tabs

While these may seem trivial they hinder further cleanup efforts because
there are so many that later cleanup touches many of the same lines,
this makes the cleanup patches super noisy when parsed with
checkpatch (although checkpatching this series is prohibitively noisy
even with this patch).

In preparation for doing kernel-docs cleanup fix all the whitespace
before tab and whitespace at start of line warnings.  We do not fix any
that are obviously there for extra-ordinary formatting reasons.

Any line in the diff with obvious other formatting errors is fixed also
excluding kernel-docs lines.

Signed-off-by: Tobin C. Harding <tobin@kernel.org>
---

Actually, checkpatch is only noisy on a couple of patches from this
set.  I ran checkpatch individually (instead of on the whole set) on
each patch and fixed things within scope of this set while working on
version 2 of the set.

 drivers/tty/amiserial.c                     |  43 ++++---
 drivers/tty/hvc/hvc_console.c               |   2 +-
 drivers/tty/ipwireless/tty.c                |   2 +-
 drivers/tty/isicom.c                        |   4 +-
 drivers/tty/moxa.c                          |  30 +++--
 drivers/tty/mxser.c                         |  10 +-
 drivers/tty/n_hdlc.c                        |  10 +-
 drivers/tty/rocket.c                        |   8 +-
 drivers/tty/serdev/core.c                   |   2 +-
 drivers/tty/serial/8250/8250_dw.c           |   4 +-
 drivers/tty/serial/amba-pl011.c             |   8 +-
 drivers/tty/serial/cpm_uart/cpm_uart_core.c |   8 +-
 drivers/tty/serial/icom.c                   |   5 +-
 drivers/tty/serial/ip22zilog.c              |   2 +-
 drivers/tty/serial/jsm/jsm_neo.c            |   2 +-
 drivers/tty/serial/mux.c                    |   6 +-
 drivers/tty/serial/mxs-auart.c              |   2 +-
 drivers/tty/serial/pmac_zilog.c             |   4 +-
 drivers/tty/serial/pxa.c                    |  20 +--
 drivers/tty/serial/serial_txx9.c            |   2 +-
 drivers/tty/serial/sn_console.c             |  38 +++---
 drivers/tty/serial/sunsab.c                 |   2 +-
 drivers/tty/serial/sunsu.c                  |   4 +-
 drivers/tty/serial/sunzilog.c               |   2 +-
 drivers/tty/serial/ucc_uart.c               | 134 ++++++++++----------
 drivers/tty/serial/vr41xx_siu.c             |   2 +-
 drivers/tty/serial/zs.c                     |  12 +-
 drivers/tty/sysrq.c                         |  34 ++---
 drivers/tty/tty_baudrate.c                  |   2 +-
 drivers/tty/tty_io.c                        |  22 ++--
 drivers/tty/tty_ioctl.c                     |   2 +-
 drivers/tty/tty_jobctrl.c                   |   8 +-
 drivers/tty/vt/consolemap.c                 |   6 +-
 drivers/tty/vt/keyboard.c                   |  29 +++--
 drivers/tty/vt/selection.c                  |  12 +-
 drivers/tty/vt/vt.c                         |  40 +++---
 drivers/tty/vt/vt_ioctl.c                   |  14 +-
 37 files changed, 271 insertions(+), 266 deletions(-)

diff --git a/drivers/tty/amiserial.c b/drivers/tty/amiserial.c
index 34dead614149..73d4033cef6b 100644
--- a/drivers/tty/amiserial.c
+++ b/drivers/tty/amiserial.c
@@ -18,7 +18,7 @@
  *
  *  Copyright (C) 1991, 1992  Linus Torvalds
  *  Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 
- * 		1998, 1999  Theodore Ts'o
+ *		1998, 1999  Theodore Ts'o
  *
  */
 
@@ -26,8 +26,8 @@
  * Serial driver configuration section.  Here are the various options:
  *
  * SERIAL_PARANOIA_CHECK
- * 		Check the magic number for the async_structure where
- * 		ever possible.
+ *		Check the magic number for the async_structure where
+ *		ever possible.
  */
 
 #include <linux/delay.h>
@@ -104,8 +104,8 @@ struct serial_state {
 	int			ignore_status_mask;
 	int			timeout;
 	int			quot;
-	int			IER; 	/* Interrupt Enable Register */
-	int			MCR; 	/* Modem control register */
+	int			IER;	/* Interrupt Enable Register */
+	int			MCR;	/* Modem control register */
 	int			x_char;	/* xon/xoff character */
 };
 
@@ -173,7 +173,8 @@ static inline int serial_paranoia_check(struct serial_state *info,
 
 static __inline__ void rtsdtr_ctrl(int bits)
 {
-    ciab.pra = ((bits & (SER_RTS | SER_DTR)) ^ (SER_RTS | SER_DTR)) | (ciab.pra & ~(SER_RTS | SER_DTR));
+	ciab.pra = ((bits & (SER_RTS | SER_DTR)) ^ (SER_RTS | SER_DTR)) |
+		   (ciab.pra & ~(SER_RTS | SER_DTR));
 }
 
 /*
@@ -243,13 +244,13 @@ static void rs_start(struct tty_struct *tty)
  *
  * and look at the resulting assemble code in serial.s.
  *
- * 				- Ted Ts'o (tytso@mit.edu), 7-Mar-93
+ *				- Ted Ts'o (tytso@mit.edu), 7-Mar-93
  * -----------------------------------------------------------------------
  */
 
 static void receive_chars(struct serial_state *info)
 {
-        int status;
+	int status;
 	int serdatr;
 	unsigned char ch, flag;
 	struct	async_icount *icount;
@@ -912,7 +913,7 @@ static void rs_flush_buffer(struct tty_struct *tty)
 static void rs_send_xchar(struct tty_struct *tty, char ch)
 {
 	struct serial_state *info = tty->driver_data;
-        unsigned long flags;
+	unsigned long flags;
 
 	if (serial_paranoia_check(info, tty->name, "rs_send_xchar"))
 		return;
@@ -921,8 +922,8 @@ static void rs_send_xchar(struct tty_struct *tty, char ch)
 	if (ch) {
 		/* Make sure transmit interrupts are on */
 
-	        /* Check this ! */
-	        local_irq_save(flags);
+		/* Check this ! */
+		local_irq_save(flags);
 		if(!(custom.intenar & IF_TBE)) {
 		    custom.intena = IF_SETCLR | IF_TBE;
 		    mb();
@@ -1000,7 +1001,7 @@ static int get_serial_info(struct tty_struct *tty, struct serial_state *state,
 			   struct serial_struct __user * retinfo)
 {
 	struct serial_struct tmp;
-   
+
 	memset(&tmp, 0, sizeof(tmp));
 	tty_lock(tty);
 	tmp.line = tty->index;
@@ -1023,7 +1024,7 @@ static int set_serial_info(struct tty_struct *tty, struct serial_state *state,
 	struct tty_port *port = &state->tport;
 	struct serial_struct new_serial;
 	bool change_spd;
-	int 			retval = 0;
+	int			retval = 0;
 
 	if (copy_from_user(&new_serial,new_info,sizeof(new_serial)))
 		return -EFAULT;
@@ -1036,7 +1037,7 @@ static int set_serial_info(struct tty_struct *tty, struct serial_state *state,
 		tty_unlock(tty);
 		return -EINVAL;
 	}
-  
+
 	if (!serial_isroot()) {
 		if ((new_serial.baud_base != state->baud_base) ||
 		    (new_serial.close_delay != port->close_delay) ||
@@ -1089,11 +1090,11 @@ static int set_serial_info(struct tty_struct *tty, struct serial_state *state,
  * get_lsr_info - get line status register info
  *
  * Purpose: Let user call ioctl() to get info when the UART physically
- * 	    is emptied.  On bus types like RS485, the transmitter must
- * 	    release the bus after transmitting. This must be done when
- * 	    the transmit shift register is empty, not be done when the
- * 	    transmit holding register is empty.  This functionality
- * 	    allows an RS485 driver to be written in user space. 
+ *	    is emptied.  On bus types like RS485, the transmitter must
+ *	    release the bus after transmitting. This must be done when
+ *	    the transmit shift register is empty, not be done when the
+ *	    transmit holding register is empty.  This functionality
+ *	    allows an RS485 driver to be written in user space.
  */
 static int get_lsr_info(struct serial_state *info, unsigned int __user *value)
 {
@@ -1251,7 +1252,7 @@ static int rs_ioctl(struct tty_struct *tty,
 		/*
 		 * Wait for any of the 4 modem inputs (DCD,RI,DSR,CTS) to change
 		 * - mask passed in arg for lines of interest
- 		 *   (use |'ed TIOCM_RNG/DSR/CD/CTS for masking)
+		 *   (use |'ed TIOCM_RNG/DSR/CD/CTS for masking)
 		 * Caller should use TIOCGICOUNT to see which one it was
 		 */
 		case TIOCMIWAIT:
@@ -1581,7 +1582,7 @@ static int rs_proc_show(struct seq_file *m, void *v)
  */
 static void show_serial_version(void)
 {
- 	printk(KERN_INFO "%s version %s\n", serial_name, serial_version);
+	printk(KERN_INFO "%s version %s\n", serial_name, serial_version);
 }
 
 
diff --git a/drivers/tty/hvc/hvc_console.c b/drivers/tty/hvc/hvc_console.c
index 27284a2dcd2b..676cf5b73ed2 100644
--- a/drivers/tty/hvc/hvc_console.c
+++ b/drivers/tty/hvc/hvc_console.c
@@ -268,7 +268,7 @@ static void hvc_check_console(int index)
 	if (hvc_console.flags & CON_ENABLED)
 		return;
 
- 	/* If this index is what the user requested, then register
+	/* If this index is what the user requested, then register
 	 * now (setup won't fail at this point).  It's ok to just
 	 * call register again if previously .setup failed.
 	 */
diff --git a/drivers/tty/ipwireless/tty.c b/drivers/tty/ipwireless/tty.c
index 1ef751c27ac6..20779f7e6e32 100644
--- a/drivers/tty/ipwireless/tty.c
+++ b/drivers/tty/ipwireless/tty.c
@@ -35,7 +35,7 @@
 #include "hardware.h"
 #include "main.h"
 
-#define IPWIRELESS_PCMCIA_START 	(0)
+#define IPWIRELESS_PCMCIA_START	(0)
 #define IPWIRELESS_PCMCIA_MINORS	(24)
 #define IPWIRELESS_PCMCIA_MINOR_RANGE	(8)
 
diff --git a/drivers/tty/isicom.c b/drivers/tty/isicom.c
index 8d96e86966f1..b45eb8b20606 100644
--- a/drivers/tty/isicom.c
+++ b/drivers/tty/isicom.c
@@ -86,7 +86,7 @@
  *	10/12/03  Ravindra		Made to work for Fedora Core 1 of
  *					Red Hat Distribution
  *
- *	06/01/05  Alan Cox 		Merged the ISI and base kernel strands
+ *	06/01/05  Alan Cox		Merged the ISI and base kernel strands
  *					into a single 2.6 driver
  *
  *	***********************************************************
@@ -1665,7 +1665,7 @@ static int __init isicom_init(void)
 		goto error;
 	}
 
-	isicom_normal->name 			= "ttyM";
+	isicom_normal->name			= "ttyM";
 	isicom_normal->major			= ISICOM_NMAJOR;
 	isicom_normal->minor_start		= 0;
 	isicom_normal->type			= TTY_DRIVER_TYPE_SERIAL;
diff --git a/drivers/tty/moxa.c b/drivers/tty/moxa.c
index 250a19f042d7..7ce06f43b6ae 100644
--- a/drivers/tty/moxa.c
+++ b/drivers/tty/moxa.c
@@ -148,7 +148,7 @@ struct mon_str {
 
 /* statusflags */
 #define TXSTOPPED	1
-#define LOWWAIT 	2
+#define LOWWAIT	2
 #define EMPTYWAIT	3
 
 
@@ -244,8 +244,9 @@ static void moxa_wait_finish(void __iomem *ofsAddr)
 
 static void moxafunc(void __iomem *ofsAddr, u16 cmd, u16 arg)
 {
-        unsigned long flags;
-        spin_lock_irqsave(&moxafunc_lock, flags);
+	unsigned long flags;
+
+	spin_lock_irqsave(&moxafunc_lock, flags);
 	writew(arg, ofsAddr + FuncArg);
 	writew(cmd, ofsAddr + FuncCode);
 	moxa_wait_finish(ofsAddr);
@@ -254,9 +255,10 @@ static void moxafunc(void __iomem *ofsAddr, u16 cmd, u16 arg)
 
 static int moxafuncret(void __iomem *ofsAddr, u16 cmd, u16 arg)
 {
-        unsigned long flags;
-        u16 ret;
-        spin_lock_irqsave(&moxafunc_lock, flags);
+	unsigned long flags;
+	u16 ret;
+
+	spin_lock_irqsave(&moxafunc_lock, flags);
 	writew(arg, ofsAddr + FuncArg);
 	writew(cmd, ofsAddr + FuncCode);
 	moxa_wait_finish(ofsAddr);
@@ -348,9 +350,9 @@ static int moxa_ioctl(struct tty_struct *tty,
 				memset(&tmp, 0, sizeof(tmp));
 				spin_lock_bh(&moxa_lock);
 				if (!moxa_boards[i].ready) {
-				        spin_unlock_bh(&moxa_lock);
+					spin_unlock_bh(&moxa_lock);
 					goto copy;
-                                }
+				}
 
 				status = MoxaPortLineStatus(p);
 				spin_unlock_bh(&moxa_lock);
@@ -1138,7 +1140,7 @@ module_exit(moxa_exit);
 static void moxa_shutdown(struct tty_port *port)
 {
 	struct moxa_port *ch = container_of(port, struct moxa_port, port);
-        MoxaPortDisable(ch);
+	MoxaPortDisable(ch);
 	MoxaPortFlushData(ch, 2);
 }
 
@@ -1260,7 +1262,7 @@ static int moxa_chars_in_buffer(struct tty_struct *tty)
 		 * Make it possible to wakeup anything waiting for output
 		 * in tty_ioctl.c, etc.
 		 */
-        	set_bit(EMPTYWAIT, &ch->statusflags);
+		set_bit(EMPTYWAIT, &ch->statusflags);
 	return chars;
 }
 
@@ -1361,8 +1363,8 @@ static void moxa_new_dcdstate(struct moxa_port *p, u8 dcd)
 
 	spin_lock_irqsave(&p->port.lock, flags);
 	if (dcd != p->DCDState) {
-        	p->DCDState = dcd;
-        	spin_unlock_irqrestore(&p->port.lock, flags);
+		p->DCDState = dcd;
+		spin_unlock_irqrestore(&p->port.lock, flags);
 		if (!dcd)
 			tty_port_tty_hangup(&p->port, true);
 	}
@@ -1496,7 +1498,7 @@ static void moxa_set_tty_param(struct tty_struct *tty, struct ktermios *old_term
 }
 
 /*****************************************************************************
- *	Driver level functions: 					     *
+ *	Driver level functions:					             *
  *****************************************************************************/
 
 static void MoxaPortFlushData(struct moxa_port *port, int mode)
@@ -2080,7 +2082,7 @@ static int moxa_set_serial_info(struct moxa_port *info,
 
 
 /*****************************************************************************
- *	Static local functions: 					     *
+ *	Static local functions:					             *
  *****************************************************************************/
 
 static void MoxaSetFifo(struct moxa_port *port, int enable)
diff --git a/drivers/tty/mxser.c b/drivers/tty/mxser.c
index 8bc15cb67a58..3f800b35689e 100644
--- a/drivers/tty/mxser.c
+++ b/drivers/tty/mxser.c
@@ -1429,11 +1429,11 @@ static void __init mxser_normal_mode(int port)
 	outb(0x00, port + 4);
 }
 
-#define CHIP_SK 	0x01	/* Serial Data Clock  in Eprom */
-#define CHIP_DO 	0x02	/* Serial Data Output in Eprom */
-#define CHIP_CS 	0x04	/* Serial Chip Select in Eprom */
-#define CHIP_DI 	0x08	/* Serial Data Input  in Eprom */
-#define EN_CCMD 	0x000	/* Chip's command register     */
+#define CHIP_SK	0x01	/* Serial Data Clock  in Eprom */
+#define CHIP_DO	0x02	/* Serial Data Output in Eprom */
+#define CHIP_CS	0x04	/* Serial Chip Select in Eprom */
+#define CHIP_DI	0x08	/* Serial Data Input  in Eprom */
+#define EN_CCMD	0x000	/* Chip's command register     */
 #define EN0_RSARLO	0x008	/* Remote start address reg 0  */
 #define EN0_RSARHI	0x009	/* Remote start address reg 1  */
 #define EN0_RCNTLO	0x00A	/* Remote byte count reg WR    */
diff --git a/drivers/tty/n_hdlc.c b/drivers/tty/n_hdlc.c
index dabb391909aa..1f2e24424b44 100644
--- a/drivers/tty/n_hdlc.c
+++ b/drivers/tty/n_hdlc.c
@@ -382,10 +382,10 @@ static void n_hdlc_send_frames(struct n_hdlc *n_hdlc, struct tty_struct *tty)
 		printk("%s(%d)n_hdlc_send_frames() called\n",__FILE__,__LINE__);
  check_again:
 		
- 	spin_lock_irqsave(&n_hdlc->tx_buf_list.spinlock, flags);
+	spin_lock_irqsave(&n_hdlc->tx_buf_list.spinlock, flags);
 	if (n_hdlc->tbusy) {
 		n_hdlc->woke_up = 1;
- 		spin_unlock_irqrestore(&n_hdlc->tx_buf_list.spinlock, flags);
+		spin_unlock_irqrestore(&n_hdlc->tx_buf_list.spinlock, flags);
 		return;
 	}
 	n_hdlc->tbusy = 1;
@@ -447,7 +447,7 @@ static void n_hdlc_send_frames(struct n_hdlc *n_hdlc, struct tty_struct *tty)
 	n_hdlc->tbusy = 0;
 	spin_unlock_irqrestore(&n_hdlc->tx_buf_list.spinlock, flags); 
 	
-        if (n_hdlc->woke_up)
+	if (n_hdlc->woke_up)
 	  goto check_again;
 
 	if (debuglevel >= DEBUG_LEVEL_INFO)	
@@ -554,7 +554,7 @@ static void n_hdlc_tty_receive(struct tty_struct *tty, const __u8 *data,
  * @file - pointer to open file object
  * @buf - pointer to returned data buffer
  * @nr - size of returned data buffer
- * 	
+ *
  * Returns the number of bytes returned or error code.
  */
 static ssize_t n_hdlc_tty_read(struct tty_struct *tty, struct file *file,
@@ -638,7 +638,7 @@ static ssize_t n_hdlc_tty_read(struct tty_struct *tty, struct file *file,
  * @file - pointer to file object data
  * @data - pointer to transmit data (one frame)
  * @count - size of transmit frame in bytes
- * 		
+ *
  * Returns the number of bytes written (or error code).
  */
 static ssize_t n_hdlc_tty_write(struct tty_struct *tty, struct file *file,
diff --git a/drivers/tty/rocket.c b/drivers/tty/rocket.c
index b121d8f8f3d7..c123fdb7eed8 100644
--- a/drivers/tty/rocket.c
+++ b/drivers/tty/rocket.c
@@ -1253,7 +1253,7 @@ static int reset_rm2(struct r_port *info, void __user *arg)
 		reset = 1;
 
 	if (rcktpt_type[info->board] != ROCKET_TYPE_MODEMII &&
-            rcktpt_type[info->board] != ROCKET_TYPE_MODEMIII)
+	    rcktpt_type[info->board] != ROCKET_TYPE_MODEMIII)
 		return -EINVAL;
 
 	if (info->ctlp->BusType == isISA)
@@ -1619,8 +1619,8 @@ static int rp_write(struct tty_struct *tty,
 		set_bit((info->aiop * 8) + info->chan, (void *) &xmit_flags[info->board]);
 	
 end:
- 	if (info->xmit_cnt < WAKEUP_CHARS) {
- 		tty_wakeup(tty);
+	if (info->xmit_cnt < WAKEUP_CHARS) {
+		tty_wakeup(tty);
 #ifdef ROCKETPORT_HAVE_POLL_WAIT
 		wake_up_interruptible(&tty->poll_wait);
 #endif
@@ -2257,7 +2257,7 @@ static int __init init_ISA(int i)
 		rcktpt_io_addr[i] = 0;
 		return (0);
 	}
-  
+
 	rocketModel[i].startingPortNumber = nextLineNumber;
 
 	for (aiop = 0; aiop < num_aiops; aiop++) {
diff --git a/drivers/tty/serdev/core.c b/drivers/tty/serdev/core.c
index 9db93f500b4e..bc4d2f9d3333 100644
--- a/drivers/tty/serdev/core.c
+++ b/drivers/tty/serdev/core.c
@@ -648,7 +648,7 @@ int __serdev_device_driver_register(struct serdev_device_driver *sdrv, struct mo
 	sdrv->driver.owner = owner;
 
 	/* force drivers to async probe so I/O is possible in probe */
-        sdrv->driver.probe_type = PROBE_PREFER_ASYNCHRONOUS;
+	sdrv->driver.probe_type = PROBE_PREFER_ASYNCHRONOUS;
 
 	return driver_register(&sdrv->driver);
 }
diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c
index d31b975dd3fd..85f3f03603fd 100644
--- a/drivers/tty/serial/8250/8250_dw.c
+++ b/drivers/tty/serial/8250/8250_dw.c
@@ -243,9 +243,9 @@ static void dw8250_serial_out32be(struct uart_port *p, int offset, int value)
 
 static unsigned int dw8250_serial_in32be(struct uart_port *p, int offset)
 {
-       unsigned int value = ioread32be(p->membase + (offset << p->regshift));
+	unsigned int value = ioread32be(p->membase + (offset << p->regshift));
 
-       return dw8250_modify_msr(p, offset, value);
+	return dw8250_modify_msr(p, offset, value);
 }
 
 
diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
index ebd33c0232e6..8a47ba2cfe54 100644
--- a/drivers/tty/serial/amba-pl011.c
+++ b/drivers/tty/serial/amba-pl011.c
@@ -1822,11 +1822,11 @@ static int sbsa_uart_startup(struct uart_port *port)
 static void pl011_shutdown_channel(struct uart_amba_port *uap,
 					unsigned int lcrh)
 {
-      unsigned long val;
+	unsigned long val;
 
-      val = pl011_read(uap, lcrh);
-      val &= ~(UART01x_LCRH_BRK | UART01x_LCRH_FEN);
-      pl011_write(val, uap, lcrh);
+	val = pl011_read(uap, lcrh);
+	val &= ~(UART01x_LCRH_BRK | UART01x_LCRH_FEN);
+	pl011_write(val, uap, lcrh);
 }
 
 /*
diff --git a/drivers/tty/serial/cpm_uart/cpm_uart_core.c b/drivers/tty/serial/cpm_uart/cpm_uart_core.c
index 79ad30d34949..d61605fc9f6b 100644
--- a/drivers/tty/serial/cpm_uart/cpm_uart_core.c
+++ b/drivers/tty/serial/cpm_uart/cpm_uart_core.c
@@ -481,8 +481,8 @@ static void cpm_uart_shutdown(struct uart_port *port)
 }
 
 static void cpm_uart_set_termios(struct uart_port *port,
-                                 struct ktermios *termios,
-                                 struct ktermios *old)
+				 struct ktermios *termios,
+				 struct ktermios *old)
 {
 	int baud;
 	unsigned long flags;
@@ -1138,7 +1138,7 @@ static const struct uart_ops cpm_uart_pops = {
 struct uart_cpm_port cpm_uart_ports[UART_NR];
 
 static int cpm_uart_init_port(struct device_node *np,
-                              struct uart_cpm_port *pinfo)
+			      struct uart_cpm_port *pinfo)
 {
 	const u32 *data;
 	void __iomem *mem, *pram;
@@ -1451,7 +1451,7 @@ static struct platform_driver cpm_uart_driver = {
 	},
 	.probe = cpm_uart_probe,
 	.remove = cpm_uart_remove,
- };
+};
 
 static int __init cpm_uart_init(void)
 {
diff --git a/drivers/tty/serial/icom.c b/drivers/tty/serial/icom.c
index ad374f7c476d..001621aec4a0 100644
--- a/drivers/tty/serial/icom.c
+++ b/drivers/tty/serial/icom.c
@@ -1505,8 +1505,9 @@ static int icom_probe(struct pci_dev *dev,
 	}
 
 	pci_write_config_dword(dev, PCI_COMMAND,
-		command_reg | PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER
- 		| PCI_COMMAND_PARITY | PCI_COMMAND_SERR);
+			       command_reg | PCI_COMMAND_MEMORY |
+			       PCI_COMMAND_MASTER | PCI_COMMAND_PARITY |
+			       PCI_COMMAND_SERR);
 
 	if (ent->driver_data == ADAPTER_V1) {
 		pci_write_config_dword(dev, 0x44, 0x8300830A);
diff --git a/drivers/tty/serial/ip22zilog.c b/drivers/tty/serial/ip22zilog.c
index 8c810733df3d..05c835e08256 100644
--- a/drivers/tty/serial/ip22zilog.c
+++ b/drivers/tty/serial/ip22zilog.c
@@ -1091,7 +1091,7 @@ static void __init ip22zilog_prepare(void)
 		spin_lock_init(&ip22zilog_port_table[channel].port.lock);
 
 	ip22zilog_irq_chain = &ip22zilog_port_table[NUM_CHANNELS - 1];
-        up = &ip22zilog_port_table[0];
+	up = &ip22zilog_port_table[0];
 	for (channel = NUM_CHANNELS - 1 ; channel > 0; channel--)
 		up[channel].next = &up[channel - 1];
 	up[channel].next = NULL;
diff --git a/drivers/tty/serial/jsm/jsm_neo.c b/drivers/tty/serial/jsm/jsm_neo.c
index bf0e2a4cb0ce..50f805b9a1b1 100644
--- a/drivers/tty/serial/jsm/jsm_neo.c
+++ b/drivers/tty/serial/jsm/jsm_neo.c
@@ -29,7 +29,7 @@ static u32 jsm_offset_table[8] = { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x8
  */
 static inline void neo_pci_posting_flush(struct jsm_board *bd)
 {
-      readb(bd->re_map_membase + 0x8D);
+	readb(bd->re_map_membase + 0x8D);
 }
 
 static void neo_set_cts_flow_control(struct jsm_channel *ch)
diff --git a/drivers/tty/serial/mux.c b/drivers/tty/serial/mux.c
index 00ce31e8d19a..880d1b3127c2 100644
--- a/drivers/tty/serial/mux.c
+++ b/drivers/tty/serial/mux.c
@@ -405,7 +405,7 @@ static void mux_console_write(struct console *co, const char *s, unsigned count)
 
 static int mux_console_setup(struct console *co, char *options)
 {
-        return 0;
+	return 0;
 }
 
 static struct console mux_console = {
@@ -457,7 +457,7 @@ static int __init mux_probe(struct parisc_device *dev)
 
 	dev_set_drvdata(&dev->dev, (void *)(long)port_count);
 	request_mem_region(dev->hpa.start + MUX_OFFSET,
-                           port_count * MUX_LINE_OFFSET, "Mux");
+			   port_count * MUX_LINE_OFFSET, "Mux");
 
 	if(!port_cnt) {
 		mux_driver.cons = MUX_CONSOLE;
@@ -576,7 +576,7 @@ static int __init mux_init(void)
 		mod_timer(&mux_timer, jiffies + MUX_POLL_DELAY);
 
 #ifdef CONFIG_SERIAL_MUX_CONSOLE
-	        register_console(&mux_console);
+		register_console(&mux_console);
 #endif
 	}
 
diff --git a/drivers/tty/serial/mxs-auart.c b/drivers/tty/serial/mxs-auart.c
index 27235a526cce..c5869064fd99 100644
--- a/drivers/tty/serial/mxs-auart.c
+++ b/drivers/tty/serial/mxs-auart.c
@@ -1329,7 +1329,7 @@ static const struct uart_ops mxs_auart_ops = {
 	.shutdown       = mxs_auart_shutdown,
 	.set_termios    = mxs_auart_settermios,
 	.set_ldisc      = mxs_auart_set_ldisc,
-	.type	   	= mxs_auart_type,
+	.type		= mxs_auart_type,
 	.release_port   = mxs_auart_release_port,
 	.request_port   = mxs_auart_request_port,
 	.config_port    = mxs_auart_config_port,
diff --git a/drivers/tty/serial/pmac_zilog.c b/drivers/tty/serial/pmac_zilog.c
index a9d40988e1c8..a5558051de74 100644
--- a/drivers/tty/serial/pmac_zilog.c
+++ b/drivers/tty/serial/pmac_zilog.c
@@ -1845,7 +1845,7 @@ MODULE_DEVICE_TABLE (of, pmz_match);
 
 static struct macio_driver pmz_driver = {
 	.driver = {
-		.name 		= "pmac_zilog",
+		.name		= "pmac_zilog",
 		.owner		= THIS_MODULE,
 		.of_match_table	= pmz_match,
 	},
@@ -1894,7 +1894,7 @@ static int __init init_pmz(void)
 	if (rc) {
 		printk(KERN_ERR 
 			"pmac_zilog: Error registering serial device, disabling pmac_zilog.\n"
-		 	"pmac_zilog: Did another serial driver already claim the minors?\n"); 
+			"pmac_zilog: Did another serial driver already claim the minors?\n");
 		/* effectively "pmz_unprobe()" */
 		for (i=0; i < pmz_ports_count; i++)
 			pmz_dispose_port(&pmz_ports[i]);
diff --git a/drivers/tty/serial/pxa.c b/drivers/tty/serial/pxa.c
index 4932b674f7ef..dd102571a751 100644
--- a/drivers/tty/serial/pxa.c
+++ b/drivers/tty/serial/pxa.c
@@ -795,22 +795,22 @@ static struct uart_driver serial_pxa_reg = {
 #ifdef CONFIG_PM
 static int serial_pxa_suspend(struct device *dev)
 {
-        struct uart_pxa_port *sport = dev_get_drvdata(dev);
+	struct uart_pxa_port *sport = dev_get_drvdata(dev);
 
-        if (sport)
-                uart_suspend_port(&serial_pxa_reg, &sport->port);
+	if (sport)
+		uart_suspend_port(&serial_pxa_reg, &sport->port);
 
-        return 0;
+	return 0;
 }
 
 static int serial_pxa_resume(struct device *dev)
 {
-        struct uart_pxa_port *sport = dev_get_drvdata(dev);
+	struct uart_pxa_port *sport = dev_get_drvdata(dev);
 
-        if (sport)
-                uart_resume_port(&serial_pxa_reg, &sport->port);
+	if (sport)
+		uart_resume_port(&serial_pxa_reg, &sport->port);
 
-        return 0;
+	return 0;
 }
 
 static const struct dev_pm_ops serial_pxa_pm_ops = {
@@ -914,10 +914,10 @@ static int serial_pxa_probe(struct platform_device *dev)
 }
 
 static struct platform_driver serial_pxa_driver = {
-        .probe          = serial_pxa_probe,
+	.probe          = serial_pxa_probe,
 
 	.driver		= {
-	        .name	= "pxa2xx-uart",
+		.name	= "pxa2xx-uart",
 #ifdef CONFIG_PM
 		.pm	= &serial_pxa_pm_ops,
 #endif
diff --git a/drivers/tty/serial/serial_txx9.c b/drivers/tty/serial/serial_txx9.c
index 1b4008d022bf..33c630d0f1b2 100644
--- a/drivers/tty/serial/serial_txx9.c
+++ b/drivers/tty/serial/serial_txx9.c
@@ -1259,7 +1259,7 @@ static int __init serial_txx9_init(void)
 {
 	int ret;
 
- 	printk(KERN_INFO "%s version %s\n", serial_name, serial_version);
+	printk(KERN_INFO "%s version %s\n", serial_name, serial_version);
 
 	ret = uart_register_driver(&serial_txx9_reg);
 	if (ret)
diff --git a/drivers/tty/serial/sn_console.c b/drivers/tty/serial/sn_console.c
index fe9170731c16..457a062fffd8 100644
--- a/drivers/tty/serial/sn_console.c
+++ b/drivers/tty/serial/sn_console.c
@@ -454,31 +454,31 @@ sn_receive_chars(struct sn_cons_port *port, unsigned long flags)
 			break;
 		}
 #ifdef CONFIG_MAGIC_SYSRQ
-                if (sysrq_requested) {
-                        unsigned long sysrq_timeout = sysrq_requested + HZ*5;
-
-                        sysrq_requested = 0;
-                        if (ch && time_before(jiffies, sysrq_timeout)) {
-                                spin_unlock_irqrestore(&port->sc_port.lock, flags);
-                                handle_sysrq(ch);
-                                spin_lock_irqsave(&port->sc_port.lock, flags);
-                                /* ignore actual sysrq command char */
-                                continue;
-                        }
-                }
-                if (ch == *sysrq_serial_ptr) {
-                        if (!(*++sysrq_serial_ptr)) {
-                                sysrq_requested = jiffies;
-                                sysrq_serial_ptr = sysrq_serial_str;
-                        }
+		if (sysrq_requested) {
+			unsigned long sysrq_timeout = sysrq_requested + HZ*5;
+
+			sysrq_requested = 0;
+			if (ch && time_before(jiffies, sysrq_timeout)) {
+				spin_unlock_irqrestore(&port->sc_port.lock, flags);
+				handle_sysrq(ch);
+				spin_lock_irqsave(&port->sc_port.lock, flags);
+				/* ignore actual sysrq command char */
+				continue;
+			}
+		}
+		if (ch == *sysrq_serial_ptr) {
+			if (!(*++sysrq_serial_ptr)) {
+				sysrq_requested = jiffies;
+				sysrq_serial_ptr = sysrq_serial_str;
+			}
 			/*
 			 * ignore the whole sysrq string except for the
 			 * leading escape
 			 */
 			if (ch != '\e')
 				continue;
-                }
-                else
+		}
+		else
 			sysrq_serial_ptr = sysrq_serial_str;
 #endif /* CONFIG_MAGIC_SYSRQ */
 
diff --git a/drivers/tty/serial/sunsab.c b/drivers/tty/serial/sunsab.c
index 72131b5e132e..7744ed852d52 100644
--- a/drivers/tty/serial/sunsab.c
+++ b/drivers/tty/serial/sunsab.c
@@ -654,7 +654,7 @@ static void calc_ebrg(int baud, int *n_ret, int *m_ret)
 		*m_ret = 0;
 		return;
 	}
-     
+
 	/*
 	 * We scale numbers by 10 so that we get better accuracy
 	 * without having to use floating point.  Here we increment m
diff --git a/drivers/tty/serial/sunsu.c b/drivers/tty/serial/sunsu.c
index 6cf3e9b0728f..1a371c37a644 100644
--- a/drivers/tty/serial/sunsu.c
+++ b/drivers/tty/serial/sunsu.c
@@ -74,7 +74,7 @@ static const struct serial_uart_config uart_config[] = {
 	{ "16450",	1,	0 },
 	{ "16550",	1,	0 },
 	{ "16550A",	16,	UART_CLEAR_FIFO | UART_USE_FIFO },
-	{ "Cirrus",	1, 	0 },
+	{ "Cirrus",	1,	0 },
 	{ "ST16650",	1,	UART_CLEAR_FIFO | UART_STARTECH },
 	{ "ST16650V2",	32,	UART_CLEAR_FIFO | UART_USE_FIFO | UART_STARTECH },
 	{ "TI16750",	64,	UART_CLEAR_FIFO | UART_USE_FIFO },
@@ -1138,7 +1138,7 @@ static void sunsu_autoconfig(struct uart_sunsu_port *up)
 			 * mode if the UART_FCR7_64BYTE bit was set
 			 * while UART_LCR_DLAB was latched.
 			 */
- 			serial_outp(up, UART_FCR, UART_FCR_ENABLE_FIFO);
+			serial_outp(up, UART_FCR, UART_FCR_ENABLE_FIFO);
 			serial_outp(up, UART_LCR, 0);
 			serial_outp(up, UART_FCR,
 				    UART_FCR_ENABLE_FIFO | UART_FCR7_64BYTE);
diff --git a/drivers/tty/serial/sunzilog.c b/drivers/tty/serial/sunzilog.c
index bc7af8b08a72..cb0dbff46db0 100644
--- a/drivers/tty/serial/sunzilog.c
+++ b/drivers/tty/serial/sunzilog.c
@@ -394,7 +394,7 @@ sunzilog_receive_chars(struct uart_sunzilog_port *up,
 
 		if (up->port.ignore_status_mask == 0xff ||
 		    (r1 & up->port.ignore_status_mask) == 0) {
-		    	tty_insert_flip_char(port, ch, flag);
+			tty_insert_flip_char(port, ch, flag);
 		}
 		if (r1 & Rx_OVR)
 			tty_insert_flip_char(port, 0, TTY_OVERRUN);
diff --git a/drivers/tty/serial/ucc_uart.c b/drivers/tty/serial/ucc_uart.c
index 2b6376e6e5ad..11064dcd7826 100644
--- a/drivers/tty/serial/ucc_uart.c
+++ b/drivers/tty/serial/ucc_uart.c
@@ -39,7 +39,7 @@
  * but Soft-UART is a hack and we want to keep everything related to it in
  * this file.
  */
-#define UCC_SLOW_GUMR_H_SUART   	0x00004000      /* Soft-UART */
+#define UCC_SLOW_GUMR_H_SUART		0x00004000      /* Soft-UART */
 
 /*
  * soft_uart is 1 if we need to use Soft-UART mode
@@ -87,82 +87,82 @@ static int firmware_loaded;
 
 struct ucc_uart_pram {
 	struct ucc_slow_pram common;
-	u8 res1[8];     	/* reserved */
-	__be16 maxidl;  	/* Maximum idle chars */
-	__be16 idlc;    	/* temp idle counter */
-	__be16 brkcr;   	/* Break count register */
-	__be16 parec;   	/* receive parity error counter */
-	__be16 frmec;   	/* receive framing error counter */
-	__be16 nosec;   	/* receive noise counter */
-	__be16 brkec;   	/* receive break condition counter */
-	__be16 brkln;   	/* last received break length */
+	u8 res1[8];		/* reserved */
+	__be16 maxidl;		/* Maximum idle chars */
+	__be16 idlc;		/* temp idle counter */
+	__be16 brkcr;		/* Break count register */
+	__be16 parec;		/* receive parity error counter */
+	__be16 frmec;		/* receive framing error counter */
+	__be16 nosec;		/* receive noise counter */
+	__be16 brkec;		/* receive break condition counter */
+	__be16 brkln;		/* last received break length */
 	__be16 uaddr[2];	/* UART address character 1 & 2 */
-	__be16 rtemp;   	/* Temp storage */
-	__be16 toseq;   	/* Transmit out of sequence char */
+	__be16 rtemp;		/* Temp storage */
+	__be16 toseq;		/* Transmit out of sequence char */
 	__be16 cchars[8];       /* control characters 1-8 */
-	__be16 rccm;    	/* receive control character mask */
-	__be16 rccr;    	/* receive control character register */
-	__be16 rlbc;    	/* receive last break character */
-	__be16 res2;    	/* reserved */
-	__be32 res3;    	/* reserved, should be cleared */
+	__be16 rccm;		/* receive control character mask */
+	__be16 rccr;		/* receive control character register */
+	__be16 rlbc;		/* receive last break character */
+	__be16 res2;		/* reserved */
+	__be32 res3;		/* reserved, should be cleared */
 	u8 res4;		/* reserved, should be cleared */
-	u8 res5[3];     	/* reserved, should be cleared */
-	__be32 res6;    	/* reserved, should be cleared */
-	__be32 res7;    	/* reserved, should be cleared */
-	__be32 res8;    	/* reserved, should be cleared */
-	__be32 res9;    	/* reserved, should be cleared */
-	__be32 res10;   	/* reserved, should be cleared */
-	__be32 res11;   	/* reserved, should be cleared */
-	__be32 res12;   	/* reserved, should be cleared */
-	__be32 res13;   	/* reserved, should be cleared */
+	u8 res5[3];		/* reserved, should be cleared */
+	__be32 res6;		/* reserved, should be cleared */
+	__be32 res7;		/* reserved, should be cleared */
+	__be32 res8;		/* reserved, should be cleared */
+	__be32 res9;		/* reserved, should be cleared */
+	__be32 res10;		/* reserved, should be cleared */
+	__be32 res11;		/* reserved, should be cleared */
+	__be32 res12;		/* reserved, should be cleared */
+	__be32 res13;		/* reserved, should be cleared */
 /* The rest is for Soft-UART only */
-	__be16 supsmr;  	/* 0x90, Shadow UPSMR */
-	__be16 res92;   	/* 0x92, reserved, initialize to 0 */
+	__be16 supsmr;		/* 0x90, Shadow UPSMR */
+	__be16 res92;		/* 0x92, reserved, initialize to 0 */
 	__be32 rx_state;	/* 0x94, RX state, initialize to 0 */
-	__be32 rx_cnt;  	/* 0x98, RX count, initialize to 0 */
-	u8 rx_length;   	/* 0x9C, Char length, set to 1+CL+PEN+1+SL */
-	u8 rx_bitmark;  	/* 0x9D, reserved, initialize to 0 */
+	__be32 rx_cnt;		/* 0x98, RX count, initialize to 0 */
+	u8 rx_length;		/* 0x9C, Char length, set to 1+CL+PEN+1+SL */
+	u8 rx_bitmark;		/* 0x9D, reserved, initialize to 0 */
 	u8 rx_temp_dlst_qe;     /* 0x9E, reserved, initialize to 0 */
 	u8 res14[0xBC - 0x9F];  /* reserved */
 	__be32 dump_ptr;	/* 0xBC, Dump pointer */
 	__be32 rx_frame_rem;    /* 0xC0, reserved, initialize to 0 */
 	u8 rx_frame_rem_size;   /* 0xC4, reserved, initialize to 0 */
-	u8 tx_mode;     	/* 0xC5, mode, 0=AHDLC, 1=UART */
+	u8 tx_mode;		/* 0xC5, mode, 0=AHDLC, 1=UART */
 	__be16 tx_state;	/* 0xC6, TX state */
 	u8 res15[0xD0 - 0xC8];  /* reserved */
-	__be32 resD0;   	/* 0xD0, reserved, initialize to 0 */
-	u8 resD4;       	/* 0xD4, reserved, initialize to 0 */
-	__be16 resD5;   	/* 0xD5, reserved, initialize to 0 */
+	__be32 resD0;		/* 0xD0, reserved, initialize to 0 */
+	u8 resD4;		/* 0xD4, reserved, initialize to 0 */
+	__be16 resD5;		/* 0xD5, reserved, initialize to 0 */
 } __attribute__ ((packed));
 
 /* SUPSMR definitions, for Soft-UART only */
-#define UCC_UART_SUPSMR_SL      	0x8000
+#define UCC_UART_SUPSMR_SL		0x8000
 #define UCC_UART_SUPSMR_RPM_MASK	0x6000
-#define UCC_UART_SUPSMR_RPM_ODD 	0x0000
-#define UCC_UART_SUPSMR_RPM_LOW 	0x2000
+#define UCC_UART_SUPSMR_RPM_ODD	0x0000
+#define UCC_UART_SUPSMR_RPM_LOW	0x2000
 #define UCC_UART_SUPSMR_RPM_EVEN	0x4000
 #define UCC_UART_SUPSMR_RPM_HIGH	0x6000
-#define UCC_UART_SUPSMR_PEN     	0x1000
+#define UCC_UART_SUPSMR_PEN		0x1000
 #define UCC_UART_SUPSMR_TPM_MASK	0x0C00
-#define UCC_UART_SUPSMR_TPM_ODD 	0x0000
-#define UCC_UART_SUPSMR_TPM_LOW 	0x0400
+#define UCC_UART_SUPSMR_TPM_ODD	0x0000
+#define UCC_UART_SUPSMR_TPM_LOW	0x0400
 #define UCC_UART_SUPSMR_TPM_EVEN	0x0800
 #define UCC_UART_SUPSMR_TPM_HIGH	0x0C00
-#define UCC_UART_SUPSMR_FRZ     	0x0100
-#define UCC_UART_SUPSMR_UM_MASK 	0x00c0
+#define UCC_UART_SUPSMR_FRZ		0x0100
+#define UCC_UART_SUPSMR_UM_MASK	0x00c0
 #define UCC_UART_SUPSMR_UM_NORMAL       0x0000
 #define UCC_UART_SUPSMR_UM_MAN_MULTI    0x0040
 #define UCC_UART_SUPSMR_UM_AUTO_MULTI   0x00c0
-#define UCC_UART_SUPSMR_CL_MASK 	0x0030
-#define UCC_UART_SUPSMR_CL_8    	0x0030
-#define UCC_UART_SUPSMR_CL_7    	0x0020
-#define UCC_UART_SUPSMR_CL_6    	0x0010
-#define UCC_UART_SUPSMR_CL_5    	0x0000
+#define UCC_UART_SUPSMR_CL_MASK	0x0030
+#define UCC_UART_SUPSMR_CL_8		0x0030
+#define UCC_UART_SUPSMR_CL_7		0x0020
+#define UCC_UART_SUPSMR_CL_6		0x0010
+#define UCC_UART_SUPSMR_CL_5		0x0000
 
-#define UCC_UART_TX_STATE_AHDLC 	0x00
-#define UCC_UART_TX_STATE_UART  	0x01
-#define UCC_UART_TX_STATE_X1    	0x00
-#define UCC_UART_TX_STATE_X16   	0x80
+#define UCC_UART_TX_STATE_AHDLC	0x00
+#define UCC_UART_TX_STATE_UART		0x01
+#define UCC_UART_TX_STATE_X1		0x00
+#define UCC_UART_TX_STATE_X16		0x80
 
 #define UCC_UART_PRAM_ALIGNMENT 0x100
 
@@ -191,18 +191,18 @@ struct uart_qe_port {
 	struct qe_bd *tx_cur;
 	unsigned char *tx_buf;
 	unsigned char *rx_buf;
-	void *bd_virt;  	/* virtual address of the BD buffers */
+	void *bd_virt;		/* virtual address of the BD buffers */
 	dma_addr_t bd_dma_addr; /* bus address of the BD buffers */
 	unsigned int bd_size;   /* size of BD buffer space */
 };
 
 static struct uart_driver ucc_uart_driver = {
-	.owner  	= THIS_MODULE,
+	.owner		= THIS_MODULE,
 	.driver_name    = "ucc_uart",
 	.dev_name       = "ttyQE",
-	.major  	= SERIAL_QE_MAJOR,
-	.minor  	= SERIAL_QE_MINOR,
-	.nr     	= UCC_MAX_UART,
+	.major		= SERIAL_QE_MAJOR,
+	.minor		= SERIAL_QE_MINOR,
+	.nr		= UCC_MAX_UART,
 };
 
 /*
@@ -1094,7 +1094,7 @@ static const struct uart_ops qe_uart_pops = {
 	.startup	= qe_uart_startup,
 	.shutdown       = qe_uart_shutdown,
 	.set_termios    = qe_uart_set_termios,
-	.type   	= qe_uart_type,
+	.type		= qe_uart_type,
 	.release_port   = qe_uart_release_port,
 	.request_port   = qe_uart_request_port,
 	.config_port    = qe_uart_config_port,
@@ -1111,16 +1111,16 @@ static const struct uart_ops qe_uart_pops = {
  *
  * The new way is:
  *
- *      	cpu@0 {
- *      		compatible = "PowerPC,8323";
- *      		device_type = "cpu";
- *      		...
+ *		cpu@0 {
+ *			compatible = "PowerPC,8323";
+ *			device_type = "cpu";
+ *			...
  *
  *
  * The old way is:
- *      	 PowerPC,8323@0 {
- *      		device_type = "cpu";
- *      		...
+ *		 PowerPC,8323@0 {
+ *			device_type = "cpu";
+ *			...
  *
  * This code first checks the new way, and then the old way.
  */
@@ -1488,8 +1488,8 @@ static struct platform_driver ucc_uart_of_driver = {
 		.name = "ucc_uart",
 		.of_match_table    = ucc_uart_match,
 	},
-	.probe  	= ucc_uart_probe,
-	.remove 	= ucc_uart_remove,
+	.probe	= ucc_uart_probe,
+	.remove	= ucc_uart_remove,
 };
 
 static int __init ucc_uart_init(void)
diff --git a/drivers/tty/serial/vr41xx_siu.c b/drivers/tty/serial/vr41xx_siu.c
index 6d106e33f842..277301e9ef77 100644
--- a/drivers/tty/serial/vr41xx_siu.c
+++ b/drivers/tty/serial/vr41xx_siu.c
@@ -500,7 +500,7 @@ static void siu_shutdown(struct uart_port *port)
 }
 
 static void siu_set_termios(struct uart_port *port, struct ktermios *new,
-                            struct ktermios *old)
+			    struct ktermios *old)
 {
 	tcflag_t c_cflag, c_iflag;
 	uint8_t lcr, fcr, ier;
diff --git a/drivers/tty/serial/zs.c b/drivers/tty/serial/zs.c
index b03d3e458ea2..120da605d0df 100644
--- a/drivers/tty/serial/zs.c
+++ b/drivers/tty/serial/zs.c
@@ -98,7 +98,7 @@ static char zs_version[] __initdata = "0.10";
 #define ZS_CHAN_IO_STRIDE 4		/* Register alignment.  */
 #define ZS_CHAN_IO_OFFSET 1		/* The SCC resides on the high byte
 					   of the 16-bit IOBUS.  */
-#define ZS_CLOCK        7372800 	/* Z85C30 PCLK input clock rate.  */
+#define ZS_CLOCK        7372800	/* Z85C30 PCLK input clock rate.  */
 
 #define to_zport(uport) container_of(uport, struct zs_port, port)
 
@@ -299,11 +299,11 @@ static void load_zsregs(struct zs_port *zport, u8 *regs, int irq)
  * zs_tx_empty() -- get the transmitter empty status
  *
  * Purpose: Let user call ioctl() to get info when the UART physically
- * 	    is emptied.  On bus types like RS485, the transmitter must
- * 	    release the bus after transmitting.  This must be done when
- * 	    the transmit shift register is empty, not be done when the
- * 	    transmit holding register is empty.  This functionality
- * 	    allows an RS485 driver to be written in user space.
+ *	    is emptied.  On bus types like RS485, the transmitter must
+ *	    release the bus after transmitting.  This must be done when
+ *	    the transmit shift register is empty, not be done when the
+ *	    transmit holding register is empty.  This functionality
+ *	    allows an RS485 driver to be written in user space.
  */
 static unsigned int zs_tx_empty(struct uart_port *uport)
 {
diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c
index 06ed20dd01ba..c87cee67fc15 100644
--- a/drivers/tty/sysrq.c
+++ b/drivers/tty/sysrq.c
@@ -512,22 +512,22 @@ static int sysrq_key_table_key2index(int key)
  */
 struct sysrq_key_op *__sysrq_get_key_op(int key)
 {
-        struct sysrq_key_op *op_p = NULL;
-        int i;
+	struct sysrq_key_op *op_p = NULL;
+	int i;
 
 	i = sysrq_key_table_key2index(key);
 	if (i != -1)
-	        op_p = sysrq_key_table[i];
+		op_p = sysrq_key_table[i];
 
-        return op_p;
+	return op_p;
 }
 
 static void __sysrq_put_key_op(int key, struct sysrq_key_op *op_p)
 {
-        int i = sysrq_key_table_key2index(key);
+	int i = sysrq_key_table_key2index(key);
 
-        if (i != -1)
-                sysrq_key_table[i] = op_p;
+	if (i != -1)
+		sysrq_key_table[i] = op_p;
 }
 
 void __handle_sysrq(int key, bool check_mask)
@@ -548,8 +548,8 @@ void __handle_sysrq(int key, bool check_mask)
 	console_loglevel = CONSOLE_LOGLEVEL_DEFAULT;
 	pr_info("SysRq : ");
 
-        op_p = __sysrq_get_key_op(key);
-        if (op_p) {
+	op_p = __sysrq_get_key_op(key);
+	if (op_p) {
 		/*
 		 * Should we check for enabled operations (/proc/sysrq-trigger
 		 * should not) and is the invoked operation enabled?
@@ -595,13 +595,13 @@ static int sysrq_reset_downtime_ms;
 
 /* Simple translation table for the SysRq keys */
 static const unsigned char sysrq_xlate[KEY_CNT] =
-        "\000\0331234567890-=\177\t"                    /* 0x00 - 0x0f */
-        "qwertyuiop[]\r\000as"                          /* 0x10 - 0x1f */
-        "dfghjkl;'`\000\\zxcv"                          /* 0x20 - 0x2f */
-        "bnm,./\000*\000 \000\201\202\203\204\205"      /* 0x30 - 0x3f */
-        "\206\207\210\211\212\000\000789-456+1"         /* 0x40 - 0x4f */
-        "230\177\000\000\213\214\000\000\000\000\000\000\000\000\000\000" /* 0x50 - 0x5f */
-        "\r\000/";                                      /* 0x60 - 0x6f */
+	"\000\0331234567890-=\177\t"                    /* 0x00 - 0x0f */
+	"qwertyuiop[]\r\000as"                          /* 0x10 - 0x1f */
+	"dfghjkl;'`\000\\zxcv"                          /* 0x20 - 0x2f */
+	"bnm,./\000*\000 \000\201\202\203\204\205"      /* 0x30 - 0x3f */
+	"\206\207\210\211\212\000\000789-456+1"         /* 0x40 - 0x4f */
+	"230\177\000\000\213\214\000\000\000\000\000\000\000\000\000\000" /* 0x50 - 0x5f */
+	"\r\000/";                                      /* 0x60 - 0x6f */
 
 struct sysrq_state {
 	struct input_handle handle;
@@ -1055,7 +1055,7 @@ int sysrq_toggle_support(int enable_mask)
 }
 
 static int __sysrq_swap_key_ops(int key, struct sysrq_key_op *insert_op_p,
-                                struct sysrq_key_op *remove_op_p)
+				struct sysrq_key_op *remove_op_p)
 {
 	int retval;
 
diff --git a/drivers/tty/tty_baudrate.c b/drivers/tty/tty_baudrate.c
index 7576ceace571..ceee34760c62 100644
--- a/drivers/tty/tty_baudrate.c
+++ b/drivers/tty/tty_baudrate.c
@@ -150,7 +150,7 @@ void tty_termios_encode_baud_rate(struct ktermios *termios,
 	int iclose = ibaud/50, oclose = obaud/50;
 	int ibinput = 0;
 
-	if (obaud == 0)			/* CD dropped 		  */
+	if (obaud == 0)			/* CD dropped */
 		ibaud = 0;		/* Clear ibaud to be sure */
 
 	termios->c_ispeed = ibaud;
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index 252eef2c32f9..df94cdbe0096 100644
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
@@ -33,7 +33,7 @@
  *	-- Nick Holloway <alfie@dcs.warwick.ac.uk>, 27th May 1993.
  *
  * Rewrote canonical mode and added more termios flags.
- * 	-- julian@uhunix.uhcc.hawaii.edu (J. Cowley), 13Jan94
+ *	-- julian@uhunix.uhcc.hawaii.edu (J. Cowley), 13Jan94
  *
  * Reorganized FASYNC support so mouse code can share it.
  *	-- ctm@ardi.com, 9Sep95
@@ -1023,7 +1023,7 @@ static ssize_t tty_write(struct file *file, const char __user *buf,
 						size_t count, loff_t *ppos)
 {
 	struct tty_struct *tty = file_tty(file);
- 	struct tty_ldisc *ld;
+	struct tty_ldisc *ld;
 	ssize_t ret;
 
 	if (tty_paranoia_check(tty, file_inode(file), "tty_write"))
@@ -1244,8 +1244,8 @@ static void tty_driver_remove_tty(struct tty_driver *driver, struct tty_struct *
 }
 
 /*
- * 	tty_reopen()	- fast re-open of an open tty
- * 	@tty	- the tty to open
+ *	tty_reopen()	- fast re-open of an open tty
+ *	@tty	- the tty to open
  *
  *	Return 0 on success, -errno on error.
  *	Re-opens on master ptys are not allowed and return -EIO.
@@ -1811,8 +1811,8 @@ static struct tty_struct *tty_open_current_tty(dev_t device, struct file *filp)
  *	@index: index for the device in the @return driver
  *	@return: driver for this inode (with increased refcount)
  *
- * 	If @return is not erroneous, the caller is responsible to decrement the
- * 	refcount by tty_driver_kref_put.
+ *	If @return is not erroneous, the caller is responsible to decrement the
+ *	refcount by tty_driver_kref_put.
  *
  *	Locking: tty_mutex protects get_tty_driver
  */
@@ -2624,7 +2624,7 @@ long tty_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 	case TIOCGICOUNT:
 		retval = tty_tiocgicount(tty, p);
 		/* For the moment allow fall through to the old method */
-        	if (retval != -EINVAL)
+		if (retval != -EINVAL)
 			return retval;
 		break;
 	case TCFLSH:
@@ -3013,11 +3013,11 @@ struct device *tty_register_device_attr(struct tty_driver *driver,
 EXPORT_SYMBOL_GPL(tty_register_device_attr);
 
 /**
- * 	tty_unregister_device - unregister a tty device
- * 	@driver: the tty driver that describes the tty device
- * 	@index: the index in the tty driver for this tty device
+ *	tty_unregister_device - unregister a tty device
+ *	@driver: the tty driver that describes the tty device
+ *	@index: the index in the tty driver for this tty device
  *
- * 	If a tty device is registered with a call to tty_register_device() then
+ *	If a tty device is registered with a call to tty_register_device() then
  *	this function must be called when the tty device is gone.
  *
  *	Locking: ??
diff --git a/drivers/tty/tty_ioctl.c b/drivers/tty/tty_ioctl.c
index d99fec44036c..f9bcae2b7e36 100644
--- a/drivers/tty/tty_ioctl.c
+++ b/drivers/tty/tty_ioctl.c
@@ -72,7 +72,7 @@ EXPORT_SYMBOL(tty_chars_in_buffer);
  *	the number of bytes written. If no method is provided 2K is always
  *	returned and data may be lost as there will be no flow control.
  */
- 
+
 int tty_write_room(struct tty_struct *tty)
 {
 	if (tty->ops->write_room)
diff --git a/drivers/tty/tty_jobctrl.c b/drivers/tty/tty_jobctrl.c
index c4ecd66fafef..6155cc7b3f56 100644
--- a/drivers/tty/tty_jobctrl.c
+++ b/drivers/tty/tty_jobctrl.c
@@ -238,10 +238,10 @@ int tty_signal_session_leader(struct tty_struct *tty, int exit_session)
  *	it wants to disassociate itself from its controlling tty.
  *
  *	It performs the following functions:
- * 	(1)  Sends a SIGHUP and SIGCONT to the foreground process group
- * 	(2)  Clears the tty from being controlling the session
- * 	(3)  Clears the controlling tty for all processes in the
- * 		session group.
+ *	(1)  Sends a SIGHUP and SIGCONT to the foreground process group
+ *	(2)  Clears the tty from being controlling the session
+ *	(3)  Clears the controlling tty for all processes in the
+ *		session group.
  *
  *	The argument on_exit is set to 1 if called when a process is
  *	exiting; it is 0 if called by the ioctl TIOCNOTTY.
diff --git a/drivers/tty/vt/consolemap.c b/drivers/tty/vt/consolemap.c
index 7c7ada0b3ea0..97d02684b922 100644
--- a/drivers/tty/vt/consolemap.c
+++ b/drivers/tty/vt/consolemap.c
@@ -187,7 +187,7 @@ static unsigned short translations[][256] = {
 static int inv_translate[MAX_NR_CONSOLES];
 
 struct uni_pagedir {
-	u16 		**uni_pgdir[32];
+	u16		**uni_pgdir[32];
 	unsigned long	refcount;
 	unsigned long	sum;
 	unsigned char	*inverse_translations[4];
@@ -215,7 +215,7 @@ static void set_inverse_transl(struct vc_data *conp, struct uni_pagedir *p, int
 		glyph = conv_uni_to_pc(conp, t[j]);
 		if (glyph >= 0 && glyph < MAX_GLYPH && q[glyph] < 32) {
 			/* prefer '-' above SHY etc. */
-		  	q[glyph] = j;
+			q[glyph] = j;
 		}
 	}
 }
@@ -249,7 +249,7 @@ static void set_inverse_trans_unicode(struct vc_data *conp,
 				glyph = p2[k];
 				if (glyph >= 0 && glyph < MAX_GLYPH
 					       && q[glyph] < 32)
-		  			q[glyph] = (i << 11) + (j << 6) + k;
+					q[glyph] = (i << 11) + (j << 6) + k;
 			}
 		}
 	}
diff --git a/drivers/tty/vt/keyboard.c b/drivers/tty/vt/keyboard.c
index 88312c6c92cc..214ad559fd2d 100644
--- a/drivers/tty/vt/keyboard.c
+++ b/drivers/tty/vt/keyboard.c
@@ -1110,8 +1110,9 @@ static unsigned char getledstate(void)
 
 void setledstate(struct kbd_struct *kb, unsigned int led)
 {
-        unsigned long flags;
-        spin_lock_irqsave(&led_lock, flags);
+	unsigned long flags;
+
+	spin_lock_irqsave(&led_lock, flags);
 	if (!(led & ~7)) {
 		ledioctl = led;
 		kb->ledmode = LED_SHOW_IOCTL;
@@ -2047,7 +2048,7 @@ int vt_do_kdgkb_ioctl(int cmd, struct kbsentry __user *user_kdgkb, int perm)
 			fj = first_free;
 
 		delta = (q ? -strlen(q) : 1) + strlen(kbs->kb_string);
-		if (delta <= funcbufleft) { 	/* it fits in current buf */
+		if (delta <= funcbufleft) {	/* it fits in current buf */
 		    if (j < MAX_NR_FUNC) {
 			memmove(fj + delta, fj, first_free - fj);
 			for (k = j; k < MAX_NR_FUNC; k++)
@@ -2099,16 +2100,16 @@ int vt_do_kdgkb_ioctl(int cmd, struct kbsentry __user *user_kdgkb, int perm)
 int vt_do_kdskled(int console, int cmd, unsigned long arg, int perm)
 {
 	struct kbd_struct *kb = kbd_table + console;
-        unsigned long flags;
+	unsigned long flags;
 	unsigned char ucval;
 
-        switch(cmd) {
+	switch(cmd) {
 	/* the ioctls below read/set the flags usually shown in the leds */
 	/* don't use them - they will go away without warning */
 	case KDGKBLED:
-                spin_lock_irqsave(&kbd_event_lock, flags);
+		spin_lock_irqsave(&kbd_event_lock, flags);
 		ucval = kb->ledflagstate | (kb->default_ledflagstate << 4);
-                spin_unlock_irqrestore(&kbd_event_lock, flags);
+		spin_unlock_irqrestore(&kbd_event_lock, flags);
 		return put_user(ucval, (char __user *)arg);
 
 	case KDSKBLED:
@@ -2116,11 +2117,11 @@ int vt_do_kdskled(int console, int cmd, unsigned long arg, int perm)
 			return -EPERM;
 		if (arg & ~0x77)
 			return -EINVAL;
-                spin_lock_irqsave(&led_lock, flags);
+		spin_lock_irqsave(&led_lock, flags);
 		kb->ledflagstate = (arg & 7);
 		kb->default_ledflagstate = ((arg >> 4) & 7);
 		set_leds();
-                spin_unlock_irqrestore(&led_lock, flags);
+		spin_unlock_irqrestore(&led_lock, flags);
 		return 0;
 
 	/* the ioctls below only set the lights, not the functions */
@@ -2134,8 +2135,8 @@ int vt_do_kdskled(int console, int cmd, unsigned long arg, int perm)
 			return -EPERM;
 		setledstate(kb, arg);
 		return 0;
-        }
-        return -ENOIOCTLCMD;
+	}
+	return -ENOIOCTLCMD;
 }
 
 int vt_do_kdgkbmode(int console)
@@ -2165,7 +2166,7 @@ int vt_do_kdgkbmode(int console)
 int vt_do_kdgkbmeta(int console)
 {
 	struct kbd_struct *kb = kbd_table + console;
-        /* Again a spot read so no locking */
+	/* Again a spot read so no locking */
 	return vc_kbd_mode(kb, VC_META) ? K_ESCPREFIX : K_METABIT;
 }
 
@@ -2192,8 +2193,8 @@ void vt_reset_unicode(int console)
  */
 int vt_get_shift_state(void)
 {
-        /* Don't lock as this is a transient report */
-        return shift_state;
+	/* Don't lock as this is a transient report */
+	return shift_state;
 }
 
 /**
diff --git a/drivers/tty/vt/selection.c b/drivers/tty/vt/selection.c
index 07496c711d7d..75aa58ea79b6 100644
--- a/drivers/tty/vt/selection.c
+++ b/drivers/tty/vt/selection.c
@@ -37,7 +37,7 @@ extern void poke_blanked_console(void);
 /* Use a dynamic buffer, instead of static (Dec 1994) */
 struct vc_data *sel_cons;		/* must not be deallocated */
 static int use_unicode;
-static volatile int sel_start = -1; 	/* cleared by clear_selection */
+static volatile int sel_start = -1;	/* cleared by clear_selection */
 static int sel_end;
 static int sel_buffer_lth;
 static char *sel_buffer;
@@ -86,10 +86,10 @@ void clear_selection(void)
  * 128 bits. Locked by the console lock.
  */
 static u32 inwordLut[]={
-  0x00000000, /* control chars     */
-  0x03FFE000, /* digits and "-./"  */
-  0x87FFFFFE, /* uppercase and '_' */
-  0x07FFFFFE, /* lowercase         */
+	0x00000000, /* control chars     */
+	0x03FFE000, /* digits and "-./"  */
+	0x87FFFFFE, /* uppercase and '_' */
+	0x07FFFFFE, /* lowercase         */
 };
 
 static inline int inword(const u32 c)
@@ -154,7 +154,7 @@ static int store_utf8(u32 c, char *p)
 }
 
 /**
- *	set_selection		- 	set the current selection.
+ *	set_selection		-	set the current selection.
  *	@sel: user selection info
  *	@tty: the console tty
  *
diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
index 5f1183b0b89d..94131c746ef7 100644
--- a/drivers/tty/vt/vt.c
+++ b/drivers/tty/vt/vt.c
@@ -700,7 +700,7 @@ void update_region(struct vc_data *vc, unsigned long start, int count)
 /* Structure of attributes is hardware-dependent */
 
 static u8 build_attr(struct vc_data *vc, u8 _color, u8 _intensity, u8 _blink,
-    u8 _underline, u8 _reverse, u8 _italic)
+		     u8 _underline, u8 _reverse, u8 _italic)
 {
 	if (vc->vc_sw->con_build_attr)
 		return vc->vc_sw->con_build_attr(vc, _color, _intensity,
@@ -1399,7 +1399,7 @@ static void gotoxy(struct vc_data *vc, int new_x, int new_y)
 			vc->vc_x = new_x;
 	}
 
- 	if (vc->vc_decom) {
+	if (vc->vc_decom) {
 		min_y = vc->vc_top;
 		max_y = vc->vc_bottom;
 	} else {
@@ -1436,13 +1436,13 @@ void scrollfront(struct vc_data *vc, int lines)
 
 static void lf(struct vc_data *vc)
 {
-    	/* don't scroll if above bottom of scrolling region, or
+	/* don't scroll if above bottom of scrolling region, or
 	 * if below scrolling region
 	 */
-    	if (vc->vc_y + 1 == vc->vc_bottom)
+	if (vc->vc_y + 1 == vc->vc_bottom)
 		con_scroll(vc, vc->vc_top, vc->vc_bottom, SM_UP, 1);
 	else if (vc->vc_y < vc->vc_rows - 1) {
-	    	vc->vc_y++;
+		vc->vc_y++;
 		vc->vc_pos += vc->vc_size_row;
 	}
 	vc->vc_need_wrap = 0;
@@ -1451,7 +1451,7 @@ static void lf(struct vc_data *vc)
 
 static void ri(struct vc_data *vc)
 {
-    	/* don't scroll if below top of scrolling region, or
+	/* don't scroll if below top of scrolling region, or
 	 * if above scrolling region
 	 */
 	if (vc->vc_y == vc->vc_top)
@@ -2653,17 +2653,17 @@ static int do_con_write(struct tty_struct *tty, const unsigned char *buf, int co
 					&param) == NOTIFY_STOP)
 			continue;
 
-                /* If the original code was a control character we
-                 * only allow a glyph to be displayed if the code is
-                 * not normally used (such as for cursor movement) or
-                 * if the disp_ctrl mode has been explicitly enabled.
-                 * Certain characters (as given by the CTRL_ALWAYS
-                 * bitmap) are always displayed as control characters,
-                 * as the console would be pretty useless without
-                 * them; to display an arbitrary font position use the
-                 * direct-to-font zone in UTF-8 mode.
-                 */
-                ok = tc && (c >= 32 ||
+		/* If the original code was a control character we
+		 * only allow a glyph to be displayed if the code is
+		 * not normally used (such as for cursor movement) or
+		 * if the disp_ctrl mode has been explicitly enabled.
+		 * Certain characters (as given by the CTRL_ALWAYS
+		 * bitmap) are always displayed as control characters,
+		 * as the console would be pretty useless without
+		 * them; to display an arbitrary font position use the
+		 * direct-to-font zone in UTF-8 mode.
+		 */
+		ok = tc && (c >= 32 ||
 			    !(vc->vc_disp_ctrl ? (CTRL_ALWAYS >> c) & 1 :
 				  vc->vc_utf || ((CTRL_ACTION >> c) & 1)))
 			&& (c != 127 || vc->vc_disp_ctrl)
@@ -2847,7 +2847,7 @@ struct tty_driver *console_driver;
 /**
  * vt_kmsg_redirect() - Sets/gets the kernel message console
  * @new:	The new virtual terminal number or -1 if the console should stay
- * 		unchanged
+ *		unchanged
  *
  * By default, the kernel messages are always printed on the current virtual
  * console. However, the user may modify that default with the
@@ -3636,7 +3636,7 @@ static int vt_bind(struct con_driver *con)
 	const struct consw *defcsw = NULL, *csw = NULL;
 	int i, more = 1, first = -1, last = -1, deflt = 0;
 
- 	if (!con->con || !(con->flag & CON_DRIVER_FLAG_MODULE))
+	if (!con->con || !(con->flag & CON_DRIVER_FLAG_MODULE))
 		goto err;
 
 	csw = con->con;
@@ -3687,7 +3687,7 @@ static int vt_unbind(struct con_driver *con)
 	int i, more = 1, first = -1, last = -1, deflt = 0;
 	int ret;
 
- 	if (!con->con || !(con->flag & CON_DRIVER_FLAG_MODULE))
+	if (!con->con || !(con->flag & CON_DRIVER_FLAG_MODULE))
 		goto err;
 
 	csw = con->con;
diff --git a/drivers/tty/vt/vt_ioctl.c b/drivers/tty/vt/vt_ioctl.c
index 73cdc0d633dd..30e02ec5d6a0 100644
--- a/drivers/tty/vt/vt_ioctl.c
+++ b/drivers/tty/vt/vt_ioctl.c
@@ -230,7 +230,7 @@ do_fontx_ioctl(int cmd, struct consolefontdesc __user *user_cfd, int perm, struc
 
 	if (copy_from_user(&cfdarg, user_cfd, sizeof(struct consolefontdesc))) 
 		return -EFAULT;
- 	
+
 	switch (cmd) {
 	case PIO_FONTX:
 		if (!perm)
@@ -345,7 +345,7 @@ int vt_ioctl(struct tty_struct *tty,
 	console = vc->vc_num;
 
 
-	if (!vc_cons_allocated(console)) { 	/* impossible? */
+	if (!vc_cons_allocated(console)) {	/* impossible? */
 		ret = -ENOIOCTLCMD;
 		goto out;
 	}
@@ -358,7 +358,7 @@ int vt_ioctl(struct tty_struct *tty,
 	perm = 0;
 	if (current->signal->tty == tty || capable(CAP_SYS_TTY_CONFIG))
 		perm = 1;
- 
+
 	switch (cmd) {
 	case TIOCLINUX:
 		ret = tioclinux(tty, arg);
@@ -915,14 +915,14 @@ int vt_ioctl(struct tty_struct *tty,
 	}
 
 	case PIO_CMAP:
-                if (!perm)
+		if (!perm)
 			ret = -EPERM;
 		else
-	                ret = con_set_cmap(up);
+			ret = con_set_cmap(up);
 		break;
 
 	case GIO_CMAP:
-                ret = con_get_cmap(up);
+		ret = con_get_cmap(up);
 		break;
 
 	case PIO_FONTX:
@@ -1182,7 +1182,7 @@ long vt_compat_ioctl(struct tty_struct *tty,
 
 	console = vc->vc_num;
 
-	if (!vc_cons_allocated(console)) { 	/* impossible? */
+	if (!vc_cons_allocated(console)) {	/* impossible? */
 		ret = -ENOIOCTLCMD;
 		goto out;
 	}
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH v2 2/7] tty: Remove trailing whitespace
  2018-10-18 22:37 [PATCH v2 0/7] drivers: tty: Fix kernel-docs comments Tobin C. Harding
  2018-10-18 22:37 ` [PATCH v2 1/7] tty: Fix whitespace before tab warnings Tobin C. Harding
@ 2018-10-18 22:37 ` Tobin C. Harding
  2018-10-18 22:37 ` [PATCH v2 3/7] tty: Partially fix kernel-docs layout Tobin C. Harding
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: Tobin C. Harding @ 2018-10-18 22:37 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Jiri Slaby
  Cc: Tobin C. Harding, Geert Uytterhoeven, linux-kernel

Currently files under drivers/tty/ contain trailing whitespace.  This is
easy to fix and easy to review so lets do it now before we do other
kernel-docs cleanups.

Signed-off-by: Tobin C. Harding <tobin@kernel.org>
---
 drivers/tty/amiserial.c         |   19 +-
 drivers/tty/cyclades.c          |    2 +-
 drivers/tty/hvc/hvc_console.c   |    2 +-
 drivers/tty/hvc/hvc_xen.c       |    2 +-
 drivers/tty/hvc/hvcs.c          |    4 +-
 drivers/tty/moxa.c              |    8 +-
 drivers/tty/mxser.c             |    4 +-
 drivers/tty/n_hdlc.c            |  154 ++---
 drivers/tty/n_r3964.c           |    6 +-
 drivers/tty/rocket.c            |   70 +--
 drivers/tty/serial/21285.c      |    2 +-
 drivers/tty/serial/amba-pl010.c |    2 +-
 drivers/tty/serial/max3100.c    |    2 +-
 drivers/tty/serial/max310x.c    |    2 +-
 drivers/tty/serial/mux.c        |   12 +-
 drivers/tty/serial/pmac_zilog.c |   58 +-
 drivers/tty/serial/sa1100.c     |    2 +-
 drivers/tty/serial/sunsab.c     |   14 +-
 drivers/tty/serial/sunsu.c      |    4 +-
 drivers/tty/serial/sunzilog.c   |    8 +-
 drivers/tty/synclink.c          | 1016 +++++++++++++++----------------
 drivers/tty/synclinkmp.c        |   16 +-
 drivers/tty/tty_io.c            |    2 +-
 drivers/tty/tty_ioctl.c         |    2 +-
 drivers/tty/vt/consolemap.c     |   50 +-
 drivers/tty/vt/keyboard.c       |    2 +-
 drivers/tty/vt/vt.c             |   12 +-
 drivers/tty/vt/vt_ioctl.c       |   16 +-
 28 files changed, 746 insertions(+), 747 deletions(-)

diff --git a/drivers/tty/amiserial.c b/drivers/tty/amiserial.c
index 73d4033cef6b..7027b85e0428 100644
--- a/drivers/tty/amiserial.c
+++ b/drivers/tty/amiserial.c
@@ -17,7 +17,7 @@
  * Richard Lucock 28/12/99
  *
  *  Copyright (C) 1991, 1992  Linus Torvalds
- *  Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 
+ *  Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997,
  *		1998, 1999  Theodore Ts'o
  *
  */
@@ -239,7 +239,7 @@ static void rs_start(struct tty_struct *tty)
  * rs_interrupt() should try to keep the interrupt handler as fast as
  * possible.  After you are done making modifications, it is not a bad
  * idea to do:
- * 
+ *
  * gcc -S -DKERNEL -Wall -Wstrict-prototypes -O6 -fomit-frame-pointer serial.c
  *
  * and look at the resulting assemble code in serial.s.
@@ -746,7 +746,7 @@ static void change_speed(struct tty_struct *tty, struct serial_state *info,
 	if (I_IGNBRK(tty)) {
 		info->ignore_status_mask |= UART_LSR_BI;
 		/*
-		 * If we're ignore parity and break indicators, ignore 
+		 * If we're ignore parity and break indicators, ignore
 		 * overruns too.  (For real raw support).
 		 */
 		if (I_IGNPAR(tty))
@@ -940,7 +940,7 @@ static void rs_send_xchar(struct tty_struct *tty, char ch)
 /*
  * ------------------------------------------------------------
  * rs_throttle()
- * 
+ *
  * This routine is called by the upper-layer tty layer to signal that
  * incoming characters should be throttled.
  * ------------------------------------------------------------
@@ -1085,7 +1085,6 @@ static int set_serial_info(struct tty_struct *tty, struct serial_state *state,
 	return retval;
 }
 
-
 /*
  * get_lsr_info - get line status register info
  *
@@ -1266,7 +1265,7 @@ static int rs_ioctl(struct tty_struct *tty,
 				local_irq_save(flags);
 				cnow = info->icount; /* atomic copy */
 				local_irq_restore(flags);
-				if (cnow.rng == cprev.rng && cnow.dsr == cprev.dsr && 
+				if (cnow.rng == cprev.rng && cnow.dsr == cprev.dsr &&
 				    cnow.dcd == cprev.dcd && cnow.cts == cprev.cts) {
 					ret = -EIO; /* no change => error */
 					break;
@@ -1348,7 +1347,7 @@ static void rs_set_termios(struct tty_struct *tty, struct ktermios *old_termios)
 /*
  * ------------------------------------------------------------
  * rs_close()
- * 
+ *
  * This routine is called when the serial port gets closed.  First, we
  * wait for the last remaining data to be sent.  Then, we unlink its
  * async structure from the interrupt chain if necessary, and we free
@@ -1390,7 +1389,7 @@ static void rs_close(struct tty_struct *tty, struct file * filp)
 	}
 	shutdown(tty, state);
 	rs_flush_buffer(tty);
-		
+
 	tty_ldisc_flush(tty);
 	port->tty = NULL;
 
@@ -1418,7 +1417,7 @@ static void rs_wait_until_sent(struct tty_struct *tty, int timeout)
 	 * Set the check interval to be 1/5 of the estimated time to
 	 * send a single character, and make it at least 1.  The check
 	 * interval should also be less than the timeout.
-	 * 
+	 *
 	 * Note: we have to use pretty tight timings here to satisfy
 	 * the NIST-PCTS.
 	 */
@@ -1669,7 +1668,7 @@ static int __init amiga_serial_probe(struct platform_device *pdev)
 	state = rs_table;
 	state->port = (int)&custom.serdatr; /* Just to give it a value */
 	state->custom_divisor = 0;
-	state->icount.cts = state->icount.dsr = 
+	state->icount.cts = state->icount.dsr =
 	  state->icount.rng = state->icount.dcd = 0;
 	state->icount.rx = state->icount.tx = 0;
 	state->icount.frame = state->icount.parity = 0;
diff --git a/drivers/tty/cyclades.c b/drivers/tty/cyclades.c
index 6d3c58051ce3..c82fce6f39ed 100644
--- a/drivers/tty/cyclades.c
+++ b/drivers/tty/cyclades.c
@@ -1028,7 +1028,7 @@ static void cyz_handle_tx(struct cyclades_port *info)
 
 	if (!char_count)
 		return;
-		
+
 	tty = tty_port_tty_get(&info->port);
 	if (tty == NULL)
 		goto ztxdone;
diff --git a/drivers/tty/hvc/hvc_console.c b/drivers/tty/hvc/hvc_console.c
index 676cf5b73ed2..6d57d0bfff5d 100644
--- a/drivers/tty/hvc/hvc_console.c
+++ b/drivers/tty/hvc/hvc_console.c
@@ -204,7 +204,7 @@ static struct tty_driver *hvc_console_device(struct console *c, int *index)
 }
 
 static int hvc_console_setup(struct console *co, char *options)
-{	
+{
 	if (co->index < 0 || co->index >= MAX_NR_HVC_CONSOLES)
 		return -ENODEV;
 
diff --git a/drivers/tty/hvc/hvc_xen.c b/drivers/tty/hvc/hvc_xen.c
index dc43fa96c3de..2c32dd544829 100644
--- a/drivers/tty/hvc/hvc_xen.c
+++ b/drivers/tty/hvc/hvc_xen.c
@@ -114,7 +114,7 @@ static int domU_write_console(uint32_t vtermno, const char *data, int len)
 	 */
 	while (len) {
 		int sent = __write_console(cons, data, len);
-		
+
 		data += sent;
 		len -= sent;
 
diff --git a/drivers/tty/hvc/hvcs.c b/drivers/tty/hvc/hvcs.c
index cb4db1b3ca3c..2420068d69d8 100644
--- a/drivers/tty/hvc/hvcs.c
+++ b/drivers/tty/hvc/hvcs.c
@@ -153,8 +153,8 @@ MODULE_VERSION(HVCS_DRIVER_VERSION);
 /*
  * The hcall interface involves putting 8 chars into each of two registers.
  * We load up those 2 registers (in arch/powerpc/platforms/pseries/hvconsole.c)
- * by casting char[16] to long[2].  It would work without __ALIGNED__, but a 
- * little (tiny) bit slower because an unaligned load is slower than aligned 
+ * by casting char[16] to long[2].  It would work without __ALIGNED__, but a
+ * little (tiny) bit slower because an unaligned load is slower than aligned
  * load.
  */
 #define __ALIGNED__	__attribute__((__aligned__(8)))
diff --git a/drivers/tty/moxa.c b/drivers/tty/moxa.c
index 7ce06f43b6ae..91c3599a93d4 100644
--- a/drivers/tty/moxa.c
+++ b/drivers/tty/moxa.c
@@ -1635,10 +1635,10 @@ static void MoxaPortFlushData(struct moxa_port *port, int mode)
  *      Syntax:
  *      void MoxaPortFlushData(int port, int mode);
  *           int port           : port number (0 - 127)
- *           int mode    
- *                      0       : flush the Rx buffer 
- *                      1       : flush the Tx buffer 
- *                      2       : flush the Rx and Tx buffer 
+ *           int mode
+ *                      0       : flush the Rx buffer
+ *                      1       : flush the Tx buffer
+ *                      2       : flush the Rx and Tx buffer
  *
  *
  *      Function 20:    Write data.
diff --git a/drivers/tty/mxser.c b/drivers/tty/mxser.c
index 3f800b35689e..aac8c747e85a 100644
--- a/drivers/tty/mxser.c
+++ b/drivers/tty/mxser.c
@@ -1089,7 +1089,7 @@ static void mxser_close(struct tty_struct *tty, struct file *filp)
 	mutex_unlock(&port->mutex);
 	info->closing = 0;
 	/* Right now the tty_port set is done outside of the close_end helper
-	   as we don't yet have everyone using refcounts */	
+	   as we don't yet have everyone using refcounts */
 	tty_port_close_end(port, tty);
 	tty_port_tty_set(port, NULL);
 }
@@ -1517,7 +1517,7 @@ static int mxser_ioctl_special(unsigned int cmd, void __user *argp)
 				mutex_lock(&port->mutex);
 				if (!ip->ioaddr)
 					goto copy;
-				
+
 				tty = tty_port_tty_get(port);
 
 				if (!tty)
diff --git a/drivers/tty/n_hdlc.c b/drivers/tty/n_hdlc.c
index 1f2e24424b44..789251f8a1e2 100644
--- a/drivers/tty/n_hdlc.c
+++ b/drivers/tty/n_hdlc.c
@@ -18,7 +18,7 @@
  * All HDLC data is frame oriented which means:
  *
  * 1. tty write calls represent one complete transmit frame of data
- *    The device driver should accept the complete frame or none of 
+ *    The device driver should accept the complete frame or none of
  *    the frame (busy) in the write method. Each write call should have
  *    a byte count in the range of 2-65535 bytes (2 is min HDLC frame
  *    with 1 addr byte and 1 ctrl byte). The max byte count of 65535
@@ -39,7 +39,7 @@
  *    tty read calls.
  *
  * 3. tty read calls returns an entire frame of data or nothing.
- *    
+ *
  * 4. all send and receive data is considered raw. No processing
  *    or translation is performed by the line discipline, regardless
  *    of the tty flags
@@ -107,7 +107,7 @@
 /*
  * Buffers for individual HDLC frames
  */
-#define MAX_HDLC_FRAME_SIZE 65535 
+#define MAX_HDLC_FRAME_SIZE 65535
 #define DEFAULT_RX_BUF_COUNT 10
 #define MAX_RX_BUF_COUNT 60
 #define DEFAULT_TX_BUF_COUNT 3
@@ -234,10 +234,10 @@ static void n_hdlc_release(struct n_hdlc *n_hdlc)
 {
 	struct tty_struct *tty = n_hdlc2tty (n_hdlc);
 	struct n_hdlc_buf *buf;
-	
-	if (debuglevel >= DEBUG_LEVEL_INFO)	
+
+	if (debuglevel >= DEBUG_LEVEL_INFO)
 		printk("%s(%d)n_hdlc_release() called\n",__FILE__,__LINE__);
-		
+
 	/* Ensure that the n_hdlcd process is not hanging on select()/poll() */
 	wake_up_interruptible (&tty->read_wait);
 	wake_up_interruptible (&tty->write_wait);
@@ -275,7 +275,7 @@ static void n_hdlc_release(struct n_hdlc *n_hdlc)
 			break;
 	}
 	kfree(n_hdlc);
-	
+
 }	/* end of n_hdlc_release() */
 
 /**
@@ -289,9 +289,9 @@ static void n_hdlc_tty_close(struct tty_struct *tty)
 {
 	struct n_hdlc *n_hdlc = tty2n_hdlc (tty);
 
-	if (debuglevel >= DEBUG_LEVEL_INFO)	
+	if (debuglevel >= DEBUG_LEVEL_INFO)
 		printk("%s(%d)n_hdlc_tty_close() called\n",__FILE__,__LINE__);
-		
+
 	if (n_hdlc != NULL) {
 		if (n_hdlc->magic != HDLC_MAGIC) {
 			printk (KERN_WARNING"n_hdlc: trying to close unopened tty!\n");
@@ -311,10 +311,10 @@ static void n_hdlc_tty_close(struct tty_struct *tty)
 			n_hdlc_release (n_hdlc);
 		}
 	}
-	
-	if (debuglevel >= DEBUG_LEVEL_INFO)	
+
+	if (debuglevel >= DEBUG_LEVEL_INFO)
 		printk("%s(%d)n_hdlc_tty_close() success\n",__FILE__,__LINE__);
-		
+
 }	/* end of n_hdlc_tty_close() */
 
 /**
@@ -327,40 +327,40 @@ static int n_hdlc_tty_open (struct tty_struct *tty)
 {
 	struct n_hdlc *n_hdlc = tty2n_hdlc (tty);
 
-	if (debuglevel >= DEBUG_LEVEL_INFO)	
+	if (debuglevel >= DEBUG_LEVEL_INFO)
 		printk("%s(%d)n_hdlc_tty_open() called (device=%s)\n",
 		__FILE__,__LINE__,
 		tty->name);
-		
+
 	/* There should not be an existing table for this slot. */
 	if (n_hdlc) {
 		printk (KERN_ERR"n_hdlc_tty_open:tty already associated!\n" );
 		return -EEXIST;
 	}
-	
+
 	n_hdlc = n_hdlc_alloc();
 	if (!n_hdlc) {
 		printk (KERN_ERR "n_hdlc_alloc failed\n");
 		return -ENFILE;
 	}
-		
+
 	tty->disc_data = n_hdlc;
 	n_hdlc->tty    = tty;
 	tty->receive_room = 65536;
-	
+
 #if defined(TTY_NO_WRITE_SPLIT)
 	/* change tty_io write() to not split large writes into 8K chunks */
 	set_bit(TTY_NO_WRITE_SPLIT,&tty->flags);
 #endif
-	
+
 	/* flush receive data from driver */
 	tty_driver_flush_buffer(tty);
-		
-	if (debuglevel >= DEBUG_LEVEL_INFO)	
+
+	if (debuglevel >= DEBUG_LEVEL_INFO)
 		printk("%s(%d)n_hdlc_tty_open() success\n",__FILE__,__LINE__);
-		
+
 	return 0;
-	
+
 }	/* end of n_tty_hdlc_open() */
 
 /**
@@ -378,10 +378,10 @@ static void n_hdlc_send_frames(struct n_hdlc *n_hdlc, struct tty_struct *tty)
 	unsigned long flags;
 	struct n_hdlc_buf *tbuf;
 
-	if (debuglevel >= DEBUG_LEVEL_INFO)	
+	if (debuglevel >= DEBUG_LEVEL_INFO)
 		printk("%s(%d)n_hdlc_send_frames() called\n",__FILE__,__LINE__);
  check_again:
-		
+
 	spin_lock_irqsave(&n_hdlc->tx_buf_list.spinlock, flags);
 	if (n_hdlc->tbusy) {
 		n_hdlc->woke_up = 1;
@@ -394,10 +394,10 @@ static void n_hdlc_send_frames(struct n_hdlc *n_hdlc, struct tty_struct *tty)
 
 	tbuf = n_hdlc_buf_get(&n_hdlc->tx_buf_list);
 	while (tbuf) {
-		if (debuglevel >= DEBUG_LEVEL_INFO)	
+		if (debuglevel >= DEBUG_LEVEL_INFO)
 			printk("%s(%d)sending frame %p, count=%d\n",
 				__FILE__,__LINE__,tbuf,tbuf->count);
-			
+
 		/* Send the next block of data to device */
 		set_bit(TTY_DO_WRITE_WAKEUP, &tty->flags);
 		actual = tty->ops->write(tty, tbuf->buf, tbuf->count);
@@ -411,22 +411,22 @@ static void n_hdlc_send_frames(struct n_hdlc *n_hdlc, struct tty_struct *tty)
 		/* pretending it was accepted by driver */
 		if (actual < 0)
 			actual = tbuf->count;
-		
+
 		if (actual == tbuf->count) {
-			if (debuglevel >= DEBUG_LEVEL_INFO)	
+			if (debuglevel >= DEBUG_LEVEL_INFO)
 				printk("%s(%d)frame %p completed\n",
 					__FILE__,__LINE__,tbuf);
-					
+
 			/* free current transmit buffer */
 			n_hdlc_buf_put(&n_hdlc->tx_free_buf_list, tbuf);
 
 			/* wait up sleeping writers */
 			wake_up_interruptible(&tty->write_wait);
-	
+
 			/* get next pending transmit buffer */
 			tbuf = n_hdlc_buf_get(&n_hdlc->tx_buf_list);
 		} else {
-			if (debuglevel >= DEBUG_LEVEL_INFO)	
+			if (debuglevel >= DEBUG_LEVEL_INFO)
 				printk("%s(%d)frame %p pending\n",
 					__FILE__,__LINE__,tbuf);
 
@@ -438,21 +438,21 @@ static void n_hdlc_send_frames(struct n_hdlc *n_hdlc, struct tty_struct *tty)
 			break;
 		}
 	}
-	
+
 	if (!tbuf)
 		clear_bit(TTY_DO_WRITE_WAKEUP, &tty->flags);
-	
+
 	/* Clear the re-entry flag */
 	spin_lock_irqsave(&n_hdlc->tx_buf_list.spinlock, flags);
 	n_hdlc->tbusy = 0;
-	spin_unlock_irqrestore(&n_hdlc->tx_buf_list.spinlock, flags); 
-	
+	spin_unlock_irqrestore(&n_hdlc->tx_buf_list.spinlock, flags);
+
 	if (n_hdlc->woke_up)
 	  goto check_again;
 
-	if (debuglevel >= DEBUG_LEVEL_INFO)	
+	if (debuglevel >= DEBUG_LEVEL_INFO)
 		printk("%s(%d)n_hdlc_send_frames() exit\n",__FILE__,__LINE__);
-		
+
 }	/* end of n_hdlc_send_frames() */
 
 /**
@@ -465,9 +465,9 @@ static void n_hdlc_tty_wakeup(struct tty_struct *tty)
 {
 	struct n_hdlc *n_hdlc = tty2n_hdlc(tty);
 
-	if (debuglevel >= DEBUG_LEVEL_INFO)	
+	if (debuglevel >= DEBUG_LEVEL_INFO)
 		printk("%s(%d)n_hdlc_tty_wakeup() called\n",__FILE__,__LINE__);
-		
+
 	if (!n_hdlc)
 		return;
 
@@ -477,7 +477,7 @@ static void n_hdlc_tty_wakeup(struct tty_struct *tty)
 	}
 
 	n_hdlc_send_frames (n_hdlc, tty);
-		
+
 }	/* end of n_hdlc_tty_wakeup() */
 
 /**
@@ -496,29 +496,29 @@ static void n_hdlc_tty_receive(struct tty_struct *tty, const __u8 *data,
 	register struct n_hdlc *n_hdlc = tty2n_hdlc (tty);
 	register struct n_hdlc_buf *buf;
 
-	if (debuglevel >= DEBUG_LEVEL_INFO)	
+	if (debuglevel >= DEBUG_LEVEL_INFO)
 		printk("%s(%d)n_hdlc_tty_receive() called count=%d\n",
 			__FILE__,__LINE__, count);
-		
+
 	/* This can happen if stuff comes in on the backup tty */
 	if (!n_hdlc || tty != n_hdlc->tty)
 		return;
-		
+
 	/* verify line is using HDLC discipline */
 	if (n_hdlc->magic != HDLC_MAGIC) {
 		printk("%s(%d) line not using HDLC discipline\n",
 			__FILE__,__LINE__);
 		return;
 	}
-	
+
 	if ( count>maxframe ) {
-		if (debuglevel >= DEBUG_LEVEL_INFO)	
+		if (debuglevel >= DEBUG_LEVEL_INFO)
 			printk("%s(%d) rx count>maxframesize, data discarded\n",
 			       __FILE__,__LINE__);
 		return;
 	}
 
-	/* get a free HDLC buffer */	
+	/* get a free HDLC buffer */
 	buf = n_hdlc_buf_get(&n_hdlc->rx_free_buf_list);
 	if (!buf) {
 		/* no buffers in free list, attempt to allocate another rx buffer */
@@ -526,21 +526,21 @@ static void n_hdlc_tty_receive(struct tty_struct *tty, const __u8 *data,
 		if (n_hdlc->rx_buf_list.count < MAX_RX_BUF_COUNT)
 			buf = kmalloc(N_HDLC_BUF_SIZE, GFP_ATOMIC);
 	}
-	
+
 	if (!buf) {
-		if (debuglevel >= DEBUG_LEVEL_INFO)	
+		if (debuglevel >= DEBUG_LEVEL_INFO)
 			printk("%s(%d) no more rx buffers, data discarded\n",
 			       __FILE__,__LINE__);
 		return;
 	}
-		
+
 	/* copy received data to HDLC buffer */
 	memcpy(buf->buf,data,count);
 	buf->count=count;
 
 	/* add HDLC buffer to list of received frames */
 	n_hdlc_buf_put(&n_hdlc->rx_buf_list, buf);
-	
+
 	/* wake up any blocked reads and perform async signalling */
 	wake_up_interruptible (&tty->read_wait);
 	if (n_hdlc->tty->fasync != NULL)
@@ -565,9 +565,9 @@ static ssize_t n_hdlc_tty_read(struct tty_struct *tty, struct file *file,
 	struct n_hdlc_buf *rbuf;
 	DECLARE_WAITQUEUE(wait, current);
 
-	if (debuglevel >= DEBUG_LEVEL_INFO)	
+	if (debuglevel >= DEBUG_LEVEL_INFO)
 		printk("%s(%d)n_hdlc_tty_read() called\n",__FILE__,__LINE__);
-		
+
 	/* Validate the pointers */
 	if (!n_hdlc)
 		return -EIO;
@@ -610,7 +610,7 @@ static ssize_t n_hdlc_tty_read(struct tty_struct *tty, struct file *file,
 				n_hdlc_buf_put(&n_hdlc->rx_free_buf_list, rbuf);
 			break;
 		}
-			
+
 		/* no data */
 		if (file->f_flags & O_NONBLOCK) {
 			ret = -EAGAIN;
@@ -629,7 +629,7 @@ static ssize_t n_hdlc_tty_read(struct tty_struct *tty, struct file *file,
 	__set_current_state(TASK_RUNNING);
 
 	return ret;
-	
+
 }	/* end of n_hdlc_tty_read() */
 
 /**
@@ -649,10 +649,10 @@ static ssize_t n_hdlc_tty_write(struct tty_struct *tty, struct file *file,
 	DECLARE_WAITQUEUE(wait, current);
 	struct n_hdlc_buf *tbuf;
 
-	if (debuglevel >= DEBUG_LEVEL_INFO)	
+	if (debuglevel >= DEBUG_LEVEL_INFO)
 		printk("%s(%d)n_hdlc_tty_write() called count=%zd\n",
 			__FILE__,__LINE__,count);
-		
+
 	/* Verify pointers */
 	if (!n_hdlc)
 		return -EIO;
@@ -669,12 +669,12 @@ static ssize_t n_hdlc_tty_write(struct tty_struct *tty, struct file *file,
 				maxframe );
 		count = maxframe;
 	}
-	
+
 	add_wait_queue(&tty->write_wait, &wait);
 
 	for (;;) {
 		set_current_state(TASK_INTERRUPTIBLE);
-	
+
 		tbuf = n_hdlc_buf_get(&n_hdlc->tx_free_buf_list);
 		if (tbuf)
 			break;
@@ -684,15 +684,15 @@ static ssize_t n_hdlc_tty_write(struct tty_struct *tty, struct file *file,
 			break;
 		}
 		schedule();
-			
+
 		n_hdlc = tty2n_hdlc (tty);
-		if (!n_hdlc || n_hdlc->magic != HDLC_MAGIC || 
+		if (!n_hdlc || n_hdlc->magic != HDLC_MAGIC ||
 		    tty != n_hdlc->tty) {
 			printk("n_hdlc_tty_write: %p invalid after wait!\n", n_hdlc);
 			error = -EIO;
 			break;
 		}
-			
+
 		if (signal_pending(current)) {
 			error = -EINTR;
 			break;
@@ -702,7 +702,7 @@ static ssize_t n_hdlc_tty_write(struct tty_struct *tty, struct file *file,
 	__set_current_state(TASK_RUNNING);
 	remove_wait_queue(&tty->write_wait, &wait);
 
-	if (!error) {		
+	if (!error) {
 		/* Retrieve the user's buffer */
 		memcpy(tbuf->buf, data, count);
 
@@ -713,7 +713,7 @@ static ssize_t n_hdlc_tty_write(struct tty_struct *tty, struct file *file,
 	}
 
 	return error;
-	
+
 }	/* end of n_hdlc_tty_write() */
 
 /**
@@ -734,10 +734,10 @@ static int n_hdlc_tty_ioctl(struct tty_struct *tty, struct file *file,
 	unsigned long flags;
 	struct n_hdlc_buf *buf = NULL;
 
-	if (debuglevel >= DEBUG_LEVEL_INFO)	
+	if (debuglevel >= DEBUG_LEVEL_INFO)
 		printk("%s(%d)n_hdlc_tty_ioctl() called %d\n",
 			__FILE__,__LINE__,cmd);
-		
+
 	/* Verify the status of the device */
 	if (!n_hdlc || n_hdlc->magic != HDLC_MAGIC)
 		return -EBADF;
@@ -783,7 +783,7 @@ static int n_hdlc_tty_ioctl(struct tty_struct *tty, struct file *file,
 		break;
 	}
 	return error;
-	
+
 }	/* end of n_hdlc_tty_ioctl() */
 
 /**
@@ -791,7 +791,7 @@ static int n_hdlc_tty_ioctl(struct tty_struct *tty, struct file *file,
  * @tty - pointer to tty instance data
  * @filp - pointer to open file object for device
  * @poll_table - wait queue for operations
- * 
+ *
  * Determine which operations (read/write) will not block and return info
  * to caller.
  * Returns a bit mask containing info on which ops will not block.
@@ -802,9 +802,9 @@ static __poll_t n_hdlc_tty_poll(struct tty_struct *tty, struct file *filp,
 	struct n_hdlc *n_hdlc = tty2n_hdlc (tty);
 	__poll_t mask = 0;
 
-	if (debuglevel >= DEBUG_LEVEL_INFO)	
+	if (debuglevel >= DEBUG_LEVEL_INFO)
 		printk("%s(%d)n_hdlc_tty_poll() called\n",__FILE__,__LINE__);
-		
+
 	if (n_hdlc && n_hdlc->magic == HDLC_MAGIC && tty == n_hdlc->tty) {
 		/* queue current process into any wait queue that */
 		/* may awaken in the future (read and write) */
@@ -855,25 +855,25 @@ static struct n_hdlc *n_hdlc_alloc(void)
 		buf = kmalloc(N_HDLC_BUF_SIZE, GFP_KERNEL);
 		if (buf)
 			n_hdlc_buf_put(&n_hdlc->rx_free_buf_list,buf);
-		else if (debuglevel >= DEBUG_LEVEL_INFO)	
+		else if (debuglevel >= DEBUG_LEVEL_INFO)
 			printk("%s(%d)n_hdlc_alloc(), kalloc() failed for rx buffer %d\n",__FILE__,__LINE__, i);
 	}
-	
+
 	/* allocate free tx buffer list */
 	for(i=0;i<DEFAULT_TX_BUF_COUNT;i++) {
 		buf = kmalloc(N_HDLC_BUF_SIZE, GFP_KERNEL);
 		if (buf)
 			n_hdlc_buf_put(&n_hdlc->tx_free_buf_list,buf);
-		else if (debuglevel >= DEBUG_LEVEL_INFO)	
+		else if (debuglevel >= DEBUG_LEVEL_INFO)
 			printk("%s(%d)n_hdlc_alloc(), kalloc() failed for tx buffer %d\n",__FILE__,__LINE__, i);
 	}
-	
+
 	/* Initialize the control block */
 	n_hdlc->magic  = HDLC_MAGIC;
 	n_hdlc->flags  = 0;
-	
+
 	return n_hdlc;
-	
+
 }	/* end of n_hdlc_alloc() */
 
 /**
@@ -915,7 +915,7 @@ static void n_hdlc_buf_put(struct n_hdlc_buf_list *buf_list,
 /**
  * n_hdlc_buf_get - remove and return an HDLC buffer from list
  * @buf_list - pointer to HDLC buffer list
- * 
+ *
  * Remove and return an HDLC buffer from the head of the specified HDLC buffer
  * list.
  * Returns a pointer to HDLC buffer if available, otherwise %NULL.
@@ -964,7 +964,7 @@ static int __init n_hdlc_init(void)
 		printk(hdlc_register_fail, status);
 
 	return status;
-	
+
 }	/* end of init_module() */
 
 static const char hdlc_unregister_ok[] __exitdata =
diff --git a/drivers/tty/n_r3964.c b/drivers/tty/n_r3964.c
index dbf1ab36758e..84f4f4f9b7c1 100644
--- a/drivers/tty/n_r3964.c
+++ b/drivers/tty/n_r3964.c
@@ -2,7 +2,7 @@
 /* r3964 linediscipline for linux
  *
  * -----------------------------------------------------------
- * Copyright by 
+ * Copyright by
  * Philips Automation Projects
  * Kassel (Germany)
  * -----------------------------------------------------------
@@ -1126,8 +1126,8 @@ static ssize_t r3964_write(struct tty_struct *tty, struct file *file,
 	unsigned char *new_data;
 
 	TRACE_L("write request, %d characters", count);
-/* 
- * Verify the pointers 
+/*
+ * Verify the pointers
  */
 
 	if (!pInfo)
diff --git a/drivers/tty/rocket.c b/drivers/tty/rocket.c
index c123fdb7eed8..c01fc69b8944 100644
--- a/drivers/tty/rocket.c
+++ b/drivers/tty/rocket.c
@@ -3,7 +3,7 @@
  * RocketPort device driver for Linux
  *
  * Written by Theodore Ts'o, 1995, 1996, 1997, 1998, 1999, 2000.
- * 
+ *
  * Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2003 by Comtrol, Inc.
  */
 
@@ -14,14 +14,14 @@
  * from user mode) and the timer bottom half (tasklet).  This is a polled driver, interrupts
  * are not used.
  *
- * Critical data: 
- * -  rp_table[], accessed through passed "info" pointers, is a global (static) array of 
- *    serial port state information and the xmit_buf circular buffer.  Protected by 
+ * Critical data:
+ * -  rp_table[], accessed through passed "info" pointers, is a global (static) array of
+ *    serial port state information and the xmit_buf circular buffer.  Protected by
  *    a per port spinlock.
  * -  xmit_flags[], an array of ints indexed by line (port) number, indicating that there
  *    is data to be transmitted.  Protected by atomic bit operations.
  * -  rp_num_ports, int indicating number of open ports, protected by atomic operations.
- * 
+ *
  * rp_write() and rp_write_char() functions use a per port semaphore to protect against
  * simultaneous access to the same port by more than one process.
  */
@@ -90,7 +90,7 @@ static void rp_do_poll(struct timer_list *unused);
 
 static struct tty_driver *rocket_driver;
 
-static struct rocket_version driver_version = {	
+static struct rocket_version driver_version = {
 	ROCKET_VERSION, ROCKET_DATE
 };
 
@@ -205,8 +205,8 @@ static Byte_t sBitMapSetTbl[8] = {
 static int sClockPrescale = 0x14;
 
 /*
- *  Line number is the ttySIx number (x), the Minor number.  We 
- *  assign them sequentially, starting at zero.  The following 
+ *  Line number is the ttySIx number (x), the Minor number.  We
+ *  assign them sequentially, starting at zero.  The following
  *  array keeps track of the line number assigned to a given board/aiop/channel.
  */
 static unsigned char lineNumbers[MAX_RP_PORTS];
@@ -294,9 +294,9 @@ static inline int rocket_paranoia_check(struct r_port *info,
 }
 
 
-/*  Serial port receive data function.  Called (from timer poll) when an AIOPIC signals 
- *  that receive data is present on a serial port.  Pulls data from FIFO, moves it into the 
- *  tty layer.  
+/*  Serial port receive data function.  Called (from timer poll) when an AIOPIC signals
+ *  that receive data is present on a serial port.  Pulls data from FIFO, moves it into the
+ *  tty layer.
  */
 static void rp_do_receive(struct r_port *info, CHANNEL_t *cp,
 		unsigned int ChanStatus)
@@ -327,7 +327,7 @@ static void rp_do_receive(struct r_port *info, CHANNEL_t *cp,
 		}
 	}
 
-	/* 
+	/*
 	 * if we previously entered status mode, then read down the
 	 * FIFO one word at a time, pulling apart the character and
 	 * the status.  Update error counters depending on status
@@ -402,9 +402,9 @@ static void rp_do_receive(struct r_port *info, CHANNEL_t *cp,
 }
 
 /*
- *  Serial port transmit data function.  Called from the timer polling loop as a 
+ *  Serial port transmit data function.  Called from the timer polling loop as a
  *  result of a bit set in xmit_flags[], indicating data (from the tty layer) is ready
- *  to be sent out the serial port.  Data is buffered in rp_table[line].xmit_buf, it is 
+ *  to be sent out the serial port.  Data is buffered in rp_table[line].xmit_buf, it is
  *  moved to the port's xmit FIFO.  *info is critical data, protected by spinlocks.
  */
 static void rp_do_transmit(struct r_port *info)
@@ -472,7 +472,7 @@ static void rp_do_transmit(struct r_port *info)
 /*
  *  Called when a serial port signals it has read data in it's RX FIFO.
  *  It checks what interrupts are pending and services them, including
- *  receiving serial data.  
+ *  receiving serial data.
  */
 static void rp_handle_port(struct r_port *info)
 {
@@ -574,8 +574,8 @@ static void rp_do_poll(struct timer_list *unused)
 
 		/*
 		 *  xmit_flags contains bit-significant flags, indicating there is data
-		 *  to xmit on the port. Bit 0 is port 0 on this board, bit 1 is port 
-		 *  1, ... (32 total possible).  The variable i has the aiop and ch 
+		 *  to xmit on the port. Bit 0 is port 0 on this board, bit 1 is port
+		 *  1, ... (32 total possible).  The variable i has the aiop and ch
 		 *  numbers encoded in it (port 0-7 are aiop0, 8-15 are aiop1, etc).
 		 */
 		if (xmitmask) {
@@ -598,8 +598,8 @@ static void rp_do_poll(struct timer_list *unused)
 }
 
 /*
- *  Initializes the r_port structure for a port, as well as enabling the port on 
- *  the board.  
+ *  Initializes the r_port structure for a port, as well as enabling the port on
+ *  the board.
  *  Inputs:  board, aiop, chan numbers
  */
 static void __init
@@ -686,7 +686,7 @@ init_r_port(int board, int aiop, int chan, struct pci_dev *pci_dev)
 }
 
 /*
- *  Configures a rocketport port according to its termio settings.  Called from 
+ *  Configures a rocketport port according to its termio settings.  Called from
  *  user mode into the driver (exception handler).  *info CD manipulation is spinlock protected.
  */
 static void configure_r_port(struct tty_struct *tty, struct r_port *info,
@@ -862,8 +862,8 @@ static void dtr_rts(struct tty_port *port, int on)
 }
 
 /*
- *  Exception handler that opens a serial port.  Creates xmit_buf storage, fills in 
- *  port's r_port struct.  Initializes the port hardware.  
+ *  Exception handler that opens a serial port.  Creates xmit_buf storage, fills in
+ *  port's r_port struct.  Initializes the port hardware.
  */
 static int rp_open(struct tty_struct *tty, struct file *filp)
 {
@@ -877,7 +877,7 @@ static int rp_open(struct tty_struct *tty, struct file *filp)
 	if (info == NULL)
 		return -ENXIO;
 	port = &info->port;
-	
+
 	page = __get_free_page(GFP_KERNEL);
 	if (!page)
 		return -ENOMEM;
@@ -962,7 +962,7 @@ static void rp_close(struct tty_struct *tty, struct file *filp)
 	struct tty_port *port = &info->port;
 	int timeout;
 	CHANNEL_t *cp;
-	
+
 	if (rocket_paranoia_check(info, "rp_close"))
 		return;
 
@@ -998,7 +998,7 @@ static void rp_close(struct tty_struct *tty, struct file *filp)
 		sClrDTR(cp);
 
 	rp_flush_buffer(tty);
-		
+
 	tty_ldisc_flush(tty);
 
 	clear_bit((info->aiop * 8) + info->chan, (void *) &xmit_flags[info->board]);
@@ -1119,7 +1119,7 @@ static int sGetChanRI(CHANNEL_T * ChP)
 /*  Here are the routines used by rp_ioctl.  These are all called from exception handlers.  */
 
 /*
- *  Returns the state of the serial modem control lines.  These next 2 functions 
+ *  Returns the state of the serial modem control lines.  These next 2 functions
  *  are the way kernel versions > 2.5 handle modem control lines rather than IOCTLs.
  */
 static int rp_tiocmget(struct tty_struct *tty)
@@ -1129,7 +1129,7 @@ static int rp_tiocmget(struct tty_struct *tty)
 
 	ChanStatus = sGetChanStatusLo(&info->channel);
 	control = info->channel.TxControl[3];
-	result = ((control & SET_RTS) ? TIOCM_RTS : 0) | 
+	result = ((control & SET_RTS) ? TIOCM_RTS : 0) |
 		((control & SET_DTR) ?  TIOCM_DTR : 0) |
 		((ChanStatus & CD_ACT) ? TIOCM_CAR : 0) |
 		(sGetChanRI(&info->channel) ? TIOCM_RNG : 0) |
@@ -1139,7 +1139,7 @@ static int rp_tiocmget(struct tty_struct *tty)
 	return result;
 }
 
-/* 
+/*
  *  Sets the modem control lines
  */
 static int rp_tiocmset(struct tty_struct *tty,
@@ -1537,7 +1537,7 @@ static int rp_put_char(struct tty_struct *tty, unsigned char ch)
  *  Exception handler - write routine, called when user app writes to the device.
  *  A per port write mutex is used to protect from another process writing to
  *  this port at the same time.  This other process could be running on the other CPU
- *  or get control of the CPU if the copy_from_user() blocks due to a page fault (swapped out). 
+ *  or get control of the CPU if the copy_from_user() blocks due to a page fault (swapped out).
  *  Spinlocks protect the info xmit members.
  */
 static int rp_write(struct tty_struct *tty,
@@ -1564,7 +1564,7 @@ static int rp_write(struct tty_struct *tty,
 		info->xmit_fifo_room = TXFIFO_SIZE - sGetTxCnt(cp);
 
         /*
-	 *  If the write queue for the port is empty, and there is FIFO space, stuff bytes 
+	 *  If the write queue for the port is empty, and there is FIFO space, stuff bytes
 	 *  into FIFO.  Use the write queue for temp storage.
          */
 	if (!tty->stopped && info->xmit_cnt == 0 && info->xmit_fifo_room > 0) {
@@ -1617,7 +1617,7 @@ static int rp_write(struct tty_struct *tty,
 
 	if ((retval > 0) && !tty->stopped)
 		set_bit((info->aiop * 8) + info->chan, (void *) &xmit_flags[info->board]);
-	
+
 end:
 	if (info->xmit_cnt < WAKEUP_CHARS) {
 		tty_wakeup(tty);
@@ -2285,7 +2285,7 @@ static int __init init_ISA(int i)
 	rocketModel[i].numPorts = total_num_chan;
 	rocketModel[i].model = MODEL_ISA;
 
-	printk(KERN_INFO "RocketPort ISA card #%d found at 0x%lx - %d AIOPs %s\n", 
+	printk(KERN_INFO "RocketPort ISA card #%d found at 0x%lx - %d AIOPs %s\n",
 	       i, rcktpt_io_addr[i], num_aiops, type_string);
 
 	printk(KERN_INFO "Installing %s, creating /dev/ttyR%d - %ld\n",
@@ -2339,7 +2339,7 @@ static int __init rp_init(void)
 		goto err;
 
 	/*
-	 *  If board 1 is non-zero, there is at least one ISA configured.  If controller is 
+	 *  If board 1 is non-zero, there is at least one ISA configured.  If controller is
 	 *  zero, use the default controller IO address of board1 + 0x40.
 	 */
 	if (board1) {
@@ -3104,8 +3104,8 @@ static unsigned char GetLineNumber(int ctrl, int aiop, int ch)
 
 /*
  *  Stores the line number associated with a given controller (board), aiop
- *  and channel number.  
- *  Returns:  The line number assigned 
+ *  and channel number.
+ *  Returns:  The line number assigned
  */
 static unsigned char SetLineNumber(int ctrl, int aiop, int ch)
 {
diff --git a/drivers/tty/serial/21285.c b/drivers/tty/serial/21285.c
index 32b3acf8150a..6176f5e8b228 100644
--- a/drivers/tty/serial/21285.c
+++ b/drivers/tty/serial/21285.c
@@ -227,7 +227,7 @@ serial21285_set_termios(struct uart_port *port, struct ktermios *termios,
 	/*
 	 * Ask the core to calculate the divisor for us.
 	 */
-	baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16); 
+	baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16);
 	quot = uart_get_divisor(port, baud);
 	b = port->uartclk / (16 * quot);
 	tty_termios_encode_baud_rate(termios, b, b);
diff --git a/drivers/tty/serial/amba-pl010.c b/drivers/tty/serial/amba-pl010.c
index 2c37d11726ab..fa49f25a7fbc 100644
--- a/drivers/tty/serial/amba-pl010.c
+++ b/drivers/tty/serial/amba-pl010.c
@@ -390,7 +390,7 @@ pl010_set_termios(struct uart_port *port, struct ktermios *termios,
 	/*
 	 * Ask the core to calculate the divisor for us.
 	 */
-	baud = uart_get_baud_rate(port, termios, old, 0, uap->port.uartclk/16); 
+	baud = uart_get_baud_rate(port, termios, old, 0, uap->port.uartclk/16);
 	quot = uart_get_divisor(port, baud);
 
 	switch (termios->c_cflag & CSIZE) {
diff --git a/drivers/tty/serial/max3100.c b/drivers/tty/serial/max3100.c
index 371569a0fd00..95090a6ad6c4 100644
--- a/drivers/tty/serial/max3100.c
+++ b/drivers/tty/serial/max3100.c
@@ -826,7 +826,7 @@ static int max3100_remove(struct spi_device *spi)
 		}
 
 	WARN_ON(i == MAX_MAX3100);
-	
+
 	/* check if this is the last chip we have */
 	for (i = 0; i < MAX_MAX3100; i++)
 		if (max3100s[i]) {
diff --git a/drivers/tty/serial/max310x.c b/drivers/tty/serial/max310x.c
index 3db48fcd6068..aae234b14be6 100644
--- a/drivers/tty/serial/max310x.c
+++ b/drivers/tty/serial/max310x.c
@@ -386,7 +386,7 @@ static int max14830_detect(struct device *dev)
 			   MAX310X_EXTREG_ENBL);
 	if (ret)
 		return ret;
-	
+
 	regmap_read(s->regmap, MAX310X_REVID_EXTREG, &val);
 	regmap_write(s->regmap, MAX310X_GLOBALCMD_REG, MAX310X_EXTREG_DSBL);
 	if (((val & MAX310x_REV_MASK) != MAX14830_REV_ID)) {
diff --git a/drivers/tty/serial/mux.c b/drivers/tty/serial/mux.c
index 880d1b3127c2..f7d67125675e 100644
--- a/drivers/tty/serial/mux.c
+++ b/drivers/tty/serial/mux.c
@@ -108,7 +108,7 @@ static int __init get_mux_port_count(struct parisc_device *dev)
 static unsigned int mux_tx_empty(struct uart_port *port)
 {
 	return UART_GET_FIFO_CNT(port) ? 0 : TIOCSER_TEMT;
-} 
+}
 
 /**
  * mux_set_mctrl - Set the current state of the modem control inputs.
@@ -130,7 +130,7 @@ static void mux_set_mctrl(struct uart_port *port, unsigned int mctrl)
  * treated as permanently active.
  */
 static unsigned int mux_get_mctrl(struct uart_port *port)
-{ 
+{
 	return TIOCM_CAR | TIOCM_DSR | TIOCM_CTS;
 }
 
@@ -209,7 +209,7 @@ static void mux_write(struct uart_port *port)
 
 	} while(--count > 0);
 
-	while(UART_GET_FIFO_CNT(port)) 
+	while(UART_GET_FIFO_CNT(port))
 		udelay(1);
 
 	if(uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
@@ -254,7 +254,7 @@ static void mux_read(struct uart_port *port)
 
 		tty_insert_flip_char(tport, data & 0xFF, TTY_NORMAL);
 	}
-	
+
 	if (start_count != port->icount.rx)
 		tty_flip_buffer_push(tport);
 }
@@ -312,7 +312,7 @@ static const char *mux_type(struct uart_port *port)
 /**
  * mux_release_port - Release memory and IO regions.
  * @port: Ptr to the uart_port.
- * 
+ *
  * Release any memory and IO region resources currently in use by
  * the port.
  */
@@ -372,7 +372,7 @@ static int mux_verify_port(struct uart_port *port, struct serial_struct *ser)
  * This function periodically polls the Serial MUX to check for new data.
  */
 static void mux_poll(struct timer_list *unused)
-{  
+{
 	int i;
 
 	for(i = 0; i < port_cnt; ++i) {
diff --git a/drivers/tty/serial/pmac_zilog.c b/drivers/tty/serial/pmac_zilog.c
index a5558051de74..5fcd34bbd0ce 100644
--- a/drivers/tty/serial/pmac_zilog.c
+++ b/drivers/tty/serial/pmac_zilog.c
@@ -2,7 +2,7 @@
 /*
  * Driver for PowerMac Z85c30 based ESCC cell found in the
  * "macio" ASICs of various PowerMac models
- * 
+ *
  * Copyright (C) 2003 Ben. Herrenschmidt (benh@kernel.crashing.org)
  *
  * Derived from drivers/macintosh/macserial.c by Paul Mackerras
@@ -108,7 +108,7 @@ static struct uart_driver pmz_uart_reg = {
 };
 
 
-/* 
+/*
  * Load all registers to reprogram the port
  * This function must only be called when the TX is not busy.  The UART
  * port lock must be held and local interrupts disabled.
@@ -165,7 +165,7 @@ static void pmz_load_zsregs(struct uart_pmac_port *uap, u8 *regs)
 	/* Lower and upper byte of baud rate generator divisor.  */
 	write_zsreg(uap, R12, regs[R12]);
 	write_zsreg(uap, R13, regs[R13]);
-	
+
 	/* Now rewrite R14, with BRENAB (if set).  */
 	write_zsreg(uap, R14, regs[R14]);
 
@@ -184,7 +184,7 @@ static void pmz_load_zsregs(struct uart_pmac_port *uap, u8 *regs)
 	write_zsreg(uap, R9, regs[R9]);
 }
 
-/* 
+/*
  * We do like sunzilog to avoid disrupting pending Tx
  * Reprogram the Zilog channel HW registers with the copies found in the
  * software state struct.  If the transmitter is busy, we defer this update
@@ -460,7 +460,7 @@ static irqreturn_t pmz_interrupt(int irq, void *dev_id)
 			goto skip_a;
 		}
 		write_zsreg(uap_a, R0, RES_H_IUS);
-		zssync(uap_a);		
+		zssync(uap_a);
 		if (r3 & CHAEXT)
 			pmz_status_handle(uap_a);
 		if (r3 & CHARxIP)
@@ -510,7 +510,7 @@ static inline u8 pmz_peek_status(struct uart_pmac_port *uap)
 {
 	unsigned long flags;
 	u8 status;
-	
+
 	spin_lock_irqsave(&uap->port.lock, flags);
 	status = read_zsreg(uap, R0);
 	spin_unlock_irqrestore(&uap->port.lock, flags);
@@ -518,7 +518,7 @@ static inline u8 pmz_peek_status(struct uart_pmac_port *uap)
 	return status;
 }
 
-/* 
+/*
  * Check if transmitter is empty
  * The port lock is not held.
  */
@@ -532,7 +532,7 @@ static unsigned int pmz_tx_empty(struct uart_port *port)
 	return 0;
 }
 
-/* 
+/*
  * Set Modem Control (RTS & DTR) bits
  * The port lock is held and interrupts are disabled.
  * Note: Shall we really filter out RTS on external ports or
@@ -563,7 +563,7 @@ static void pmz_set_mctrl(struct uart_port *port, unsigned int mctrl)
 	else
 		clear_bits |= DTR;
 
-	/* NOTE: Not subject to 'transmitter active' rule.  */ 
+	/* NOTE: Not subject to 'transmitter active' rule.  */
 	uap->curregs[R5] |= set_bits;
 	uap->curregs[R5] &= ~clear_bits;
 
@@ -573,7 +573,7 @@ static void pmz_set_mctrl(struct uart_port *port, unsigned int mctrl)
 	zssync(uap);
 }
 
-/* 
+/*
  * Get Modem Control bits (only the input ones, the core will
  * or that with a cached value of the control ones)
  * The port lock is held and interrupts are disabled.
@@ -597,7 +597,7 @@ static unsigned int pmz_get_mctrl(struct uart_port *port)
 	return ret;
 }
 
-/* 
+/*
  * Stop TX side. Dealt like sunzilog at next Tx interrupt,
  * though for DMA, we will have to do a bit more.
  * The port lock is held and interrupts are disabled.
@@ -607,7 +607,7 @@ static void pmz_stop_tx(struct uart_port *port)
 	to_pmz(port)->flags |= PMACZILOG_FLAG_TX_STOPPED;
 }
 
-/* 
+/*
  * Kick the Tx side.
  * The port lock is held and interrupts are disabled.
  */
@@ -652,7 +652,7 @@ static void pmz_start_tx(struct uart_port *port)
 	pmz_debug("pmz: start_tx() done.\n");
 }
 
-/* 
+/*
  * Stop Rx side, basically disable emitting of
  * Rx interrupts on the port. We don't disable the rx
  * side of the chip proper though
@@ -671,7 +671,7 @@ static void pmz_stop_rx(struct uart_port *port)
 	pmz_debug("pmz: stop_rx() done.\n");
 }
 
-/* 
+/*
  * Enable modem status change interrupts
  * The port lock is held.
  */
@@ -691,7 +691,7 @@ static void pmz_enable_ms(struct uart_port *port)
 	}
 }
 
-/* 
+/*
  * Control break state emission
  * The port lock is not held.
  */
@@ -924,7 +924,7 @@ static int pmz_startup(struct uart_port *port)
 		spin_lock_irqsave(&port->lock, flags);
 		pwr_delay = __pmz_startup(uap);
 		spin_unlock_irqrestore(&port->lock, flags);
-	}	
+	}
 	sprintf(uap->irq_name, PMACZILOG_NAME"%d", uap->port.line);
 	if (request_irq(uap->port.irq, pmz_interrupt, IRQF_SHARED,
 			uap->irq_name, uap)) {
@@ -1176,7 +1176,7 @@ static void pmz_irda_setup(struct uart_pmac_port *uap, unsigned long *baud)
 	mdelay(1);
 
 	/* Switch SCC to 19200 */
-	pmz_convert_to_zs(uap, CS8, 0, 19200);		
+	pmz_convert_to_zs(uap, CS8, 0, 19200);
 	pmz_load_zsregs(uap, uap->curregs);
 	mdelay(1);
 
@@ -1284,7 +1284,7 @@ static void pmz_set_termios(struct uart_port *port, struct ktermios *termios,
 	struct uart_pmac_port *uap = to_pmz(port);
 	unsigned long flags;
 
-	spin_lock_irqsave(&port->lock, flags);	
+	spin_lock_irqsave(&port->lock, flags);
 
 	/* Disable IRQs on the port */
 	pmz_interrupt_control(uap, 0);
@@ -1415,7 +1415,7 @@ static int __init pmz_init_port(struct uart_pmac_port *uap)
 
 	uap->control_reg = uap->port.membase;
 	uap->data_reg = uap->control_reg + 0x10;
-	
+
 	/*
 	 * Request & map DBDMA registers
 	 */
@@ -1426,15 +1426,15 @@ static int __init pmz_init_port(struct uart_pmac_port *uap)
 #else
 	memset(&r_txdma, 0, sizeof(struct resource));
 	memset(&r_rxdma, 0, sizeof(struct resource));
-#endif	
+#endif
 	if (ZS_HAS_DMA(uap)) {
 		uap->tx_dma_regs = ioremap(r_txdma.start, 0x100);
-		if (uap->tx_dma_regs == NULL) {	
+		if (uap->tx_dma_regs == NULL) {
 			uap->flags &= ~PMACZILOG_FLAG_HAS_DMA;
 			goto no_dma;
 		}
 		uap->rx_dma_regs = ioremap(r_rxdma.start, 0x100);
-		if (uap->rx_dma_regs == NULL) {	
+		if (uap->rx_dma_regs == NULL) {
 			iounmap(uap->tx_dma_regs);
 			uap->tx_dma_regs = NULL;
 			uap->flags &= ~PMACZILOG_FLAG_HAS_DMA;
@@ -1545,7 +1545,7 @@ static int pmz_attach(struct macio_dev *mdev, const struct of_device_id *match)
 {
 	struct uart_pmac_port *uap;
 	int i;
-	
+
 	/* Iterate the pmz_ports array to find a matching entry
 	 */
 	for (i = 0; i < MAX_ZS_PORTS; i++)
@@ -1580,7 +1580,7 @@ static int pmz_attach(struct macio_dev *mdev, const struct of_device_id *match)
 static int pmz_detach(struct macio_dev *mdev)
 {
 	struct uart_pmac_port	*uap = dev_get_drvdata(&mdev->ofdev.dev);
-	
+
 	if (!uap)
 		return -ENODEV;
 
@@ -1593,7 +1593,7 @@ static int pmz_detach(struct macio_dev *mdev)
 	dev_set_drvdata(&mdev->ofdev.dev, NULL);
 	uap->dev = NULL;
 	uap->port.dev = NULL;
-	
+
 	return 0;
 }
 
@@ -1643,7 +1643,7 @@ static int __init pmz_probe(void)
 	for_each_node_by_name(node_p, "escc") {
 		/*
 		 * First get channel A/B node pointers
-		 * 
+		 *
 		 * TODO: Add routines with proper locking to do that...
 		 */
 		node_a = node_b = NULL;
@@ -1871,7 +1871,7 @@ static int __init init_pmz(void)
 	int rc, i;
 	printk(KERN_INFO "%s\n", version);
 
-	/* 
+	/*
 	 * First, we need to do a direct OF-based probe pass. We
 	 * do that because we want serial console up before the
 	 * macio stuffs calls us back, and since that makes it
@@ -1892,7 +1892,7 @@ static int __init init_pmz(void)
 	 */
 	rc = pmz_register();
 	if (rc) {
-		printk(KERN_ERR 
+		printk(KERN_ERR
 			"pmac_zilog: Error registering serial device, disabling pmac_zilog.\n"
 			"pmac_zilog: Did another serial driver already claim the minors?\n");
 		/* effectively "pmz_unprobe()" */
@@ -2027,7 +2027,7 @@ static int __init pmz_console_setup(struct console *co, char *options)
 	pwr_delay = __pmz_startup(uap);
 	if (pwr_delay)
 		mdelay(pwr_delay);
-	
+
 	if (options)
 		uart_parse_options(options, &baud, &parity, &bits, &flow);
 
diff --git a/drivers/tty/serial/sa1100.c b/drivers/tty/serial/sa1100.c
index a399772be3fc..ef20d42c321c 100644
--- a/drivers/tty/serial/sa1100.c
+++ b/drivers/tty/serial/sa1100.c
@@ -436,7 +436,7 @@ sa1100_set_termios(struct uart_port *port, struct ktermios *termios,
 	/*
 	 * Ask the core to calculate the divisor for us.
 	 */
-	baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16); 
+	baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16);
 	quot = uart_get_divisor(port, baud);
 
 	spin_lock_irqsave(&sport->port.lock, flags);
diff --git a/drivers/tty/serial/sunsab.c b/drivers/tty/serial/sunsab.c
index 7744ed852d52..680df0e62bda 100644
--- a/drivers/tty/serial/sunsab.c
+++ b/drivers/tty/serial/sunsab.c
@@ -447,7 +447,7 @@ static void sunsab_start_tx(struct uart_port *port)
 
 	up->interrupt_mask1 &= ~(SAB82532_IMR1_ALLS|SAB82532_IMR1_XPR);
 	writeb(up->interrupt_mask1, &up->regs->w.imr1);
-	
+
 	if (!test_bit(SAB82532_XPR, &up->irqflags))
 		return;
 
@@ -554,7 +554,7 @@ static int sunsab_startup(struct uart_port *port)
 	(void) readb(&up->regs->r.isr1);
 
 	/*
-	 * Now, initialize the UART 
+	 * Now, initialize the UART
 	 */
 	writeb(0, &up->regs->w.ccr0);				/* power-down */
 	writeb(SAB82532_CCR0_MCE | SAB82532_CCR0_SC_NRZ |
@@ -568,7 +568,7 @@ static int sunsab_startup(struct uart_port *port)
 			   SAB82532_MODE_RAC);
 	writeb(up->cached_mode, &up->regs->w.mode);
 	writeb(SAB82532_RFC_DPS|SAB82532_RFC_RFTH_32, &up->regs->w.rfc);
-	
+
 	tmp = readb(&up->regs->rw.ccr0);
 	tmp |= SAB82532_CCR0_PU;	/* power-up */
 	writeb(tmp, &up->regs->rw.ccr0);
@@ -612,7 +612,7 @@ static void sunsab_shutdown(struct uart_port *port)
 	up->cached_dafo &= ~SAB82532_DAFO_XBRK;
 	writeb(up->cached_dafo, &up->regs->rw.dafo);
 
-	/* Disable Receiver */	
+	/* Disable Receiver */
 	up->cached_mode &= ~SAB82532_MODE_RAC;
 	writeb(up->cached_mode, &up->regs->rw.mode);
 
@@ -627,7 +627,7 @@ static void sunsab_shutdown(struct uart_port *port)
 	 * speed the chip was configured for when the port was open).
 	 */
 #if 0
-	/* Power Down */	
+	/* Power Down */
 	tmp = readb(&up->regs->rw.ccr0);
 	tmp &= ~SAB82532_CCR0_PU;
 	writeb(tmp, &up->regs->rw.ccr0);
@@ -797,7 +797,7 @@ static const char *sunsab_type(struct uart_port *port)
 {
 	struct uart_sunsab_port *up = (void *)port;
 	static char buf[36];
-	
+
 	sprintf(buf, "SAB82532 %s", sab82532_version[up->type]);
 	return buf;
 }
@@ -942,7 +942,7 @@ static int sunsab_console_setup(struct console *con, char *options)
 	sunsab_set_mctrl(&up->port, TIOCM_DTR | TIOCM_RTS);
 
 	spin_unlock_irqrestore(&up->port.lock, flags);
-	
+
 	return 0;
 }
 
diff --git a/drivers/tty/serial/sunsu.c b/drivers/tty/serial/sunsu.c
index 1a371c37a644..a2b9b963d521 100644
--- a/drivers/tty/serial/sunsu.c
+++ b/drivers/tty/serial/sunsu.c
@@ -913,7 +913,7 @@ sunsu_set_termios(struct uart_port *port, struct ktermios *termios,
 	/*
 	 * Ask the core to calculate the divisor for us.
 	 */
-	baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16); 
+	baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16);
 	quot = uart_get_divisor(port, baud);
 
 	sunsu_change_speed(port, termios->c_cflag, termios->c_iflag, quot);
@@ -1079,7 +1079,7 @@ static void sunsu_autoconfig(struct uart_sunsu_port *up)
 	save_mcr = serial_in(up, UART_MCR);
 	save_lcr = serial_in(up, UART_LCR);
 
-	/* 
+	/*
 	 * Check to see if a UART is really there.  Certain broken
 	 * internal modems based on the Rockwell chipset fail this
 	 * test, because they apparently don't implement the loopback
diff --git a/drivers/tty/serial/sunzilog.c b/drivers/tty/serial/sunzilog.c
index cb0dbff46db0..801856a2c2db 100644
--- a/drivers/tty/serial/sunzilog.c
+++ b/drivers/tty/serial/sunzilog.c
@@ -228,7 +228,7 @@ static int __load_zsregs(struct zilog_channel __iomem *channel, unsigned char *r
 	/* Lower and upper byte of baud rate generator divisor.  */
 	write_zsreg(channel, R12, regs[R12]);
 	write_zsreg(channel, R13, regs[R13]);
-	
+
 	/* Now rewrite R14, with BRENAB (if set).  */
 	write_zsreg(channel, R14, regs[R14]);
 
@@ -661,7 +661,7 @@ static void sunzilog_set_mctrl(struct uart_port *port, unsigned int mctrl)
 	else
 		clear_bits |= DTR;
 
-	/* NOTE: Not subject to 'transmitter active' rule.  */ 
+	/* NOTE: Not subject to 'transmitter active' rule.  */
 	up->curregs[R5] |= set_bits;
 	up->curregs[R5] &= ~clear_bits;
 	write_zsreg(channel, R5, up->curregs[R5]);
@@ -749,7 +749,7 @@ static void sunzilog_enable_ms(struct uart_port *port)
 	if (new_reg != up->curregs[R15]) {
 		up->curregs[R15] = new_reg;
 
-		/* NOTE: Not subject to 'transmitter active' rule.  */ 
+		/* NOTE: Not subject to 'transmitter active' rule.  */
 		write_zsreg(channel, R15, up->curregs[R15] & ~WR7pEN);
 	}
 }
@@ -776,7 +776,7 @@ static void sunzilog_break_ctl(struct uart_port *port, int break_state)
 	if (new_reg != up->curregs[R5]) {
 		up->curregs[R5] = new_reg;
 
-		/* NOTE: Not subject to 'transmitter active' rule.  */ 
+		/* NOTE: Not subject to 'transmitter active' rule.  */
 		write_zsreg(channel, R5, up->curregs[R5]);
 	}
 
diff --git a/drivers/tty/synclink.c b/drivers/tty/synclink.c
index fbdf4d01c6a9..1dec82fae106 100644
--- a/drivers/tty/synclink.c
+++ b/drivers/tty/synclink.c
@@ -21,7 +21,7 @@
  * contains exactly one complete HDLC frame. Calling mgsl_put_char
  * will start assembling an HDLC frame that will not be sent until
  * mgsl_flush_chars or mgsl_write is called.
- * 
+ *
  * Synchronous receive data is reported as complete frames. To accomplish
  * this, the TTY flip buffer is bypassed (too small to hold largest
  * frame and may fragment frames) and the line discipline
@@ -153,7 +153,7 @@ typedef struct _DMABUFFERENTRY
 #define IO_PIN_SHUTDOWN_LIMIT 100
 
 struct	_input_signal_events {
-	int	ri_up;	
+	int	ri_up;
 	int	ri_down;
 	int	dsr_up;
 	int	dsr_down;
@@ -174,29 +174,29 @@ struct tx_holding_buffer {
 /*
  * Device instance data structure
  */
- 
+
 struct mgsl_struct {
 	int			magic;
 	struct tty_port		port;
 	int			line;
 	int                     hw_version;
-	
+
 	struct mgsl_icount	icount;
-	
+
 	int			timeout;
 	int			x_char;		/* xon/xoff character */
 	u16			read_status_mask;
-	u16			ignore_status_mask;	
+	u16			ignore_status_mask;
 	unsigned char 		*xmit_buf;
 	int			xmit_head;
 	int			xmit_tail;
 	int			xmit_cnt;
-	
+
 	wait_queue_head_t	status_event_wait_q;
 	wait_queue_head_t	event_wait_q;
 	struct timer_list	tx_timer;	/* HDLC transmit timeout timer */
 	struct mgsl_struct	*next_device;	/* device list link */
-	
+
 	spinlock_t irq_spinlock;		/* spinlock for synchronizing with ISR */
 	struct work_struct task;		/* task structure for scheduling bh */
 
@@ -210,7 +210,7 @@ struct mgsl_struct {
 	bool bh_running;		/* Protection from multiple */
 	int isr_overflow;
 	bool bh_requested;
-	
+
 	int dcd_chkcount;		/* check counts to prevent */
 	int cts_chkcount;		/* too many IRQs if a signal */
 	int dsr_chkcount;		/* is floating */
@@ -230,7 +230,7 @@ struct mgsl_struct {
 	DMABUFFERENTRY *tx_buffer_list;	/* list of transmit buffer entries */
 	int start_tx_dma_buffer;	/* tx dma buffer to start tx dma operation */
 	int current_tx_buffer;          /* next tx dma buffer to be loaded */
-	
+
 	unsigned char *intermediate_rxbuffer;
 
 	int num_tx_holding_buffers;	/* number of tx holding buffer allocated */
@@ -259,11 +259,11 @@ struct mgsl_struct {
 	unsigned int io_base;		/* base I/O address of adapter */
 	unsigned int io_addr_size;	/* size of the I/O address range */
 	bool io_addr_requested;		/* true if I/O address requested */
-	
+
 	unsigned int irq_level;		/* interrupt level */
 	unsigned long irq_flags;
 	bool irq_requested;		/* true if IRQ requested */
-	
+
 	unsigned int dma_level;		/* DMA channel */
 	bool dma_requested;		/* true if dma channel requested */
 
@@ -295,7 +295,7 @@ struct mgsl_struct {
 
 	bool loopmode_insert_requested;
 	bool loopmode_send_done_requested;
-	
+
 	struct	_input_signal_events	input_signal_events;
 
 	/* generic HDLC device parts */
@@ -376,7 +376,7 @@ struct mgsl_struct {
 #define DCR	0x06	/* DMA Control Register (shared) */
 #define DACR	0x08	/* DMA Array count Register (shared) */
 #define BDCR	0x12	/* Burst/Dwell Control Register (shared) */
-#define DIVR	0x14	/* DMA Interrupt Vector Register (shared) */	
+#define DIVR	0x14	/* DMA Interrupt Vector Register (shared) */
 #define DICR	0x18	/* DMA Interrupt Control Register (shared) */
 #define CDIR	0x1a	/* Clear DMA Interrupt Register (shared) */
 #define SDIR	0x1c	/* Set DMA Interrupt Register (shared) */
@@ -486,7 +486,7 @@ struct mgsl_struct {
 /*
  * Bits for enabling and disabling IRQs in Interrupt Control Register (ICR)
  */
- 
+
 #define RECEIVE_STATUS		BIT5
 #define RECEIVE_DATA		BIT4
 #define TRANSMIT_STATUS		BIT3
@@ -516,7 +516,7 @@ struct mgsl_struct {
 #define usc_UnlatchRxstatusBits(a,b) usc_OutReg( (a), RCSR, (u16)((b) & RXSTATUS_ALL) )
 
 /*
- * Values for setting transmit idle mode in 
+ * Values for setting transmit idle mode in
  * Transmit Control/status Register (TCSR)
  */
 #define IDLEMODE_FLAGS			0x0000
@@ -552,7 +552,7 @@ struct mgsl_struct {
 #define TXSTATUS_FIFO_EMPTY		BIT0
 #define TXSTATUS_ALL			0x00fa
 #define usc_UnlatchTxstatusBits(a,b) usc_OutReg( (a), TCSR, (u16)((a)->tcsr_value + ((b) & 0x00FF)) )
-				
+
 
 #define MISCSTATUS_RXC_LATCHED		BIT15
 #define MISCSTATUS_RXC			BIT14
@@ -865,7 +865,7 @@ static int debug_level;
 static int maxframe[MAX_TOTAL_DEVICES];
 static int txdmabufs[MAX_TOTAL_DEVICES];
 static int txholdbufs[MAX_TOTAL_DEVICES];
-	
+
 module_param(break_on_load, bool, 0);
 module_param(ttymajor, int, 0);
 module_param_hw_array(io, int, ioport, NULL, 0);
@@ -967,7 +967,7 @@ static void ldisc_receive_buf(struct tty_struct *tty,
 }
 
 /* mgsl_stop()		throttle (stop) transmitter
- * 	
+ *
  * Arguments:		tty	pointer to tty info structure
  * Return Value:	None
  */
@@ -975,22 +975,22 @@ static void mgsl_stop(struct tty_struct *tty)
 {
 	struct mgsl_struct *info = tty->driver_data;
 	unsigned long flags;
-	
+
 	if (mgsl_paranoia_check(info, tty->name, "mgsl_stop"))
 		return;
-	
+
 	if ( debug_level >= DEBUG_LEVEL_INFO )
-		printk("mgsl_stop(%s)\n",info->device_name);	
-		
+		printk("mgsl_stop(%s)\n",info->device_name);
+
 	spin_lock_irqsave(&info->irq_spinlock,flags);
 	if (info->tx_enabled)
 	 	usc_stop_transmitter(info);
 	spin_unlock_irqrestore(&info->irq_spinlock,flags);
-	
+
 }	/* end of mgsl_stop() */
 
 /* mgsl_start()		release (start) transmitter
- * 	
+ *
  * Arguments:		tty	pointer to tty info structure
  * Return Value:	None
  */
@@ -998,18 +998,18 @@ static void mgsl_start(struct tty_struct *tty)
 {
 	struct mgsl_struct *info = tty->driver_data;
 	unsigned long flags;
-	
+
 	if (mgsl_paranoia_check(info, tty->name, "mgsl_start"))
 		return;
-	
+
 	if ( debug_level >= DEBUG_LEVEL_INFO )
-		printk("mgsl_start(%s)\n",info->device_name);	
-		
+		printk("mgsl_start(%s)\n",info->device_name);
+
 	spin_lock_irqsave(&info->irq_spinlock,flags);
 	if (!info->tx_enabled)
 	 	usc_start_transmitter(info);
 	spin_unlock_irqrestore(&info->irq_spinlock,flags);
-	
+
 }	/* end of mgsl_start() */
 
 /*
@@ -1023,7 +1023,7 @@ static int mgsl_bh_action(struct mgsl_struct *info)
 {
 	unsigned long flags;
 	int rc = 0;
-	
+
 	spin_lock_irqsave(&info->irq_spinlock,flags);
 
 	if (info->pending_bh & BH_RECEIVE) {
@@ -1042,9 +1042,9 @@ static int mgsl_bh_action(struct mgsl_struct *info)
 		info->bh_running = false;
 		info->bh_requested = false;
 	}
-	
+
 	spin_unlock_irqrestore(&info->irq_spinlock,flags);
-	
+
 	return rc;
 }
 
@@ -1060,18 +1060,18 @@ static void mgsl_bh_handler(struct work_struct *work)
 	if ( debug_level >= DEBUG_LEVEL_BH )
 		printk( "%s(%d):mgsl_bh_handler(%s) entry\n",
 			__FILE__,__LINE__,info->device_name);
-	
+
 	info->bh_running = true;
 
 	while((action = mgsl_bh_action(info)) != 0) {
-	
+
 		/* Process work item */
 		if ( debug_level >= DEBUG_LEVEL_BH )
 			printk( "%s(%d):mgsl_bh_handler() work item action=%d\n",
 				__FILE__,__LINE__,action);
 
 		switch (action) {
-		
+
 		case BH_RECEIVE:
 			mgsl_bh_receive(info);
 			break;
@@ -1101,7 +1101,7 @@ static void mgsl_bh_receive(struct mgsl_struct *info)
 	if ( debug_level >= DEBUG_LEVEL_BH )
 		printk( "%s(%d):mgsl_bh_receive(%s)\n",
 			__FILE__,__LINE__,info->device_name);
-	
+
 	do
 	{
 		if (info->rx_rcc_underrun) {
@@ -1118,7 +1118,7 @@ static void mgsl_bh_transmit(struct mgsl_struct *info)
 {
 	struct tty_struct *tty = info->port.tty;
 	unsigned long flags;
-	
+
 	if ( debug_level >= DEBUG_LEVEL_BH )
 		printk( "%s(%d):mgsl_bh_transmit() entry on %s\n",
 			__FILE__,__LINE__,info->device_name);
@@ -1148,7 +1148,7 @@ static void mgsl_bh_status(struct mgsl_struct *info)
 }
 
 /* mgsl_isr_receive_status()
- * 
+ *
  *	Service a receive status interrupt. The type of status
  *	interrupt is indicated by the state of the RCSR.
  *	This is only used for HDLC mode.
@@ -1163,18 +1163,18 @@ static void mgsl_isr_receive_status( struct mgsl_struct *info )
 	if ( debug_level >= DEBUG_LEVEL_ISR )
 		printk("%s(%d):mgsl_isr_receive_status status=%04X\n",
 			__FILE__,__LINE__,status);
-			
- 	if ( (status & RXSTATUS_ABORT_RECEIVED) && 
+
+	if ( (status & RXSTATUS_ABORT_RECEIVED) &&
 		info->loopmode_insert_requested &&
  		usc_loopmode_active(info) )
  	{
 		++info->icount.rxabort;
 	 	info->loopmode_insert_requested = false;
- 
+
  		/* clear CMR:13 to start echoing RxD to TxD */
 		info->cmr_value &= ~BIT13;
  		usc_OutReg(info, CMR, info->cmr_value);
- 
+
 		/* disable received abort irq (no longer required) */
 	 	usc_OutReg(info, RICR,
  			(usc_InReg(info, RICR) & ~RXSTATUS_ABORT_RECEIVED));
@@ -1199,12 +1199,12 @@ static void mgsl_isr_receive_status( struct mgsl_struct *info )
 }	/* end of mgsl_isr_receive_status() */
 
 /* mgsl_isr_transmit_status()
- * 
+ *
  * 	Service a transmit status interrupt
  *	HDLC mode :end of transmit frame
  *	Async mode:all data is sent
  * 	transmit status is indicated by bits in the TCSR.
- * 
+ *
  * Arguments:		info	       pointer to device instance data
  * Return Value:	None
  */
@@ -1212,13 +1212,13 @@ static void mgsl_isr_transmit_status( struct mgsl_struct *info )
 {
 	u16 status = usc_InReg( info, TCSR );
 
-	if ( debug_level >= DEBUG_LEVEL_ISR )	
+	if ( debug_level >= DEBUG_LEVEL_ISR )
 		printk("%s(%d):mgsl_isr_transmit_status status=%04X\n",
 			__FILE__,__LINE__,status);
-	
+
 	usc_ClearIrqPendingBits( info, TRANSMIT_STATUS );
 	usc_UnlatchTxstatusBits( info, status );
-	
+
 	if ( status & (TXSTATUS_UNDERRUN | TXSTATUS_ABORT_SENT) )
 	{
 		/* finished sending HDLC abort. This may leave	*/
@@ -1229,7 +1229,7 @@ static void mgsl_isr_transmit_status( struct mgsl_struct *info )
  		usc_DmaCmd( info, DmaCmd_ResetTxChannel );
  		usc_RTCmd( info, RTCmd_PurgeTxFifo );
 	}
- 
+
 	if ( status & TXSTATUS_EOF_SENT )
 		info->icount.txok++;
 	else if ( status & TXSTATUS_UNDERRUN )
@@ -1238,11 +1238,11 @@ static void mgsl_isr_transmit_status( struct mgsl_struct *info )
 		info->icount.txabort++;
 	else
 		info->icount.txunder++;
-			
+
 	info->tx_active = false;
 	info->xmit_cnt = info->xmit_head = info->xmit_tail = 0;
-	del_timer(&info->tx_timer);	
-	
+	del_timer(&info->tx_timer);
+
 	if ( info->drop_rts_on_tx_done ) {
 		usc_get_serial_signals( info );
 		if ( info->serial_signals & SerialSignal_RTS ) {
@@ -1255,7 +1255,7 @@ static void mgsl_isr_transmit_status( struct mgsl_struct *info )
 #if SYNCLINK_GENERIC_HDLC
 	if (info->netcount)
 		hdlcdev_tx_done(info);
-	else 
+	else
 #endif
 	{
 		if (info->port.tty->stopped || info->port.tty->hw_stopped) {
@@ -1268,10 +1268,10 @@ static void mgsl_isr_transmit_status( struct mgsl_struct *info )
 }	/* end of mgsl_isr_transmit_status() */
 
 /* mgsl_isr_io_pin()
- * 
+ *
  * 	Service an Input/Output pin interrupt. The type of
  * 	interrupt is indicated by bits in the MISR
- * 	
+ *
  * Arguments:		info	       pointer to device instance data
  * Return Value:	None
  */
@@ -1280,10 +1280,10 @@ static void mgsl_isr_io_pin( struct mgsl_struct *info )
  	struct	mgsl_icount *icount;
 	u16 status = usc_InReg( info, MISR );
 
-	if ( debug_level >= DEBUG_LEVEL_ISR )	
+	if ( debug_level >= DEBUG_LEVEL_ISR )
 		printk("%s(%d):mgsl_isr_io_pin status=%04X\n",
 			__FILE__,__LINE__,status);
-			
+
 	usc_ClearIrqPendingBits( info, IO_PIN );
 	usc_UnlatchIostatusBits( info, status );
 
@@ -1296,9 +1296,9 @@ static void mgsl_isr_io_pin( struct mgsl_struct *info )
 				usc_DisablestatusIrqs(info,SICR_RI);
 			icount->rng++;
 			if ( status & MISCSTATUS_RI )
-				info->input_signal_events.ri_up++;	
+				info->input_signal_events.ri_up++;
 			else
-				info->input_signal_events.ri_down++;	
+				info->input_signal_events.ri_down++;
 		}
 		if (status & MISCSTATUS_DSR_LATCHED) {
 			if ((info->dsr_chkcount)++ >= IO_PIN_SHUTDOWN_LIMIT)
@@ -1353,7 +1353,7 @@ static void mgsl_isr_io_pin( struct mgsl_struct *info )
 					tty_hangup(info->port.tty);
 			}
 		}
-	
+
 		if (tty_port_cts_enabled(&info->port) &&
 		     (status & MISCSTATUS_CTS_LATCHED) ) {
 			if (info->port.tty->hw_stopped) {
@@ -1378,7 +1378,7 @@ static void mgsl_isr_io_pin( struct mgsl_struct *info )
 	}
 
 	info->pending_bh |= BH_STATUS;
-	
+
 	/* for diagnostics set IRQ flag */
 	if ( status & MISCSTATUS_TXC_LATCHED ){
 		usc_OutReg( info, SICR,
@@ -1390,41 +1390,41 @@ static void mgsl_isr_io_pin( struct mgsl_struct *info )
 }	/* end of mgsl_isr_io_pin() */
 
 /* mgsl_isr_transmit_data()
- * 
+ *
  * 	Service a transmit data interrupt (async mode only).
- * 
+ *
  * Arguments:		info	pointer to device instance data
  * Return Value:	None
  */
 static void mgsl_isr_transmit_data( struct mgsl_struct *info )
 {
-	if ( debug_level >= DEBUG_LEVEL_ISR )	
+	if ( debug_level >= DEBUG_LEVEL_ISR )
 		printk("%s(%d):mgsl_isr_transmit_data xmit_cnt=%d\n",
 			__FILE__,__LINE__,info->xmit_cnt);
-			
+
 	usc_ClearIrqPendingBits( info, TRANSMIT_DATA );
-	
+
 	if (info->port.tty->stopped || info->port.tty->hw_stopped) {
 		usc_stop_transmitter(info);
 		return;
 	}
-	
+
 	if ( info->xmit_cnt )
 		usc_load_txfifo( info );
 	else
 		info->tx_active = false;
-		
+
 	if (info->xmit_cnt < WAKEUP_CHARS)
 		info->pending_bh |= BH_TRANSMIT;
 
 }	/* end of mgsl_isr_transmit_data() */
 
 /* mgsl_isr_receive_data()
- * 
+ *
  * 	Service a receive data interrupt. This occurs
  * 	when operating in asynchronous interrupt transfer mode.
- *	The receive data FIFO is flushed to the receive data buffers. 
- * 
+ *	The receive data FIFO is flushed to the receive data buffers.
+ *
  * Arguments:		info		pointer to device instance data
  * Return Value:	None
  */
@@ -1435,13 +1435,13 @@ static void mgsl_isr_receive_data( struct mgsl_struct *info )
 	int work = 0;
 	unsigned char DataByte;
  	struct	mgsl_icount *icount = &info->icount;
-	
-	if ( debug_level >= DEBUG_LEVEL_ISR )	
+
+	if ( debug_level >= DEBUG_LEVEL_ISR )
 		printk("%s(%d):mgsl_isr_receive_data\n",
 			__FILE__,__LINE__);
 
 	usc_ClearIrqPendingBits( info, RECEIVE_DATA );
-	
+
 	/* select FIFO status for RICR readback */
 	usc_RCmd( info, RCmd_SelectRicrRxFifostatus );
 
@@ -1464,9 +1464,9 @@ static void mgsl_isr_receive_data( struct mgsl_struct *info )
 		if ( status & (RXSTATUS_FRAMING_ERROR | RXSTATUS_PARITY_ERROR |
 				RXSTATUS_OVERRUN | RXSTATUS_BREAK_RECEIVED) )
 			usc_UnlatchRxstatusBits(info,RXSTATUS_ALL);
-		
+
 		icount->rx++;
-		
+
 		flag = 0;
 		if ( status & (RXSTATUS_FRAMING_ERROR | RXSTATUS_PARITY_ERROR |
 				RXSTATUS_OVERRUN | RXSTATUS_BREAK_RECEIVED) ) {
@@ -1489,9 +1489,9 @@ static void mgsl_isr_receive_data( struct mgsl_struct *info )
 			/* discard char if tty control flags say so */
 			if (status & info->ignore_status_mask)
 				continue;
-				
+
 			status &= info->read_status_mask;
-		
+
 			if (status & RXSTATUS_BREAK_RECEIVED) {
 				flag = TTY_BREAK;
 				if (info->port.flags & ASYNC_SAK)
@@ -1516,15 +1516,15 @@ static void mgsl_isr_receive_data( struct mgsl_struct *info )
 			__FILE__,__LINE__,icount->rx,icount->brk,
 			icount->parity,icount->frame,icount->overrun);
 	}
-			
+
 	if(work)
 		tty_flip_buffer_push(&info->port);
 }
 
 /* mgsl_isr_misc()
- * 
+ *
  * 	Service a miscellaneous interrupt source.
- * 	
+ *
  * Arguments:		info		pointer to device extension (instance data)
  * Return Value:	None
  */
@@ -1532,10 +1532,10 @@ static void mgsl_isr_misc( struct mgsl_struct *info )
 {
 	u16 status = usc_InReg( info, MISR );
 
-	if ( debug_level >= DEBUG_LEVEL_ISR )	
+	if ( debug_level >= DEBUG_LEVEL_ISR )
 		printk("%s(%d):mgsl_isr_misc status=%04X\n",
 			__FILE__,__LINE__,status);
-			
+
 	if ((status & MISCSTATUS_RCC_UNDERRUN) &&
 	    (info->params.mode == MGSL_MODE_HDLC)) {
 
@@ -1560,7 +1560,7 @@ static void mgsl_isr_misc( struct mgsl_struct *info )
  *
  * 	Services undefined interrupt vectors from the
  * 	USC. (hence this function SHOULD never be called)
- * 
+ *
  * Arguments:		info		pointer to device extension (instance data)
  * Return Value:	None
  */
@@ -1570,28 +1570,28 @@ static void mgsl_isr_null( struct mgsl_struct *info )
 }	/* end of mgsl_isr_null() */
 
 /* mgsl_isr_receive_dma()
- * 
+ *
  * 	Service a receive DMA channel interrupt.
  * 	For this driver there are two sources of receive DMA interrupts
  * 	as identified in the Receive DMA mode Register (RDMR):
- * 
+ *
  * 	BIT3	EOA/EOL		End of List, all receive buffers in receive
  * 				buffer list have been filled (no more free buffers
  * 				available). The DMA controller has shut down.
- * 
+ *
  * 	BIT2	EOB		End of Buffer. This interrupt occurs when a receive
  * 				DMA buffer is terminated in response to completion
  * 				of a good frame or a frame with errors. The status
  * 				of the frame is stored in the buffer entry in the
  * 				list of receive buffer entries.
- * 
+ *
  * Arguments:		info		pointer to device instance data
  * Return Value:	None
  */
 static void mgsl_isr_receive_dma( struct mgsl_struct *info )
 {
 	u16 status;
-	
+
 	/* clear interrupt pending and IUS bit for Rx DMA IRQ */
 	usc_OutDmaReg( info, CDIR, BIT9 | BIT1 );
 
@@ -1599,12 +1599,12 @@ static void mgsl_isr_receive_dma( struct mgsl_struct *info )
 	/* This also clears the status bits. */
 	status = usc_InDmaReg( info, RDMR );
 
-	if ( debug_level >= DEBUG_LEVEL_ISR )	
+	if ( debug_level >= DEBUG_LEVEL_ISR )
 		printk("%s(%d):mgsl_isr_receive_dma(%s) status=%04X\n",
 			__FILE__,__LINE__,info->device_name,status);
-			
+
 	info->pending_bh |= BH_RECEIVE;
-	
+
 	if ( status & BIT3 ) {
 		info->rx_overflow = true;
 		info->icount.buf_overrun++;
@@ -1665,14 +1665,14 @@ static void mgsl_isr_transmit_dma( struct mgsl_struct *info )
 }	/* end of mgsl_isr_transmit_dma() */
 
 /* mgsl_interrupt()
- * 
+ *
  * 	Interrupt service routine entry point.
- * 	
+ *
  * Arguments:
- * 
+ *
  * 	irq		interrupt number that caused interrupt
  * 	dev_id		device ID supplied during interrupt registration
- * 	
+ *
  * Return Value: None
  */
 static irqreturn_t mgsl_interrupt(int dummy, void *dev_id)
@@ -1681,7 +1681,7 @@ static irqreturn_t mgsl_interrupt(int dummy, void *dev_id)
 	u16 UscVector;
 	u16 DmaVector;
 
-	if ( debug_level >= DEBUG_LEVEL_ISR )	
+	if ( debug_level >= DEBUG_LEVEL_ISR )
 		printk(KERN_DEBUG "%s(%d):mgsl_interrupt(%d)entry.\n",
 			__FILE__, __LINE__, info->irq_level);
 
@@ -1691,14 +1691,14 @@ static irqreturn_t mgsl_interrupt(int dummy, void *dev_id)
 		/* Read the interrupt vectors from hardware. */
 		UscVector = usc_InReg(info, IVR) >> 9;
 		DmaVector = usc_InDmaReg(info, DIVR);
-		
-		if ( debug_level >= DEBUG_LEVEL_ISR )	
+
+		if ( debug_level >= DEBUG_LEVEL_ISR )
 			printk("%s(%d):%s UscVector=%08X DmaVector=%08X\n",
 				__FILE__,__LINE__,info->device_name,UscVector,DmaVector);
-			
+
 		if ( !UscVector && !DmaVector )
 			break;
-			
+
 		/* Dispatch interrupt vector */
 		if ( UscVector )
 			(*UscIsrTable[UscVector])(info);
@@ -1715,13 +1715,13 @@ static irqreturn_t mgsl_interrupt(int dummy, void *dev_id)
 			break;
 		}
 	}
-	
-	/* Request bottom half processing if there's something 
+
+	/* Request bottom half processing if there's something
 	 * for it to do and the bh is not already running
 	 */
 
 	if ( info->pending_bh && !info->bh_running && !info->bh_requested ) {
-		if ( debug_level >= DEBUG_LEVEL_ISR )	
+		if ( debug_level >= DEBUG_LEVEL_ISR )
 			printk("%s(%d):%s queueing bh task.\n",
 				__FILE__,__LINE__,info->device_name);
 		schedule_work(&info->task);
@@ -1729,8 +1729,8 @@ static irqreturn_t mgsl_interrupt(int dummy, void *dev_id)
 	}
 
 	spin_unlock(&info->irq_spinlock);
-	
-	if ( debug_level >= DEBUG_LEVEL_ISR )	
+
+	if ( debug_level >= DEBUG_LEVEL_ISR )
 		printk(KERN_DEBUG "%s(%d):mgsl_interrupt(%d)exit.\n",
 			__FILE__, __LINE__, info->irq_level);
 
@@ -1738,9 +1738,9 @@ static irqreturn_t mgsl_interrupt(int dummy, void *dev_id)
 }	/* end of mgsl_interrupt() */
 
 /* startup()
- * 
+ *
  * 	Initialize and start device.
- * 	
+ *
  * Arguments:		info	pointer to device instance data
  * Return Value:	0 if success, otherwise error code
  */
@@ -1765,18 +1765,18 @@ static int startup(struct mgsl_struct * info)
 	}
 
 	info->pending_bh = 0;
-	
+
 	memset(&info->icount, 0, sizeof(info->icount));
 
 	timer_setup(&info->tx_timer, mgsl_tx_timeout, 0);
-	
+
 	/* Allocate and claim adapter resources */
 	retval = mgsl_claim_resources(info);
-	
+
 	/* perform existence check and diagnostics */
 	if ( !retval )
 		retval = mgsl_adapter_test(info);
-		
+
 	if ( retval ) {
   		if (capable(CAP_SYS_ADMIN) && info->port.tty)
 			set_bit(TTY_IO_ERROR, &info->port.tty->flags);
@@ -1863,20 +1863,20 @@ static void mgsl_program_hw(struct mgsl_struct *info)
 	unsigned long flags;
 
 	spin_lock_irqsave(&info->irq_spinlock,flags);
-	
+
 	usc_stop_receiver(info);
 	usc_stop_transmitter(info);
 	info->xmit_cnt = info->xmit_head = info->xmit_tail = 0;
-	
+
 	if (info->params.mode == MGSL_MODE_HDLC ||
 	    info->params.mode == MGSL_MODE_RAW ||
 	    info->netcount)
 		usc_set_sync_mode(info);
 	else
 		usc_set_async_mode(info);
-		
+
 	usc_set_serial_signals(info);
-	
+
 	info->dcd_chkcount = 0;
 	info->cts_chkcount = 0;
 	info->ri_chkcount = 0;
@@ -1885,10 +1885,10 @@ static void mgsl_program_hw(struct mgsl_struct *info)
 	usc_EnableStatusIrqs(info,SICR_CTS+SICR_DSR+SICR_DCD+SICR_RI);
 	usc_EnableInterrupts(info, IO_PIN);
 	usc_get_serial_signals(info);
-		
+
 	if (info->netcount || info->port.tty->termios.c_cflag & CREAD)
 		usc_start_receiver(info);
-		
+
 	spin_unlock_irqrestore(&info->irq_spinlock,flags);
 }
 
@@ -1901,11 +1901,11 @@ static void mgsl_change_params(struct mgsl_struct *info)
 
 	if (!info->port.tty)
 		return;
-		
+
 	if (debug_level >= DEBUG_LEVEL_INFO)
 		printk("%s(%d):mgsl_change_params(%s)\n",
 			 __FILE__,__LINE__, info->device_name );
-			 
+
 	cflag = info->port.tty->termios.c_cflag;
 
 	/* if B0 rate (hangup) specified then negate RTS and DTR */
@@ -1914,9 +1914,9 @@ static void mgsl_change_params(struct mgsl_struct *info)
 		info->serial_signals |= SerialSignal_RTS | SerialSignal_DTR;
 	else
 		info->serial_signals &= ~(SerialSignal_RTS | SerialSignal_DTR);
-	
+
 	/* byte size and parity */
-	
+
 	switch (cflag & CSIZE) {
 	      case CS5: info->params.data_bits = 5; break;
 	      case CS6: info->params.data_bits = 6; break;
@@ -1925,7 +1925,7 @@ static void mgsl_change_params(struct mgsl_struct *info)
 	      /* Never happens, but GCC is too dumb to figure it out */
 	      default:  info->params.data_bits = 7; break;
 	      }
-	      
+
 	if (cflag & CSTOPB)
 		info->params.stop_bits = 2;
 	else
@@ -1946,7 +1946,7 @@ static void mgsl_change_params(struct mgsl_struct *info)
 	/* calculate number of jiffies to transmit a full
 	 * FIFO (32 bytes) at specified data rate
 	 */
-	bits_per_char = info->params.data_bits + 
+	bits_per_char = info->params.data_bits +
 			info->params.stop_bits + 1;
 
 	/* if port data rate is set to 460800 or less then
@@ -1955,9 +1955,9 @@ static void mgsl_change_params(struct mgsl_struct *info)
 	 */
 	if (info->params.data_rate <= 460800)
 		info->params.data_rate = tty_get_baud_rate(info->port.tty);
-	
+
 	if ( info->params.data_rate ) {
-		info->timeout = (32*HZ*bits_per_char) / 
+		info->timeout = (32*HZ*bits_per_char) /
 				info->params.data_rate;
 	}
 	info->timeout += HZ/50;		/* Add .02 seconds of slop */
@@ -1966,18 +1966,18 @@ static void mgsl_change_params(struct mgsl_struct *info)
 	tty_port_set_check_carrier(&info->port, ~cflag & CLOCAL);
 
 	/* process tty input control flags */
-	
+
 	info->read_status_mask = RXSTATUS_OVERRUN;
 	if (I_INPCK(info->port.tty))
 		info->read_status_mask |= RXSTATUS_PARITY_ERROR | RXSTATUS_FRAMING_ERROR;
  	if (I_BRKINT(info->port.tty) || I_PARMRK(info->port.tty))
  		info->read_status_mask |= RXSTATUS_BREAK_RECEIVED;
-	
+
 	if (I_IGNPAR(info->port.tty))
 		info->ignore_status_mask |= RXSTATUS_PARITY_ERROR | RXSTATUS_FRAMING_ERROR;
 	if (I_IGNBRK(info->port.tty)) {
 		info->ignore_status_mask |= RXSTATUS_BREAK_RECEIVED;
-		/* If ignoring parity and break indicators, ignore 
+		/* If ignoring parity and break indicators, ignore
 		 * overruns too.  (For real raw support).
 		 */
 		if (I_IGNPAR(info->port.tty))
@@ -1989,12 +1989,12 @@ static void mgsl_change_params(struct mgsl_struct *info)
 }	/* end of mgsl_change_params() */
 
 /* mgsl_put_char()
- * 
+ *
  * 	Add a character to the transmit buffer.
- * 	
+ *
  * Arguments:		tty	pointer to tty information structure
  * 			ch	character to add to transmit buffer
- * 		
+ *
  * Return Value:	None
  */
 static int mgsl_put_char(struct tty_struct *tty, unsigned char ch)
@@ -2006,8 +2006,8 @@ static int mgsl_put_char(struct tty_struct *tty, unsigned char ch)
 	if (debug_level >= DEBUG_LEVEL_INFO) {
 		printk(KERN_DEBUG "%s(%d):mgsl_put_char(%d) on %s\n",
 			__FILE__, __LINE__, ch, info->device_name);
-	}		
-	
+	}
+
 	if (mgsl_paranoia_check(info, tty->name, "mgsl_put_char"))
 		return 0;
 
@@ -2015,7 +2015,7 @@ static int mgsl_put_char(struct tty_struct *tty, unsigned char ch)
 		return 0;
 
 	spin_lock_irqsave(&info->irq_spinlock, flags);
-	
+
 	if ((info->params.mode == MGSL_MODE_ASYNC ) || !info->tx_active) {
 		if (info->xmit_cnt < SERIAL_XMIT_SIZE - 1) {
 			info->xmit_buf[info->xmit_head++] = ch;
@@ -2026,14 +2026,14 @@ static int mgsl_put_char(struct tty_struct *tty, unsigned char ch)
 	}
 	spin_unlock_irqrestore(&info->irq_spinlock, flags);
 	return ret;
-	
+
 }	/* end of mgsl_put_char() */
 
 /* mgsl_flush_chars()
- * 
+ *
  * 	Enable transmitter so remaining characters in the
  * 	transmit buffer are sent.
- * 	
+ *
  * Arguments:		tty	pointer to tty information structure
  * Return Value:	None
  */
@@ -2041,11 +2041,11 @@ static void mgsl_flush_chars(struct tty_struct *tty)
 {
 	struct mgsl_struct *info = tty->driver_data;
 	unsigned long flags;
-				
+
 	if ( debug_level >= DEBUG_LEVEL_INFO )
 		printk( "%s(%d):mgsl_flush_chars() entry on %s xmit_cnt=%d\n",
 			__FILE__,__LINE__,info->device_name,info->xmit_cnt);
-	
+
 	if (mgsl_paranoia_check(info, tty->name, "mgsl_flush_chars"))
 		return;
 
@@ -2058,7 +2058,7 @@ static void mgsl_flush_chars(struct tty_struct *tty)
 			__FILE__,__LINE__,info->device_name );
 
 	spin_lock_irqsave(&info->irq_spinlock,flags);
-	
+
 	if (!info->tx_active) {
 		if ( (info->params.mode == MGSL_MODE_HDLC ||
 			info->params.mode == MGSL_MODE_RAW) && info->xmit_cnt ) {
@@ -2070,21 +2070,21 @@ static void mgsl_flush_chars(struct tty_struct *tty)
 		}
 	 	usc_start_transmitter(info);
 	}
-	
+
 	spin_unlock_irqrestore(&info->irq_spinlock,flags);
-	
+
 }	/* end of mgsl_flush_chars() */
 
 /* mgsl_write()
- * 
+ *
  * 	Send a block of data
- * 	
+ *
  * Arguments:
- * 
+ *
  * 	tty		pointer to tty information structure
  * 	buf		pointer to buffer containing send data
  * 	count		size of send data in bytes
- * 	
+ *
  * Return Value:	number of characters written
  */
 static int mgsl_write(struct tty_struct * tty,
@@ -2093,11 +2093,11 @@ static int mgsl_write(struct tty_struct * tty,
 	int	c, ret = 0;
 	struct mgsl_struct *info = tty->driver_data;
 	unsigned long flags;
-	
+
 	if ( debug_level >= DEBUG_LEVEL_INFO )
 		printk( "%s(%d):mgsl_write(%s) count=%d\n",
 			__FILE__,__LINE__,info->device_name,count);
-	
+
 	if (mgsl_paranoia_check(info, tty->name, "mgsl_write"))
 		goto cleanup;
 
@@ -2136,7 +2136,7 @@ static int mgsl_write(struct tty_struct * tty,
 			spin_unlock_irqrestore(&info->irq_spinlock,flags);
 			goto cleanup;
 		}
-	
+
 		/* if operating in HDLC LoopMode and the adapter  */
 		/* has yet to be inserted into the loop, we can't */
 		/* transmit					  */
@@ -2152,7 +2152,7 @@ static int mgsl_write(struct tty_struct * tty,
 			/* Send accumulated from send_char() calls */
 			/* as frame and wait before accepting more data. */
 			ret = 0;
-			
+
 			/* copy data from circular xmit_buf to */
 			/* transmit DMA buffer. */
 			mgsl_load_tx_dma_buffer(info,
@@ -2187,27 +2187,27 @@ static int mgsl_write(struct tty_struct * tty,
 			count -= c;
 			ret += c;
 		}
-	}	
-	
+	}
+
  	if (info->xmit_cnt && !tty->stopped && !tty->hw_stopped) {
 		spin_lock_irqsave(&info->irq_spinlock,flags);
 		if (!info->tx_active)
 		 	usc_start_transmitter(info);
 		spin_unlock_irqrestore(&info->irq_spinlock,flags);
  	}
-cleanup:	
+cleanup:
 	if ( debug_level >= DEBUG_LEVEL_INFO )
 		printk( "%s(%d):mgsl_write(%s) returning=%d\n",
 			__FILE__,__LINE__,info->device_name,ret);
-			
+
 	return ret;
-	
+
 }	/* end of mgsl_write() */
 
 /* mgsl_write_room()
  *
  *	Return the count of free bytes in transmit buffer
- * 	
+ *
  * Arguments:		tty	pointer to tty info structure
  * Return Value:	None
  */
@@ -2215,17 +2215,17 @@ static int mgsl_write_room(struct tty_struct *tty)
 {
 	struct mgsl_struct *info = tty->driver_data;
 	int	ret;
-				
+
 	if (mgsl_paranoia_check(info, tty->name, "mgsl_write_room"))
 		return 0;
 	ret = SERIAL_XMIT_SIZE - info->xmit_cnt - 1;
 	if (ret < 0)
 		ret = 0;
-		
+
 	if (debug_level >= DEBUG_LEVEL_INFO)
 		printk("%s(%d):mgsl_write_room(%s)=%d\n",
 			 __FILE__,__LINE__, info->device_name,ret );
-			 
+
 	if ( info->params.mode == MGSL_MODE_HDLC ||
 		info->params.mode == MGSL_MODE_RAW ) {
 		/* operating in synchronous (frame oriented) mode */
@@ -2234,33 +2234,33 @@ static int mgsl_write_room(struct tty_struct *tty)
 		else
 			return HDLC_MAX_FRAME_SIZE;
 	}
-	
+
 	return ret;
-	
+
 }	/* end of mgsl_write_room() */
 
 /* mgsl_chars_in_buffer()
  *
  *	Return the count of bytes in transmit buffer
- * 	
+ *
  * Arguments:		tty	pointer to tty info structure
  * Return Value:	None
  */
 static int mgsl_chars_in_buffer(struct tty_struct *tty)
 {
 	struct mgsl_struct *info = tty->driver_data;
-			 
+
 	if (debug_level >= DEBUG_LEVEL_INFO)
 		printk("%s(%d):mgsl_chars_in_buffer(%s)\n",
 			 __FILE__,__LINE__, info->device_name );
-			 
+
 	if (mgsl_paranoia_check(info, tty->name, "mgsl_chars_in_buffer"))
 		return 0;
-		
+
 	if (debug_level >= DEBUG_LEVEL_INFO)
 		printk("%s(%d):mgsl_chars_in_buffer(%s)=%d\n",
 			 __FILE__,__LINE__, info->device_name,info->xmit_cnt );
-			 
+
 	if ( info->params.mode == MGSL_MODE_HDLC ||
 		info->params.mode == MGSL_MODE_RAW ) {
 		/* operating in synchronous (frame oriented) mode */
@@ -2269,14 +2269,14 @@ static int mgsl_chars_in_buffer(struct tty_struct *tty)
 		else
 			return 0;
 	}
-			 
+
 	return info->xmit_cnt;
 }	/* end of mgsl_chars_in_buffer() */
 
 /* mgsl_flush_buffer()
  *
  *	Discard all data in the send buffer
- * 	
+ *
  * Arguments:		tty	pointer to tty info structure
  * Return Value:	None
  */
@@ -2284,26 +2284,26 @@ static void mgsl_flush_buffer(struct tty_struct *tty)
 {
 	struct mgsl_struct *info = tty->driver_data;
 	unsigned long flags;
-	
+
 	if (debug_level >= DEBUG_LEVEL_INFO)
 		printk("%s(%d):mgsl_flush_buffer(%s) entry\n",
 			 __FILE__,__LINE__, info->device_name );
-	
+
 	if (mgsl_paranoia_check(info, tty->name, "mgsl_flush_buffer"))
 		return;
-		
-	spin_lock_irqsave(&info->irq_spinlock,flags); 
+
+	spin_lock_irqsave(&info->irq_spinlock,flags);
 	info->xmit_cnt = info->xmit_head = info->xmit_tail = 0;
-	del_timer(&info->tx_timer);	
+	del_timer(&info->tx_timer);
 	spin_unlock_irqrestore(&info->irq_spinlock,flags);
-	
+
 	tty_wakeup(tty);
 }
 
 /* mgsl_send_xchar()
  *
  *	Send a high-priority XON/XOFF character
- * 	
+ *
  * Arguments:		tty	pointer to tty info structure
  *			ch	character to send
  * Return Value:	None
@@ -2316,7 +2316,7 @@ static void mgsl_send_xchar(struct tty_struct *tty, char ch)
 	if (debug_level >= DEBUG_LEVEL_INFO)
 		printk("%s(%d):mgsl_send_xchar(%s,%d)\n",
 			 __FILE__,__LINE__, info->device_name, ch );
-			 
+
 	if (mgsl_paranoia_check(info, tty->name, "mgsl_send_xchar"))
 		return;
 
@@ -2331,9 +2331,9 @@ static void mgsl_send_xchar(struct tty_struct *tty, char ch)
 }	/* end of mgsl_send_xchar() */
 
 /* mgsl_throttle()
- * 
+ *
  * 	Signal remote device to throttle send data (our receive data)
- * 	
+ *
  * Arguments:		tty	pointer to tty info structure
  * Return Value:	None
  */
@@ -2341,14 +2341,14 @@ static void mgsl_throttle(struct tty_struct * tty)
 {
 	struct mgsl_struct *info = tty->driver_data;
 	unsigned long flags;
-	
+
 	if (debug_level >= DEBUG_LEVEL_INFO)
 		printk("%s(%d):mgsl_throttle(%s) entry\n",
 			 __FILE__,__LINE__, info->device_name );
 
 	if (mgsl_paranoia_check(info, tty->name, "mgsl_throttle"))
 		return;
-	
+
 	if (I_IXOFF(tty))
 		mgsl_send_xchar(tty, STOP_CHAR(tty));
 
@@ -2361,9 +2361,9 @@ static void mgsl_throttle(struct tty_struct * tty)
 }	/* end of mgsl_throttle() */
 
 /* mgsl_unthrottle()
- * 
+ *
  * 	Signal remote device to stop throttling send data (our receive data)
- * 	
+ *
  * Arguments:		tty	pointer to tty info structure
  * Return Value:	None
  */
@@ -2371,14 +2371,14 @@ static void mgsl_unthrottle(struct tty_struct * tty)
 {
 	struct mgsl_struct *info = tty->driver_data;
 	unsigned long flags;
-	
+
 	if (debug_level >= DEBUG_LEVEL_INFO)
 		printk("%s(%d):mgsl_unthrottle(%s) entry\n",
 			 __FILE__,__LINE__, info->device_name );
 
 	if (mgsl_paranoia_check(info, tty->name, "mgsl_unthrottle"))
 		return;
-	
+
 	if (I_IXOFF(tty)) {
 		if (info->x_char)
 			info->x_char = 0;
@@ -2392,26 +2392,26 @@ static void mgsl_unthrottle(struct tty_struct * tty)
 	 	usc_set_serial_signals(info);
 		spin_unlock_irqrestore(&info->irq_spinlock,flags);
 	}
-	
+
 }	/* end of mgsl_unthrottle() */
 
 /* mgsl_get_stats()
- * 
+ *
  * 	get the current serial parameters information
  *
  * Arguments:	info		pointer to device instance data
  * 		user_icount	pointer to buffer to hold returned stats
- * 	
+ *
  * Return Value:	0 if success, otherwise error code
  */
 static int mgsl_get_stats(struct mgsl_struct * info, struct mgsl_icount __user *user_icount)
 {
 	int err;
-	
+
 	if (debug_level >= DEBUG_LEVEL_INFO)
 		printk("%s(%d):mgsl_get_params(%s)\n",
 			 __FILE__,__LINE__, info->device_name);
-			
+
 	if (!user_icount) {
 		memset(&info->icount, 0, sizeof(info->icount));
 	} else {
@@ -2421,18 +2421,18 @@ static int mgsl_get_stats(struct mgsl_struct * info, struct mgsl_icount __user *
 		if (err)
 			return -EFAULT;
 	}
-	
+
 	return 0;
-	
+
 }	/* end of mgsl_get_stats() */
 
 /* mgsl_get_params()
- * 
+ *
  * 	get the current serial parameters information
  *
  * Arguments:	info		pointer to device instance data
  * 		user_params	pointer to buffer to hold returned params
- * 	
+ *
  * Return Value:	0 if success, otherwise error code
  */
 static int mgsl_get_params(struct mgsl_struct * info, MGSL_PARAMS __user *user_params)
@@ -2441,7 +2441,7 @@ static int mgsl_get_params(struct mgsl_struct * info, MGSL_PARAMS __user *user_p
 	if (debug_level >= DEBUG_LEVEL_INFO)
 		printk("%s(%d):mgsl_get_params(%s)\n",
 			 __FILE__,__LINE__, info->device_name);
-			
+
 	mutex_lock(&info->port.mutex);
 	COPY_TO_USER(err,user_params, &info->params, sizeof(MGSL_PARAMS));
 	mutex_unlock(&info->port.mutex);
@@ -2451,17 +2451,17 @@ static int mgsl_get_params(struct mgsl_struct * info, MGSL_PARAMS __user *user_p
 				__FILE__,__LINE__,info->device_name);
 		return -EFAULT;
 	}
-	
+
 	return 0;
-	
+
 }	/* end of mgsl_get_params() */
 
 /* mgsl_set_params()
- * 
+ *
  * 	set the serial parameters
- * 	
+ *
  * Arguments:
- * 
+ *
  * 	info		pointer to device instance data
  * 	new_params	user buffer containing new serial params
  *
@@ -2472,7 +2472,7 @@ static int mgsl_set_params(struct mgsl_struct * info, MGSL_PARAMS __user *new_pa
  	unsigned long flags;
 	MGSL_PARAMS tmp_params;
 	int err;
- 
+
 	if (debug_level >= DEBUG_LEVEL_INFO)
 		printk("%s(%d):mgsl_set_params %s\n", __FILE__,__LINE__,
 			info->device_name );
@@ -2483,36 +2483,36 @@ static int mgsl_set_params(struct mgsl_struct * info, MGSL_PARAMS __user *new_pa
 				__FILE__,__LINE__,info->device_name);
 		return -EFAULT;
 	}
-	
+
 	mutex_lock(&info->port.mutex);
 	spin_lock_irqsave(&info->irq_spinlock,flags);
 	memcpy(&info->params,&tmp_params,sizeof(MGSL_PARAMS));
 	spin_unlock_irqrestore(&info->irq_spinlock,flags);
-	
+
  	mgsl_change_params(info);
 	mutex_unlock(&info->port.mutex);
-	
+
 	return 0;
-	
+
 }	/* end of mgsl_set_params() */
 
 /* mgsl_get_txidle()
- * 
+ *
  * 	get the current transmit idle mode
  *
  * Arguments:	info		pointer to device instance data
  * 		idle_mode	pointer to buffer to hold returned idle mode
- * 	
+ *
  * Return Value:	0 if success, otherwise error code
  */
 static int mgsl_get_txidle(struct mgsl_struct * info, int __user *idle_mode)
 {
 	int err;
-	
+
 	if (debug_level >= DEBUG_LEVEL_INFO)
 		printk("%s(%d):mgsl_get_txidle(%s)=%d\n",
 			 __FILE__,__LINE__, info->device_name, info->idle_mode);
-			
+
 	COPY_TO_USER(err,idle_mode, &info->idle_mode, sizeof(int));
 	if (err) {
 		if ( debug_level >= DEBUG_LEVEL_INFO )
@@ -2520,13 +2520,13 @@ static int mgsl_get_txidle(struct mgsl_struct * info, int __user *idle_mode)
 				__FILE__,__LINE__,info->device_name);
 		return -EFAULT;
 	}
-	
+
 	return 0;
-	
+
 }	/* end of mgsl_get_txidle() */
 
 /* mgsl_set_txidle()	service ioctl to set transmit idle mode
- * 	
+ *
  * Arguments:	 	info		pointer to device instance data
  * 			idle_mode	new idle mode
  *
@@ -2535,25 +2535,25 @@ static int mgsl_get_txidle(struct mgsl_struct * info, int __user *idle_mode)
 static int mgsl_set_txidle(struct mgsl_struct * info, int idle_mode)
 {
  	unsigned long flags;
- 
+
 	if (debug_level >= DEBUG_LEVEL_INFO)
 		printk("%s(%d):mgsl_set_txidle(%s,%d)\n", __FILE__,__LINE__,
 			info->device_name, idle_mode );
-			
+
 	spin_lock_irqsave(&info->irq_spinlock,flags);
 	info->idle_mode = idle_mode;
 	usc_set_txidle( info );
 	spin_unlock_irqrestore(&info->irq_spinlock,flags);
 	return 0;
-	
+
 }	/* end of mgsl_set_txidle() */
 
 /* mgsl_txenable()
- * 
+ *
  * 	enable or disable the transmitter
- * 	
+ *
  * Arguments:
- * 
+ *
  * 	info		pointer to device instance data
  * 	enable		1 = enable, 0 = disable
  *
@@ -2562,11 +2562,11 @@ static int mgsl_set_txidle(struct mgsl_struct * info, int idle_mode)
 static int mgsl_txenable(struct mgsl_struct * info, int enable)
 {
  	unsigned long flags;
- 
+
 	if (debug_level >= DEBUG_LEVEL_INFO)
 		printk("%s(%d):mgsl_txenable(%s,%d)\n", __FILE__,__LINE__,
 			info->device_name, enable);
-			
+
 	spin_lock_irqsave(&info->irq_spinlock,flags);
 	if ( enable ) {
 		if ( !info->tx_enabled ) {
@@ -2588,22 +2588,22 @@ static int mgsl_txenable(struct mgsl_struct * info, int enable)
 	}
 	spin_unlock_irqrestore(&info->irq_spinlock,flags);
 	return 0;
-	
+
 }	/* end of mgsl_txenable() */
 
 /* mgsl_txabort()	abort send HDLC frame
- * 	
+ *
  * Arguments:	 	info		pointer to device instance data
  * Return Value:	0 if success, otherwise error code
  */
 static int mgsl_txabort(struct mgsl_struct * info)
 {
  	unsigned long flags;
- 
+
 	if (debug_level >= DEBUG_LEVEL_INFO)
 		printk("%s(%d):mgsl_txabort(%s)\n", __FILE__,__LINE__,
 			info->device_name);
-			
+
 	spin_lock_irqsave(&info->irq_spinlock,flags);
 	if ( info->tx_active && info->params.mode == MGSL_MODE_HDLC )
 	{
@@ -2614,11 +2614,11 @@ static int mgsl_txabort(struct mgsl_struct * info)
 	}
 	spin_unlock_irqrestore(&info->irq_spinlock,flags);
 	return 0;
-	
+
 }	/* end of mgsl_txabort() */
 
 /* mgsl_rxenable() 	enable or disable the receiver
- * 	
+ *
  * Arguments:	 	info		pointer to device instance data
  * 			enable		1 = enable, 0 = disable
  * Return Value:	0 if success, otherwise error code
@@ -2626,11 +2626,11 @@ static int mgsl_txabort(struct mgsl_struct * info)
 static int mgsl_rxenable(struct mgsl_struct * info, int enable)
 {
  	unsigned long flags;
- 
+
 	if (debug_level >= DEBUG_LEVEL_INFO)
 		printk("%s(%d):mgsl_rxenable(%s,%d)\n", __FILE__,__LINE__,
 			info->device_name, enable);
-			
+
 	spin_lock_irqsave(&info->irq_spinlock,flags);
 	if ( enable ) {
 		if ( !info->rx_enabled )
@@ -2641,11 +2641,11 @@ static int mgsl_rxenable(struct mgsl_struct * info, int enable)
 	}
 	spin_unlock_irqrestore(&info->irq_spinlock,flags);
 	return 0;
-	
+
 }	/* end of mgsl_rxenable() */
 
 /* mgsl_wait_event() 	wait for specified event to occur
- * 	
+ *
  * Arguments:	 	info	pointer to device instance data
  * 			mask	pointer to bitmask of events to wait for
  * Return Value:	0 	if successful and bit mask updated with
@@ -2667,7 +2667,7 @@ static int mgsl_wait_event(struct mgsl_struct * info, int __user * mask_ptr)
 	if (rc) {
 		return  -EFAULT;
 	}
-		 
+
 	if (debug_level >= DEBUG_LEVEL_INFO)
 		printk("%s(%d):mgsl_wait_event(%s,%d)\n", __FILE__,__LINE__,
 			info->device_name, mask);
@@ -2690,7 +2690,7 @@ static int mgsl_wait_event(struct mgsl_struct * info, int __user * mask_ptr)
 	/* save current irq counts */
 	cprev = info->icount;
 	oldsigs = info->input_signal_events;
-	
+
 	/* enable hunt and idle irqs if needed */
 	if (mask & (MgslEvent_ExitHuntMode + MgslEvent_IdleReceived)) {
 		u16 oldreg = usc_InReg(info,RICR);
@@ -2700,12 +2700,12 @@ static int mgsl_wait_event(struct mgsl_struct * info, int __user * mask_ptr)
 		if (oldreg != newreg)
 			usc_OutReg(info, RICR, newreg);
 	}
-	
+
 	set_current_state(TASK_INTERRUPTIBLE);
 	add_wait_queue(&info->event_wait_q, &wait);
-	
+
 	spin_unlock_irqrestore(&info->irq_spinlock,flags);
-	
+
 
 	for(;;) {
 		schedule();
@@ -2713,7 +2713,7 @@ static int mgsl_wait_event(struct mgsl_struct * info, int __user * mask_ptr)
 			rc = -ERESTARTSYS;
 			break;
 		}
-			
+
 		/* get current irq counts */
 		spin_lock_irqsave(&info->irq_spinlock,flags);
 		cnow = info->icount;
@@ -2749,11 +2749,11 @@ static int mgsl_wait_event(struct mgsl_struct * info, int __user * mask_ptr)
 			  (cnow.rxidle      != cprev.rxidle     ? MgslEvent_IdleReceived:0) );
 		if (events)
 			break;
-		
+
 		cprev = cnow;
 		oldsigs = newsigs;
 	}
-	
+
 	remove_wait_queue(&info->event_wait_q, &wait);
 	set_current_state(TASK_RUNNING);
 
@@ -2769,9 +2769,9 @@ static int mgsl_wait_event(struct mgsl_struct * info, int __user * mask_ptr)
 exit:
 	if ( rc == 0 )
 		PUT_USER(rc, events, mask_ptr);
-		
+
 	return rc;
-	
+
 }	/* end of mgsl_wait_event() */
 
 static int modem_input_wait(struct mgsl_struct *info,int arg)
@@ -2887,22 +2887,22 @@ static int mgsl_break(struct tty_struct *tty, int break_state)
 {
 	struct mgsl_struct * info = tty->driver_data;
 	unsigned long flags;
-	
+
 	if (debug_level >= DEBUG_LEVEL_INFO)
 		printk("%s(%d):mgsl_break(%s,%d)\n",
 			 __FILE__,__LINE__, info->device_name, break_state);
-			 
+
 	if (mgsl_paranoia_check(info, tty->name, "mgsl_break"))
 		return -EINVAL;
 
 	spin_lock_irqsave(&info->irq_spinlock,flags);
  	if (break_state == -1)
 		usc_OutReg(info,IOCR,(u16)(usc_InReg(info,IOCR) | BIT7));
-	else 
+	else
 		usc_OutReg(info,IOCR,(u16)(usc_InReg(info,IOCR) & ~BIT7));
 	spin_unlock_irqrestore(&info->irq_spinlock,flags);
 	return 0;
-	
+
 }	/* end of mgsl_break() */
 
 /*
@@ -2938,24 +2938,24 @@ static int msgl_get_icount(struct tty_struct *tty,
 }
 
 /* mgsl_ioctl()	Service an IOCTL request
- * 	
+ *
  * Arguments:
- * 
+ *
  * 	tty	pointer to tty instance data
  * 	cmd	IOCTL command code
  * 	arg	command argument/context
- * 	
+ *
  * Return Value:	0 if success, otherwise error code
  */
 static int mgsl_ioctl(struct tty_struct *tty,
 		    unsigned int cmd, unsigned long arg)
 {
 	struct mgsl_struct * info = tty->driver_data;
-	
+
 	if (debug_level >= DEBUG_LEVEL_INFO)
 		printk("%s(%d):mgsl_ioctl %s cmd=%08X\n", __FILE__,__LINE__,
 			info->device_name, cmd );
-	
+
 	if (mgsl_paranoia_check(info, tty->name, "mgsl_ioctl"))
 		return -ENODEV;
 
@@ -2971,7 +2971,7 @@ static int mgsl_ioctl(struct tty_struct *tty,
 static int mgsl_ioctl_common(struct mgsl_struct *info, unsigned int cmd, unsigned long arg)
 {
 	void __user *argp = (void __user *)arg;
-	
+
 	switch (cmd) {
 		case MGSL_IOCGPARAMS:
 			return mgsl_get_params(info, argp);
@@ -3006,25 +3006,25 @@ static int mgsl_ioctl_common(struct mgsl_struct *info, unsigned int cmd, unsigne
 }
 
 /* mgsl_set_termios()
- * 
+ *
  * 	Set new termios settings
- * 	
+ *
  * Arguments:
- * 
+ *
  * 	tty		pointer to tty structure
  * 	termios		pointer to buffer to hold returned old termios
- * 	
+ *
  * Return Value:		None
  */
 static void mgsl_set_termios(struct tty_struct *tty, struct ktermios *old_termios)
 {
 	struct mgsl_struct *info = tty->driver_data;
 	unsigned long flags;
-	
+
 	if (debug_level >= DEBUG_LEVEL_INFO)
 		printk("%s(%d):mgsl_set_termios %s\n", __FILE__,__LINE__,
 			tty->driver->name );
-	
+
 	mgsl_change_params(info);
 
 	/* Handle transition to B0 status */
@@ -3054,15 +3054,15 @@ static void mgsl_set_termios(struct tty_struct *tty, struct ktermios *old_termio
 }	/* end of mgsl_set_termios() */
 
 /* mgsl_close()
- * 
+ *
  * 	Called when port is closed. Wait for remaining data to be
  * 	sent. Disable port and free resources.
- * 	
+ *
  * Arguments:
- * 
+ *
  * 	tty	pointer to open tty structure
  * 	filp	pointer to open file object
- * 	
+ *
  * Return Value:	None
  */
 static void mgsl_close(struct tty_struct *tty, struct file * filp)
@@ -3071,7 +3071,7 @@ static void mgsl_close(struct tty_struct *tty, struct file * filp)
 
 	if (mgsl_paranoia_check(info, tty->name, "mgsl_close"))
 		return;
-	
+
 	if (debug_level >= DEBUG_LEVEL_INFO)
 		printk("%s(%d):mgsl_close(%s) entry, count=%d\n",
 			 __FILE__,__LINE__, info->device_name, info->port.count);
@@ -3087,13 +3087,13 @@ static void mgsl_close(struct tty_struct *tty, struct file * filp)
 	shutdown(info);
 	mutex_unlock(&info->port.mutex);
 
-	tty_port_close_end(&info->port, tty);	
+	tty_port_close_end(&info->port, tty);
 	info->port.tty = NULL;
-cleanup:			
+cleanup:
 	if (debug_level >= DEBUG_LEVEL_INFO)
 		printk("%s(%d):mgsl_close(%s) exit, count=%d\n", __FILE__,__LINE__,
 			tty->driver->name, info->port.count);
-			
+
 }	/* end of mgsl_close() */
 
 /* mgsl_wait_until_sent()
@@ -3131,7 +3131,7 @@ static void mgsl_wait_until_sent(struct tty_struct *tty, int timeout)
 	 * send a character, and make it at least 1. The check
 	 * interval should also be less than the timeout.
 	 * Note: use tight timings here to satisfy the NIST-PCTS.
-	 */ 
+	 */
 
 	if ( info->params.data_rate ) {
 	       	char_time = info->timeout/(32 * 5);
@@ -3139,10 +3139,10 @@ static void mgsl_wait_until_sent(struct tty_struct *tty, int timeout)
 			char_time++;
 	} else
 		char_time = 1;
-		
+
 	if (timeout)
 		char_time = min_t(unsigned long, char_time, timeout);
-		
+
 	if ( info->params.mode == MGSL_MODE_HDLC ||
 		info->params.mode == MGSL_MODE_RAW ) {
 		while (info->tx_active) {
@@ -3162,12 +3162,12 @@ static void mgsl_wait_until_sent(struct tty_struct *tty, int timeout)
 				break;
 		}
 	}
-      
+
 exit:
 	if (debug_level >= DEBUG_LEVEL_INFO)
 		printk("%s(%d):mgsl_wait_until_sent(%s) exit\n",
 			 __FILE__,__LINE__, info->device_name );
-			 
+
 }	/* end of mgsl_wait_until_sent() */
 
 /* mgsl_hangup()
@@ -3181,23 +3181,23 @@ static void mgsl_wait_until_sent(struct tty_struct *tty, int timeout)
 static void mgsl_hangup(struct tty_struct *tty)
 {
 	struct mgsl_struct * info = tty->driver_data;
-	
+
 	if (debug_level >= DEBUG_LEVEL_INFO)
 		printk("%s(%d):mgsl_hangup(%s)\n",
 			 __FILE__,__LINE__, info->device_name );
-			 
+
 	if (mgsl_paranoia_check(info, tty->name, "mgsl_hangup"))
 		return;
 
 	mgsl_flush_buffer(tty);
 	shutdown(info);
-	
-	info->port.count = 0;	
+
+	info->port.count = 0;
 	tty_port_set_active(&info->port, 0);
 	info->port.tty = NULL;
 
 	wake_up_interruptible(&info->port.open_wait);
-	
+
 }	/* end of mgsl_hangup() */
 
 /*
@@ -3210,7 +3210,7 @@ static int carrier_raised(struct tty_port *port)
 {
 	unsigned long flags;
 	struct mgsl_struct *info = container_of(port, struct mgsl_struct, port);
-	
+
 	spin_lock_irqsave(&info->irq_spinlock, flags);
  	usc_get_serial_signals(info);
 	spin_unlock_irqrestore(&info->irq_spinlock, flags);
@@ -3233,16 +3233,16 @@ static void dtr_rts(struct tty_port *port, int on)
 
 
 /* block_til_ready()
- * 
+ *
  * 	Block the current process until the specified port
  * 	is ready to be opened.
- * 	
+ *
  * Arguments:
- * 
+ *
  * 	tty		pointer to tty info structure
  * 	filp		pointer to open file object
  * 	info		pointer to device instance data
- * 	
+ *
  * Return Value:	0 if success, otherwise error code
  */
 static int block_til_ready(struct tty_struct *tty, struct file * filp,
@@ -3254,7 +3254,7 @@ static int block_til_ready(struct tty_struct *tty, struct file * filp,
 	unsigned long	flags;
 	int		dcd;
 	struct tty_port *port = &info->port;
-	
+
 	if (debug_level >= DEBUG_LEVEL_INFO)
 		printk("%s(%d):block_til_ready on %s\n",
 			 __FILE__,__LINE__, tty->driver->name );
@@ -3274,10 +3274,10 @@ static int block_til_ready(struct tty_struct *tty, struct file * filp,
 	 * mgsl_close() knows when to free things.  We restore it upon
 	 * exit, either normal or abnormal.
 	 */
-	 
+
 	retval = 0;
 	add_wait_queue(&port->open_wait, &wait);
-	
+
 	if (debug_level >= DEBUG_LEVEL_INFO)
 		printk("%s(%d):block_til_ready before block on %s count=%d\n",
 			 __FILE__,__LINE__, tty->driver->name, port->count );
@@ -3307,33 +3307,33 @@ static int block_til_ready(struct tty_struct *tty, struct file * filp,
 			retval = -ERESTARTSYS;
 			break;
 		}
-		
+
 		if (debug_level >= DEBUG_LEVEL_INFO)
 			printk("%s(%d):block_til_ready blocking on %s count=%d\n",
 				 __FILE__,__LINE__, tty->driver->name, port->count );
-				 
+
 		tty_unlock(tty);
 		schedule();
 		tty_lock(tty);
 	}
-	
+
 	set_current_state(TASK_RUNNING);
 	remove_wait_queue(&port->open_wait, &wait);
-	
+
 	/* FIXME: Racy on hangup during close wait */
 	if (!tty_hung_up_p(filp))
 		port->count++;
 	port->blocked_open--;
-	
+
 	if (debug_level >= DEBUG_LEVEL_INFO)
 		printk("%s(%d):block_til_ready after blocking on %s count=%d\n",
 			 __FILE__,__LINE__, tty->driver->name, port->count );
-			 
+
 	if (!retval)
 		tty_port_set_active(port, 1);
-		
+
 	return retval;
-	
+
 }	/* end of block_til_ready() */
 
 static int mgsl_install(struct tty_driver *driver, struct tty_struct *tty)
@@ -3376,7 +3376,7 @@ static int mgsl_open(struct tty_struct *tty, struct file * filp)
 	int retval;
 
 	info->port.tty = tty;
-		
+
 	if (debug_level >= DEBUG_LEVEL_INFO)
 		printk("%s(%d):mgsl_open(%s), old ref count = %d\n",
 			 __FILE__,__LINE__,tty->driver->name, info->port.count);
@@ -3411,17 +3411,17 @@ static int mgsl_open(struct tty_struct *tty, struct file * filp)
 		printk("%s(%d):mgsl_open(%s) success\n",
 			 __FILE__,__LINE__, info->device_name);
 	retval = 0;
-	
-cleanup:			
+
+cleanup:
 	if (retval) {
 		if (tty->count == 1)
 			info->port.tty = NULL; /* tty layer will release tty struct */
 		if(info->port.count)
 			info->port.count--;
 	}
-	
+
 	return retval;
-	
+
 }	/* end of mgsl_open() */
 
 /*
@@ -3439,7 +3439,7 @@ static inline void line_info(struct seq_file *m, struct mgsl_struct *info)
 			info->phys_memory_base, info->phys_lcr_base);
 	} else {
 		seq_printf(m, "%s:(E)ISA io:%04X irq:%d dma:%d",
-			info->device_name, info->io_base, 
+			info->device_name, info->io_base,
 			info->irq_level, info->dma_level);
 	}
 
@@ -3447,7 +3447,7 @@ static inline void line_info(struct seq_file *m, struct mgsl_struct *info)
 	spin_lock_irqsave(&info->irq_spinlock,flags);
  	usc_get_serial_signals(info);
 	spin_unlock_irqrestore(&info->irq_spinlock,flags);
-	
+
 	stat_buf[0] = 0;
 	stat_buf[1] = 0;
 	if (info->serial_signals & SerialSignal_RTS)
@@ -3491,16 +3491,16 @@ static inline void line_info(struct seq_file *m, struct mgsl_struct *info)
 		if (info->icount.overrun)
 			seq_printf(m, " oe:%d", info->icount.overrun);
 	}
-	
+
 	/* Append serial signal status to end */
 	seq_printf(m, " %s\n", stat_buf+1);
-	
+
 	seq_printf(m, "txactive=%d bh_req=%d bh_run=%d pending_bh=%x\n",
 	 info->tx_active,info->bh_requested,info->bh_running,
 	 info->pending_bh);
-	 
+
 	spin_lock_irqsave(&info->irq_spinlock,flags);
-	{	
+	{
 	u16 Tcsr = usc_InReg( info, TCSR );
 	u16 Tdmr = usc_InDmaReg( info, TDMR );
 	u16 Ticr = usc_InReg( info, TICR );
@@ -3523,9 +3523,9 @@ static inline void line_info(struct seq_file *m, struct mgsl_struct *info)
 static int mgsl_proc_show(struct seq_file *m, void *v)
 {
 	struct mgsl_struct *info;
-	
+
 	seq_printf(m, "synclink driver:%s\n", driver_version);
-	
+
 	info = mgsl_device_list;
 	while( info ) {
 		line_info(m, info);
@@ -3535,10 +3535,10 @@ static int mgsl_proc_show(struct seq_file *m, void *v)
 }
 
 /* mgsl_allocate_dma_buffers()
- * 
+ *
  * 	Allocate and format DMA buffers (ISA adapter)
  * 	or format shared memory buffers (PCI adapter).
- * 
+ *
  * Arguments:		info	pointer to device instance data
  * Return Value:	0 if success, otherwise error
  */
@@ -3595,12 +3595,12 @@ static int mgsl_allocate_dma_buffers(struct mgsl_struct *info)
 
 		info->tx_buffer_count = info->num_tx_dma_buffers * BuffersPerFrame;
 		info->rx_buffer_count = (BuffersPerFrame * MAXRXFRAMES) + 6;
-		
-		/* 
-		 * limit total TxBuffers & RxBuffers to 62 4K total 
-		 * (ala PCI Allocation) 
+
+		/*
+		 * limit total TxBuffers & RxBuffers to 62 4K total
+		 * (ala PCI Allocation)
 		 */
-		
+
 		if ( (info->tx_buffer_count + info->rx_buffer_count) > 62 )
 			info->rx_buffer_count = 62 - info->tx_buffer_count;
 
@@ -3609,16 +3609,16 @@ static int mgsl_allocate_dma_buffers(struct mgsl_struct *info)
 	if ( debug_level >= DEBUG_LEVEL_INFO )
 		printk("%s(%d):Allocating %d TX and %d RX DMA buffers.\n",
 			__FILE__,__LINE__, info->tx_buffer_count,info->rx_buffer_count);
-	
+
 	if ( mgsl_alloc_buffer_list_memory( info ) < 0 ||
-		  mgsl_alloc_frame_memory(info, info->rx_buffer_list, info->rx_buffer_count) < 0 || 
-		  mgsl_alloc_frame_memory(info, info->tx_buffer_list, info->tx_buffer_count) < 0 || 
+		  mgsl_alloc_frame_memory(info, info->rx_buffer_list, info->rx_buffer_count) < 0 ||
+		  mgsl_alloc_frame_memory(info, info->tx_buffer_list, info->tx_buffer_count) < 0 ||
 		  mgsl_alloc_intermediate_rxbuffer_memory(info) < 0  ||
 		  mgsl_alloc_intermediate_txbuffer_memory(info) < 0 ) {
 		printk("%s(%d):Can't allocate DMA buffer memory\n",__FILE__,__LINE__);
 		return -ENOMEM;
 	}
-	
+
 	mgsl_reset_rx_dma_buffers( info );
   	mgsl_reset_tx_dma_buffers( info );
 
@@ -3628,24 +3628,24 @@ static int mgsl_allocate_dma_buffers(struct mgsl_struct *info)
 
 /*
  * mgsl_alloc_buffer_list_memory()
- * 
+ *
  * Allocate a common DMA buffer for use as the
  * receive and transmit buffer lists.
- * 
+ *
  * A buffer list is a set of buffer entries where each entry contains
  * a pointer to an actual buffer and a pointer to the next buffer entry
  * (plus some other info about the buffer).
- * 
+ *
  * The buffer entries for a list are built to form a circular list so
  * that when the entire list has been traversed you start back at the
  * beginning.
- * 
+ *
  * This function allocates memory for just the buffer entries.
  * The links (pointer to next entry) are filled in with the physical
  * address of the next entry so the adapter can navigate the list
  * using bus master DMA. The pointers to the actual buffers are filled
  * out later when the actual buffers are allocated.
- * 
+ *
  * Arguments:		info	pointer to device instance data
  * Return Value:	0 if success, otherwise error
  */
@@ -3727,7 +3727,7 @@ static int mgsl_alloc_buffer_list_memory( struct mgsl_struct *info )
 /* Free DMA buffers allocated for use as the
  * receive and transmit buffer lists.
  * Warning:
- * 
+ *
  * 	The data transfer buffers associated with the buffer list
  * 	MUST be freed before freeing the buffer list itself because
  * 	the buffer list contains the information necessary to free
@@ -3737,7 +3737,7 @@ static void mgsl_free_buffer_list_memory( struct mgsl_struct *info )
 {
 	if (info->buffer_list && info->bus_type != MGSL_BUS_TYPE_PCI)
 		dma_free_coherent(NULL, BUFFERLISTSIZE, info->buffer_list, info->buffer_list_dma_addr);
-		
+
 	info->buffer_list = NULL;
 	info->rx_buffer_list = NULL;
 	info->tx_buffer_list = NULL;
@@ -3746,18 +3746,18 @@ static void mgsl_free_buffer_list_memory( struct mgsl_struct *info )
 
 /*
  * mgsl_alloc_frame_memory()
- * 
+ *
  * 	Allocate the frame DMA buffers used by the specified buffer list.
  * 	Each DMA buffer will be one memory page in size. This is necessary
  * 	because memory can fragment enough that it may be impossible
  * 	contiguous pages.
- * 
+ *
  * Arguments:
- * 
+ *
  *	info		pointer to device instance data
  * 	BufferList	pointer to list of buffer entries
  * 	Buffercount	count of buffer entries in buffer list
- * 
+ *
  * Return Value:	0 if success, otherwise -ENOMEM
  */
 static int mgsl_alloc_frame_memory(struct mgsl_struct *info,DMABUFFERENTRY *BufferList,int Buffercount)
@@ -3789,16 +3789,16 @@ static int mgsl_alloc_frame_memory(struct mgsl_struct *info,DMABUFFERENTRY *Buff
 
 /*
  * mgsl_free_frame_memory()
- * 
+ *
  * 	Free the buffers associated with
  * 	each buffer entry of a buffer list.
- * 
+ *
  * Arguments:
- * 
+ *
  *	info		pointer to device instance data
  * 	BufferList	pointer to list of buffer entries
  * 	Buffercount	count of buffer entries in buffer list
- * 
+ *
  * Return Value:	None
  */
 static void mgsl_free_frame_memory(struct mgsl_struct *info, DMABUFFERENTRY *BufferList, int Buffercount)
@@ -3818,9 +3818,9 @@ static void mgsl_free_frame_memory(struct mgsl_struct *info, DMABUFFERENTRY *Buf
 }	/* end of mgsl_free_frame_memory() */
 
 /* mgsl_free_dma_buffers()
- * 
+ *
  * 	Free DMA buffers
- * 	
+ *
  * Arguments:		info	pointer to device instance data
  * Return Value:	None
  */
@@ -3835,14 +3835,14 @@ static void mgsl_free_dma_buffers( struct mgsl_struct *info )
 
 /*
  * mgsl_alloc_intermediate_rxbuffer_memory()
- * 
+ *
  * 	Allocate a buffer large enough to hold max_frame_size. This buffer
  *	is used to pass an assembled frame to the line discipline.
- * 
+ *
  * Arguments:
- * 
+ *
  *	info		pointer to device instance data
- * 
+ *
  * Return Value:	0 if success, otherwise -ENOMEM
  */
 static int mgsl_alloc_intermediate_rxbuffer_memory(struct mgsl_struct *info)
@@ -3863,12 +3863,12 @@ static int mgsl_alloc_intermediate_rxbuffer_memory(struct mgsl_struct *info)
 
 /*
  * mgsl_free_intermediate_rxbuffer_memory()
- * 
- * 
+ *
+ *
  * Arguments:
- * 
+ *
  *	info		pointer to device instance data
- * 
+ *
  * Return Value:	None
  */
 static void mgsl_free_intermediate_rxbuffer_memory(struct mgsl_struct *info)
@@ -4032,7 +4032,7 @@ static int mgsl_claim_resources(struct mgsl_struct *info)
 		return -ENODEV;
 	}
 	info->io_addr_requested = true;
-	
+
 	if ( request_irq(info->irq_level,mgsl_interrupt,info->irq_flags,
 		info->device_name, info ) < 0 ) {
 		printk( "%s(%d):Can't request interrupt on device %s IRQ=%d\n",
@@ -4040,7 +4040,7 @@ static int mgsl_claim_resources(struct mgsl_struct *info)
 		goto errout;
 	}
 	info->irq_requested = true;
-	
+
 	if ( info->bus_type == MGSL_BUS_TYPE_PCI ) {
 		if (request_mem_region(info->phys_memory_base,0x40000,"synclink") == NULL) {
 			printk( "%s(%d):mem addr conflict device %s Addr=%08X\n",
@@ -4062,13 +4062,13 @@ static int mgsl_claim_resources(struct mgsl_struct *info)
 				__FILE__,__LINE__,info->device_name, info->phys_memory_base );
 			goto errout;
 		}
-		
+
 		if ( !mgsl_memory_test(info) ) {
 			printk( "%s(%d):Failed shared memory test %s MemAddr=%08X\n",
 				__FILE__,__LINE__,info->device_name, info->phys_memory_base );
 			goto errout;
 		}
-		
+
 		info->lcr_base = ioremap_nocache(info->phys_lcr_base,
 								PAGE_SIZE);
 		if (!info->lcr_base) {
@@ -4077,10 +4077,10 @@ static int mgsl_claim_resources(struct mgsl_struct *info)
 			goto errout;
 		}
 		info->lcr_base += info->lcr_offset;
-		
+
 	} else {
 		/* claim DMA channel */
-		
+
 		if (request_dma(info->dma_level,info->device_name) < 0){
 			printk( "%s(%d):Can't request DMA channel on device %s DMA=%d\n",
 				__FILE__,__LINE__,info->device_name, info->dma_level );
@@ -4088,17 +4088,17 @@ static int mgsl_claim_resources(struct mgsl_struct *info)
 		}
 		info->dma_requested = true;
 
-		/* ISA adapter uses bus master DMA */		
+		/* ISA adapter uses bus master DMA */
 		set_dma_mode(info->dma_level,DMA_MODE_CASCADE);
 		enable_dma(info->dma_level);
 	}
-	
+
 	if ( mgsl_allocate_dma_buffers(info) < 0 ) {
 		printk( "%s(%d):Can't allocate DMA buffers on device %s DMA=%d\n",
 			__FILE__,__LINE__,info->device_name, info->dma_level );
 		goto errout;
-	}	
-	
+	}
+
 	return 0;
 errout:
 	mgsl_release_resources(info);
@@ -4111,7 +4111,7 @@ static void mgsl_release_resources(struct mgsl_struct *info)
 	if ( debug_level >= DEBUG_LEVEL_INFO )
 		printk( "%s(%d):mgsl_release_resources(%s) entry\n",
 			__FILE__,__LINE__,info->device_name );
-			
+
 	if ( info->irq_requested ) {
 		free_irq(info->irq_level, info);
 		info->irq_requested = false;
@@ -4124,7 +4124,7 @@ static void mgsl_release_resources(struct mgsl_struct *info)
 	mgsl_free_dma_buffers(info);
 	mgsl_free_intermediate_rxbuffer_memory(info);
      	mgsl_free_intermediate_txbuffer_memory(info);
-	
+
 	if ( info->io_addr_requested ) {
 		release_region(info->io_base,info->io_addr_size);
 		info->io_addr_requested = false;
@@ -4145,18 +4145,18 @@ static void mgsl_release_resources(struct mgsl_struct *info)
 		iounmap(info->lcr_base - info->lcr_offset);
 		info->lcr_base = NULL;
 	}
-	
+
 	if ( debug_level >= DEBUG_LEVEL_INFO )
 		printk( "%s(%d):mgsl_release_resources(%s) exit\n",
 			__FILE__,__LINE__,info->device_name );
-			
+
 }	/* end of mgsl_release_resources() */
 
 /* mgsl_add_device()
- * 
+ *
  * 	Add the specified device instance data structure to the
  * 	global linked list of devices and increment the device count.
- * 	
+ *
  * Arguments:		info	pointer to device instance data
  * Return Value:	None
  */
@@ -4165,7 +4165,7 @@ static void mgsl_add_device( struct mgsl_struct *info )
 	info->next_device = NULL;
 	info->line = mgsl_device_count;
 	sprintf(info->device_name,"ttySL%d",info->line);
-	
+
 	if (info->line < MAX_TOTAL_DEVICES) {
 		if (maxframe[info->line])
 			info->max_frame_size = maxframe[info->line];
@@ -4186,21 +4186,21 @@ static void mgsl_add_device( struct mgsl_struct *info )
 	}
 
 	mgsl_device_count++;
-	
+
 	if ( !mgsl_device_list )
 		mgsl_device_list = info;
-	else {	
+	else {
 		struct mgsl_struct *current_dev = mgsl_device_list;
 		while( current_dev->next_device )
 			current_dev = current_dev->next_device;
 		current_dev->next_device = info;
 	}
-	
+
 	if ( info->max_frame_size < 4096 )
 		info->max_frame_size = 4096;
 	else if ( info->max_frame_size > 65535 )
 		info->max_frame_size = 65535;
-	
+
 	if ( info->bus_type == MGSL_BUS_TYPE_PCI ) {
 		printk( "SyncLink PCI v%d %s: IO=%04X IRQ=%d Mem=%08X,%08X MaxFrameSize=%u\n",
 			info->hw_version + 1, info->device_name, info->io_base, info->irq_level,
@@ -4225,19 +4225,19 @@ static const struct tty_port_operations mgsl_port_ops = {
 
 
 /* mgsl_allocate_device()
- * 
+ *
  * 	Allocate and initialize a device instance structure
- * 	
+ *
  * Arguments:		none
  * Return Value:	pointer to mgsl_struct if success, otherwise NULL
  */
 static struct mgsl_struct* mgsl_allocate_device(void)
 {
 	struct mgsl_struct *info;
-	
+
 	info = kzalloc(sizeof(struct mgsl_struct),
 		 GFP_KERNEL);
-		 
+
 	if (!info) {
 		printk("Error can't allocate device instance data\n");
 	} else {
@@ -4257,7 +4257,7 @@ static struct mgsl_struct* mgsl_allocate_device(void)
 		info->num_tx_dma_buffers = 1;
 		info->num_tx_holding_buffers = 0;
 	}
-	
+
 	return info;
 
 }	/* end of mgsl_allocate_device()*/
@@ -4298,7 +4298,7 @@ static int mgsl_init_tty(void)
 	serial_driver = alloc_tty_driver(128);
 	if (!serial_driver)
 		return -ENOMEM;
-	
+
 	serial_driver->driver_name = "synclink";
 	serial_driver->name = "ttySL";
 	serial_driver->major = ttymajor;
@@ -4319,7 +4319,7 @@ static int mgsl_init_tty(void)
 		serial_driver = NULL;
 		return rc;
 	}
-			
+
  	printk("%s %s, tty major#%d\n",
 		driver_name, driver_version,
 		serial_driver->major);
@@ -4332,14 +4332,14 @@ static void mgsl_enum_isa_devices(void)
 {
 	struct mgsl_struct *info;
 	int i;
-		
+
 	/* Check for user specified ISA devices */
-	
+
 	for (i=0 ;(i < MAX_ISA_DEVICES) && io[i] && irq[i]; i++){
 		if ( debug_level >= DEBUG_LEVEL_INFO )
 			printk("ISA device specified io=%04X,irq=%d,dma=%d\n",
 				io[i], irq[i], dma[i] );
-		
+
 		info = mgsl_allocate_device();
 		if ( !info ) {
 			/* error allocating device instance data */
@@ -4347,7 +4347,7 @@ static void mgsl_enum_isa_devices(void)
 				printk( "can't allocate device instance data.\n");
 			continue;
 		}
-		
+
 		/* Copy user configuration info to device instance data */
 		info->io_base = (unsigned int)io[i];
 		info->irq_level = (unsigned int)irq[i];
@@ -4356,7 +4356,7 @@ static void mgsl_enum_isa_devices(void)
 		info->bus_type = MGSL_BUS_TYPE_ISA;
 		info->io_addr_size = 16;
 		info->irq_flags = 0;
-		
+
 		mgsl_add_device( info );
 	}
 }
@@ -4388,7 +4388,7 @@ static void synclink_cleanup(void)
 		tty_port_destroy(&tmp->port);
 		kfree(tmp);
 	}
-	
+
 	if (pci_registered)
 		pci_unregister_driver(&synclink_pci_driver);
 }
@@ -4516,7 +4516,7 @@ static void usc_OutDmaReg( struct mgsl_struct *info, u16 RegAddr, u16 RegValue )
 		inw( info->io_base );
 
 }	/* end of usc_OutDmaReg() */
- 
+
 /*
  * usc_InDmaReg()
  *
@@ -4546,7 +4546,7 @@ static u16 usc_InDmaReg( struct mgsl_struct *info, u16 RegAddr )
  *
  * usc_OutReg()
  *
- *    Write a 16-bit value to a USC serial channel register 
+ *    Write a 16-bit value to a USC serial channel register
  *
  * Arguments:
  *
@@ -4602,7 +4602,7 @@ static void usc_set_sdlc_mode( struct mgsl_struct *info )
 {
 	u16 RegValue;
 	bool PreSL1660;
-	
+
 	/*
 	 * determine if the IUSC on the adapter is pre-SL1660. If
 	 * not, take advantage of the UnderWait feature of more
@@ -4631,14 +4631,14 @@ static void usc_set_sdlc_mode( struct mgsl_struct *info )
  	   ** 1000 1110 0000 0110 = 0x8e06
  	   */
  	   RegValue = 0x8e06;
- 
+
  	   /*--------------------------------------------------
  	    * ignore user options for UnderRun Actions and
  	    * preambles
  	    *--------------------------------------------------*/
  	}
  	else
- 	{	
+	{
 		/* Channel mode Register (CMR)
 		 *
 		 * <15..14>  00    Tx Sub modes, Underrun Action
@@ -4776,7 +4776,7 @@ static void usc_set_sdlc_mode( struct mgsl_struct *info )
 	usc_ClearIrqPendingBits( info, RECEIVE_STATUS );
 
 	/* Transmit mode Register (TMR)
-	 *	
+	 *
 	 * <15..13>	000	encoding
 	 * <12..11>	00	FCS = 16bit CRC CCITT (x15 + x12 + x5 + 1)
 	 * <10>		1	1 = Start CRC as all 1s (use for SDLC/HDLC)
@@ -4831,7 +4831,7 @@ static void usc_set_sdlc_mode( struct mgsl_struct *info )
 
 	if ( info->bus_type == MGSL_BUS_TYPE_PCI )
 		usc_OutReg( info, TICR, 0x0736 );
-	else								
+	else
 		usc_OutReg( info, TICR, 0x1436 );
 
 	usc_UnlatchTxstatusBits( info, TXSTATUS_ALL );
@@ -4851,14 +4851,14 @@ static void usc_set_sdlc_mode( struct mgsl_struct *info )
 	** <2>         	x	All Sent
 	** <1>         	x	TxUnder
 	** <0>         	x	TxEmpty
-	** 
+	**
 	** 0000 0000 0000 0000 = 0x0000
 	*/
 	info->tcsr_value = 0;
 
 	if ( !PreSL1660 )
 		info->tcsr_value |= TCSR_UNDERWAIT;
-		
+
 	usc_OutReg( info, TCSR, info->tcsr_value );
 
 	/* Clock mode Control Register (CMCR)
@@ -4946,7 +4946,7 @@ static void usc_set_sdlc_mode( struct mgsl_struct *info )
 
  		/*--------------------------------------------------
  		 * ejz: for DPLL mode, application should use the
- 		 * same clock speed as the partner system, even 
+		 * same clock speed as the partner system, even
  		 * though clocking is derived from the input RxData.
  		 * In case the user uses a 0 for the clock speed,
  		 * default to 0xffffffff and don't try to divide by
@@ -4961,7 +4961,7 @@ static void usc_set_sdlc_mode( struct mgsl_struct *info )
  		}
  		else
  			Tc = -1;
- 				  
+
 
 		/* Write 16-bit Time Constant for BRG1 */
 		usc_OutReg( info, TC1R, Tc );
@@ -5008,7 +5008,7 @@ static void usc_set_sdlc_mode( struct mgsl_struct *info )
 		usc_OutReg( info, SICR,
 			    (u16)(usc_InReg(info,SICR) | SICR_CTS_INACTIVE) );
 	}
-	
+
 
 	/* enable Master Interrupt Enable bit (MIE) */
 	usc_EnableMasterIrqBit( info );
@@ -5161,7 +5161,7 @@ static void usc_set_sdlc_mode( struct mgsl_struct *info )
 
 	usc_stop_transmitter(info);
 	usc_stop_receiver(info);
-	
+
 }	/* end of usc_set_sdlc_mode() */
 
 /* usc_enable_loopback()
@@ -5179,7 +5179,7 @@ static void usc_enable_loopback(struct mgsl_struct *info, int enable)
 	if (enable) {
 		/* blank external TXD output */
 		usc_OutReg(info,IOCR,usc_InReg(info,IOCR) | (BIT7 | BIT6));
-	
+
 		/* Clock mode Control Register (CMCR)
 		 *
 		 * <15..14>	00	counter 1 Disabled
@@ -5218,12 +5218,12 @@ static void usc_enable_loopback(struct mgsl_struct *info, int enable)
 	} else {
 		/* enable external TXD output */
 		usc_OutReg(info,IOCR,usc_InReg(info,IOCR) & ~(BIT7 | BIT6));
-	
+
 		/* clear Internal Data loopback mode */
 		info->loopback_bits = 0;
 		outw( 0,info->io_base + CCAR );
 	}
-	
+
 }	/* end of usc_enable_loopback() */
 
 /* usc_enable_aux_clock()
@@ -5313,7 +5313,7 @@ static void usc_process_rxoverrun_sync( struct mgsl_struct *info )
 
 	/* CurrentRxBuffer points to the 1st buffer of the next */
 	/* possibly available receive frame. */
-	
+
 	frame_start_index = start_index = end_index = info->current_rx_buffer;
 
 	/* Search for an unfinished string of buffers. This means */
@@ -5392,9 +5392,9 @@ static void usc_process_rxoverrun_sync( struct mgsl_struct *info )
 		usc_UnlatchRxstatusBits(info,RXSTATUS_ALL);
 		usc_ClearIrqPendingBits(info, RECEIVE_DATA|RECEIVE_STATUS);
 		usc_UnlatchRxstatusBits(info, RECEIVE_DATA|RECEIVE_STATUS);
-		
+
 		usc_EnableReceiver(info,DISABLE_UNCONDITIONAL);
-		
+
 		/* This empties the receive FIFO and loads the RCC with RCLR */
 		usc_OutReg( info, CCSR, (u16)(usc_InReg(info,CCSR) | BIT13) );
 
@@ -5439,7 +5439,7 @@ static void usc_stop_receiver( struct mgsl_struct *info )
 	if (debug_level >= DEBUG_LEVEL_ISR)
 		printk("%s(%d):usc_stop_receiver(%s)\n",
 			 __FILE__,__LINE__, info->device_name );
-			 
+
 	/* Disable receive DMA channel. */
 	/* This also disables receive DMA channel interrupts */
 	usc_DmaCmd( info, DmaCmd_ResetRxChannel );
@@ -5457,12 +5457,12 @@ static void usc_stop_receiver( struct mgsl_struct *info )
 	info->rx_enabled = false;
 	info->rx_overflow = false;
 	info->rx_rcc_underrun = false;
-	
+
 }	/* end of stop_receiver() */
 
 /* usc_start_receiver()
  *
- *	Enable the USC receiver 
+ *	Enable the USC receiver
  *
  * Arguments:		info	pointer to device instance data
  * Return Value:	None
@@ -5470,7 +5470,7 @@ static void usc_stop_receiver( struct mgsl_struct *info )
 static void usc_start_receiver( struct mgsl_struct *info )
 {
 	u32 phys_addr;
-	
+
 	if (debug_level >= DEBUG_LEVEL_ISR)
 		printk("%s(%d):usc_start_receiver(%s)\n",
 			 __FILE__,__LINE__, info->device_name );
@@ -5539,7 +5539,7 @@ static void usc_start_transmitter( struct mgsl_struct *info )
 	if (debug_level >= DEBUG_LEVEL_ISR)
 		printk("%s(%d):usc_start_transmitter(%s)\n",
 			 __FILE__,__LINE__, info->device_name );
-			 
+
 	if ( info->xmit_cnt ) {
 
 		/* If auto RTS enabled and RTS is inactive, then assert */
@@ -5568,7 +5568,7 @@ static void usc_start_transmitter( struct mgsl_struct *info )
 		} else {
 			/* Disable transmit DMA controller while programming. */
 			usc_DmaCmd( info, DmaCmd_ResetTxChannel );
-			
+
 			/* Transmit DMA buffer is loaded, so program USC */
 			/* to send the frame contained in the buffers.	 */
 
@@ -5611,9 +5611,9 @@ static void usc_start_transmitter( struct mgsl_struct *info )
 
 			/* Initialize Transmit DMA Channel */
 			usc_DmaCmd( info, DmaCmd_InitTxChannel );
-			
+
 			usc_TCmd( info, TCmd_SendFrame );
-			
+
 			mod_timer(&info->tx_timer, jiffies +
 					msecs_to_jiffies(5000));
 		}
@@ -5642,9 +5642,9 @@ static void usc_stop_transmitter( struct mgsl_struct *info )
 	if (debug_level >= DEBUG_LEVEL_ISR)
 		printk("%s(%d):usc_stop_transmitter(%s)\n",
 			 __FILE__,__LINE__, info->device_name );
-			 
-	del_timer(&info->tx_timer);	
-			 
+
+	del_timer(&info->tx_timer);
+
 	usc_UnlatchTxstatusBits( info, TXSTATUS_ALL );
 	usc_ClearIrqPendingBits( info, TRANSMIT_STATUS + TRANSMIT_DATA );
 	usc_DisableInterrupts( info, TRANSMIT_STATUS + TRANSMIT_DATA );
@@ -5670,10 +5670,10 @@ static void usc_load_txfifo( struct mgsl_struct *info )
 {
 	int Fifocount;
 	u8 TwoBytes[2];
-	
+
 	if ( !info->xmit_cnt && !info->x_char )
-		return; 
-		
+		return;
+
 	/* Select transmit FIFO status readback in TICR */
 	usc_TCmd( info, TCmd_SelectTicrTxFifostatus );
 
@@ -5685,22 +5685,22 @@ static void usc_load_txfifo( struct mgsl_struct *info )
 
 		if ( (info->xmit_cnt > 1) && (Fifocount > 1) && !info->x_char ) {
  			/* write a 16-bit word from transmit buffer to 16C32 */
-				
+
 			TwoBytes[0] = info->xmit_buf[info->xmit_tail++];
 			info->xmit_tail = info->xmit_tail & (SERIAL_XMIT_SIZE-1);
 			TwoBytes[1] = info->xmit_buf[info->xmit_tail++];
 			info->xmit_tail = info->xmit_tail & (SERIAL_XMIT_SIZE-1);
-			
+
 			outw( *((u16 *)TwoBytes), info->io_base + DATAREG);
-				
+
 			info->xmit_cnt -= 2;
 			info->icount.tx += 2;
 		} else {
 			/* only 1 byte left to transmit or 1 FIFO slot left */
-			
+
 			outw( (inw( info->io_base + CCAR) & 0x0780) | (TDR+LSBONLY),
 				info->io_base + CCAR );
-			
+
 			if (info->x_char) {
 				/* transmit pending high priority char */
 				outw( info->x_char,info->io_base + CCAR );
@@ -5739,8 +5739,8 @@ static void usc_reset( struct mgsl_struct *info )
 		*MiscCtrl = info->misc_ctrl_value;
 
 		/*
-		 * Force at least 170ns delay before clearing 
-		 * reset bit. Each read from LCR takes at least 
+		 * Force at least 170ns delay before clearing
+		 * reset bit. Each read from LCR takes at least
 		 * 30ns so 10 times for 300ns to be safe.
 		 */
 		for(i=0;i<10;i++)
@@ -5784,7 +5784,7 @@ static void usc_reset( struct mgsl_struct *info )
 	 * By writing to io_base + SDPIN the Wait/Ack pin is
 	 * programmed to work as a Wait pin.
 	 */
-	
+
 	outw( 0x000c,info->io_base + SDPIN );
 
 
@@ -5866,7 +5866,7 @@ static void usc_set_async_mode( struct mgsl_struct *info )
 		RegValue |= BIT14;
 	usc_OutReg( info, CMR, RegValue );
 
-	
+
 	/* Receiver mode Register (RMR)
 	 *
 	 * <15..13>	000	encoding = None
@@ -5897,7 +5897,7 @@ static void usc_set_async_mode( struct mgsl_struct *info )
 
 	usc_RCmd( info, RCmd_SelectRicrIntLevel );
 
-	
+
 	/* Receive Interrupt Control Register (RICR)
 	 *
 	 * <15..8>	?		RxFIFO IRQ Request Level
@@ -5917,13 +5917,13 @@ static void usc_set_async_mode( struct mgsl_struct *info )
 	 *
 	 * 0000 0000 0100 0000 = 0x0000 + (FIFOLEVEL in MSB)
 	 */
-	
+
 	usc_OutReg( info, RICR, 0x0000 );
 
 	usc_UnlatchRxstatusBits( info, RXSTATUS_ALL );
 	usc_ClearIrqPendingBits( info, RECEIVE_STATUS );
 
-	
+
 	/* Transmit mode Register (TMR)
 	 *
 	 * <15..13>	000	encoding = None
@@ -5956,7 +5956,7 @@ static void usc_set_async_mode( struct mgsl_struct *info )
 
 	usc_TCmd( info, TCmd_SelectTicrIntLevel );
 
-	
+
 	/* Transmit Interrupt Control Register (TICR)
 	 *
 	 * <15..8>	?	Transmit FIFO IRQ Level
@@ -5979,7 +5979,7 @@ static void usc_set_async_mode( struct mgsl_struct *info )
 
 	usc_enable_async_clock( info, info->params.data_rate );
 
-	
+
 	/* Channel Control/status Register (CCSR)
 	 *
 	 * <15>		X	RCC FIFO Overflow status (RO)
@@ -5997,7 +5997,7 @@ static void usc_set_async_mode( struct mgsl_struct *info )
 	 *
 	 *	0000 0000 0010 0000 = 0x0020
 	 */
-	
+
 	usc_OutReg( info, CCSR, 0x0020 );
 
 	usc_DisableInterrupts( info, TRANSMIT_STATUS + TRANSMIT_DATA +
@@ -6041,7 +6041,7 @@ static void usc_loopback_frame( struct mgsl_struct *info )
 	unsigned long oldmode = info->params.mode;
 
 	info->params.mode = MGSL_MODE_HDLC;
-	
+
 	usc_DisableMasterIrqBit( info );
 
 	usc_set_sdlc_mode( info );
@@ -6049,7 +6049,7 @@ static void usc_loopback_frame( struct mgsl_struct *info )
 
 	/* Write 16-bit Time Constant for BRG0 */
 	usc_OutReg( info, TC0R, 0 );
-	
+
 	/* Channel Control Register (CCR)
 	 *
 	 * <15..14>	00	Don't use 32-bit Tx Control Blocks (TCBs)
@@ -6083,7 +6083,7 @@ static void usc_loopback_frame( struct mgsl_struct *info )
 	/* ENABLE TRANSMITTER */
 	usc_TCmd( info, TCmd_SendFrame );
 	usc_EnableTransmitter(info,ENABLE_UNCONDITIONAL);
-							
+
 	/* WAIT FOR RECEIVE COMPLETE */
 	for (i=0 ; i<1000 ; i++)
 		if (usc_InReg( info, RCSR ) & (BIT8 | BIT4 | BIT3 | BIT1))
@@ -6221,7 +6221,7 @@ static void usc_get_serial_signals( struct mgsl_struct *info )
  *
  *	Set the state of RTS and DTR based on contents of
  *	serial_signals member of device extension.
- *	
+ *
  * Arguments:		info	pointer to device instance data
  * Return Value:	None
  */
@@ -6262,7 +6262,7 @@ static void usc_enable_async_clock( struct mgsl_struct *info, u32 data_rate )
 	if ( data_rate )	{
 		/*
 		 * Clock mode Control Register (CMCR)
-		 * 
+		 *
 		 * <15..14>     00      counter 1 Disabled
 		 * <13..12>     00      counter 0 Disabled
 		 * <11..10>     11      BRG1 Input is TxC Pin
@@ -6273,7 +6273,7 @@ static void usc_enable_async_clock( struct mgsl_struct *info, u32 data_rate )
 		 *
 		 * 0000 1111 0110 0100 = 0x0f64
 		 */
-		
+
 		usc_OutReg( info, CMCR, 0x0f64 );
 
 
@@ -6288,7 +6288,7 @@ static void usc_enable_async_clock( struct mgsl_struct *info, u32 data_rate )
 		else
 			usc_OutReg( info, TC0R, (u16)((921600/data_rate) - 1) );
 
-		
+
 		/*
 		 * Hardware Configuration Register (HCR)
 		 * Clear Bit 1, BRG0 mode = Continuous
@@ -6400,11 +6400,11 @@ static int num_free_tx_dma_buffers(struct mgsl_struct *info)
 
 /*
  * mgsl_reset_rx_dma_buffers()
- * 
+ *
  * 	Set the count for all receive buffers to DMABUFFERSIZE
  * 	and set the current buffer to the first buffer. This effectively
  * 	makes all buffers free and discards any data in buffers.
- * 
+ *
  * Arguments:		info	pointer to device instance data
  * Return Value:	None
  */
@@ -6424,16 +6424,16 @@ static void mgsl_reset_rx_dma_buffers( struct mgsl_struct *info )
 
 /*
  * mgsl_free_rx_frame_buffers()
- * 
+ *
  * 	Free the receive buffers used by a received SDLC
  * 	frame such that the buffers can be reused.
- * 
+ *
  * Arguments:
- * 
+ *
  * 	info			pointer to device instance data
  * 	StartIndex		index of 1st receive buffer of frame
  * 	EndIndex		index of last receive buffer of frame
- * 
+ *
  * Return Value:	None
  */
 static void mgsl_free_rx_frame_buffers( struct mgsl_struct *info, unsigned int StartIndex, unsigned int EndIndex )
@@ -6472,7 +6472,7 @@ static void mgsl_free_rx_frame_buffers( struct mgsl_struct *info, unsigned int S
 }	/* end of free_rx_frame_buffers() */
 
 /* mgsl_get_rx_frame()
- * 
+ *
  * 	This function attempts to return a received SDLC frame from the
  * 	receive DMA buffers. Only frames received without errors are returned.
  *
@@ -6489,7 +6489,7 @@ static bool mgsl_get_rx_frame(struct mgsl_struct *info)
 	unsigned long flags;
 	struct tty_struct *tty = info->port.tty;
 	bool return_frame = false;
-	
+
 	/*
 	 * current_rx_buffer points to the 1st buffer of the next available
 	 * receive frame. To find the last buffer of the frame look for
@@ -6533,7 +6533,7 @@ static bool mgsl_get_rx_frame(struct mgsl_struct *info)
 
 
 	/* check status of receive frame */
-	
+
 	status = info->rx_buffer_list[EndIndex].status;
 
 	if ( status & (RXSTATUS_SHORT_FRAME | RXSTATUS_OVERRUN |
@@ -6572,17 +6572,17 @@ static bool mgsl_get_rx_frame(struct mgsl_struct *info)
 		if ( info->params.crc_type == HDLC_CRC_16_CCITT )
 			framesize -= 2;
 		else if ( info->params.crc_type == HDLC_CRC_32_CCITT )
-			framesize -= 4;		
+			framesize -= 4;
 	}
 
 	if ( debug_level >= DEBUG_LEVEL_BH )
 		printk("%s(%d):mgsl_get_rx_frame(%s) status=%04X size=%d\n",
 			__FILE__,__LINE__,info->device_name,status,framesize);
-			
+
 	if ( debug_level >= DEBUG_LEVEL_DATA )
 		mgsl_trace_block(info,info->rx_buffer_list[StartIndex].virt_addr,
 			min_t(int, framesize, DMABUFFERSIZE),0);
-		
+
 	if (framesize) {
 		if ( ( (info->params.crc_type & HDLC_CRC_RETURN_EX) &&
 				((framesize+1) > info->max_frame_size) ) ||
@@ -6596,19 +6596,19 @@ static bool mgsl_get_rx_frame(struct mgsl_struct *info)
 
 			if ( !(status & RXSTATUS_CRC_ERROR))
 				info->icount.rxok++;
-			
+
 			while(copy_count) {
 				int partial_count;
 				if ( copy_count > DMABUFFERSIZE )
 					partial_count = DMABUFFERSIZE;
 				else
 					partial_count = copy_count;
-			
+
 				pBufEntry = &(info->rx_buffer_list[index]);
 				memcpy( ptmp, pBufEntry->virt_addr, partial_count );
 				ptmp += partial_count;
 				copy_count -= partial_count;
-				
+
 				if ( ++index == info->rx_buffer_count )
 					index = 0;
 			}
@@ -6641,8 +6641,8 @@ static bool mgsl_get_rx_frame(struct mgsl_struct *info)
 Cleanup:
 
 	if ( info->rx_enabled && info->rx_overflow ) {
-		/* The receiver needs to restarted because of 
-		 * a receive overflow (buffer or FIFO). If the 
+		/* The receiver needs to restarted because of
+		 * a receive overflow (buffer or FIFO). If the
 		 * receive buffers are now empty, then restart receiver.
 		 */
 
@@ -6831,15 +6831,15 @@ static bool mgsl_get_raw_rx_frame(struct mgsl_struct *info)
 }	/* end of mgsl_get_raw_rx_frame() */
 
 /* mgsl_load_tx_dma_buffer()
- * 
+ *
  * 	Load the transmit DMA buffer with the specified data.
- * 
+ *
  * Arguments:
- * 
+ *
  * 	info		pointer to device extension
  * 	Buffer		pointer to buffer containing frame to load
  * 	BufferSize	size in bytes of frame in Buffer
- * 
+ *
  * Return Value: 	None
  */
 static void mgsl_load_tx_dma_buffer(struct mgsl_struct *info,
@@ -6848,7 +6848,7 @@ static void mgsl_load_tx_dma_buffer(struct mgsl_struct *info,
 	unsigned short Copycount;
 	unsigned int i = 0;
 	DMABUFFERENTRY *pBufEntry;
-	
+
 	if ( debug_level >= DEBUG_LEVEL_DATA )
 		mgsl_trace_block(info,Buffer, min_t(int, BufferSize, DMABUFFERSIZE), 1);
 
@@ -6858,7 +6858,7 @@ static void mgsl_load_tx_dma_buffer(struct mgsl_struct *info,
 		 */
 	 	info->cmr_value |= BIT13;
 	}
-		
+
 	/* begin loading the frame in the next available tx dma
 	 * buffer, remember it's starting location for setting
 	 * up tx dma operation
@@ -6879,7 +6879,7 @@ static void mgsl_load_tx_dma_buffer(struct mgsl_struct *info,
 	while( BufferSize ){
 		/* Get a pointer to next DMA buffer entry. */
 		pBufEntry = &info->tx_buffer_list[i++];
-			
+
 		if ( i == info->tx_buffer_count )
 			i=0;
 
@@ -6913,9 +6913,9 @@ static void mgsl_load_tx_dma_buffer(struct mgsl_struct *info,
 
 /*
  * mgsl_register_test()
- * 
+ *
  * 	Performs a register test of the 16C32.
- * 	
+ *
  * Arguments:		info	pointer to device instance data
  * Return Value:		true if test passed, otherwise false
  */
@@ -6971,7 +6971,7 @@ static bool mgsl_register_test( struct mgsl_struct *info )
 }	/* end of mgsl_register_test() */
 
 /* mgsl_irq_test() 	Perform interrupt test of the 16C32.
- * 
+ *
  * Arguments:		info	pointer to device instance data
  * Return Value:	true if test passed, otherwise false
  */
@@ -6984,7 +6984,7 @@ static bool mgsl_irq_test( struct mgsl_struct *info )
 	usc_reset(info);
 
 	/*
-	 * Setup 16C32 to interrupt on TxC pin (14MHz clock) transition. 
+	 * Setup 16C32 to interrupt on TxC pin (14MHz clock) transition.
 	 * The ISR sets irq_occurred to true.
 	 */
 
@@ -6999,7 +6999,7 @@ static bool mgsl_irq_test( struct mgsl_struct *info )
 	usc_EnableMasterIrqBit(info);
 	usc_EnableInterrupts(info, IO_PIN);
 	usc_ClearIrqPendingBits(info, IO_PIN);
-	
+
 	usc_UnlatchIostatusBits(info, MISCSTATUS_TXC_LATCHED);
 	usc_EnableStatusIrqs(info, SICR_TXC_ACTIVE + SICR_TXC_INACTIVE);
 
@@ -7009,21 +7009,21 @@ static bool mgsl_irq_test( struct mgsl_struct *info )
 	while( EndTime-- && !info->irq_occurred ) {
 		msleep_interruptible(10);
 	}
-	
+
 	spin_lock_irqsave(&info->irq_spinlock,flags);
 	usc_reset(info);
 	spin_unlock_irqrestore(&info->irq_spinlock,flags);
-	
+
 	return info->irq_occurred;
 
 }	/* end of mgsl_irq_test() */
 
 /* mgsl_dma_test()
- * 
+ *
  * 	Perform a DMA test of the 16C32. A small frame is
  * 	transmitted via DMA from a transmit buffer to a receive buffer
  * 	using single buffer DMA mode.
- * 	
+ *
  * Arguments:		info	pointer to device instance data
  * Return Value:	true if test passed, otherwise false
  */
@@ -7044,17 +7044,17 @@ static bool mgsl_dma_test( struct mgsl_struct *info )
 	memcpy(&tmp_params,&info->params,sizeof(MGSL_PARAMS));
 	/* load default port options */
 	memcpy(&info->params,&default_params,sizeof(MGSL_PARAMS));
-	
+
 #define TESTFRAMESIZE 40
 
 	spin_lock_irqsave(&info->irq_spinlock,flags);
-	
+
 	/* setup 16C32 for SDLC DMA transfer mode */
 
 	usc_reset(info);
 	usc_set_sdlc_mode(info);
 	usc_enable_loopback(info,1);
-	
+
 	/* Reprogram the RDMR so that the 16C32 does NOT clear the count
 	 * field of the buffer entry after fetching buffer address. This
 	 * way we can detect a DMA failure for a DMA read (which should be
@@ -7063,7 +7063,7 @@ static bool mgsl_dma_test( struct mgsl_struct *info )
 	 */
 
 	/* Receive DMA mode Register (RDMR)
-	 * 
+	 *
 	 * <15..14>	11	DMA mode = Linked List Buffer mode
 	 * <13>		1	RSBinA/L = store Rx status Block in List entry
 	 * <12>		0	1 = Clear count of List Entry after fetching
@@ -7071,12 +7071,12 @@ static bool mgsl_dma_test( struct mgsl_struct *info )
 	 * <9>		1	Terminate Buffer on RxBound
 	 * <8>		0	Bus Width = 16bits
 	 * <7..0>		?	status Bits (write as 0s)
-	 * 
+	 *
 	 * 1110 0010 0000 0000 = 0xe200
 	 */
 
 	usc_OutDmaReg( info, RDMR, 0xe200 );
-	
+
 	spin_unlock_irqrestore(&info->irq_spinlock,flags);
 
 
@@ -7112,12 +7112,12 @@ static bool mgsl_dma_test( struct mgsl_struct *info )
 
 	info->tx_buffer_list[1].count = 0;
 	info->rx_buffer_list[1].count = 0;
-	
+
 
 	/***************************/
 	/* Program 16C32 receiver. */
 	/***************************/
-	
+
 	spin_lock_irqsave(&info->irq_spinlock,flags);
 
 	/* setup DMA transfers */
@@ -7134,7 +7134,7 @@ static bool mgsl_dma_test( struct mgsl_struct *info )
 
 	/* Enable Receiver (RMR <1..0> = 10) */
 	usc_OutReg( info, RMR, (unsigned short)((usc_InReg(info, RMR) & 0xfffc) | 0x0002) );
-	
+
 	spin_unlock_irqrestore(&info->irq_spinlock,flags);
 
 
@@ -7167,7 +7167,7 @@ static bool mgsl_dma_test( struct mgsl_struct *info )
 	/******************************/
 	/* Program 16C32 transmitter. */
 	/******************************/
-	
+
 	spin_lock_irqsave(&info->irq_spinlock,flags);
 
 	/* Program the Transmit Character Length Register (TCLR) */
@@ -7190,14 +7190,14 @@ static bool mgsl_dma_test( struct mgsl_struct *info )
 	/* wait for DMA controller to fill transmit FIFO */
 
 	usc_TCmd( info, TCmd_SelectTicrTxFifostatus );
-	
+
 	spin_unlock_irqrestore(&info->irq_spinlock,flags);
 
 
 	/**********************************/
 	/* WAIT FOR TRANSMIT FIFO TO FILL */
 	/**********************************/
-	
+
 	/* Wait 100ms */
 	EndTime = jiffies + msecs_to_jiffies(100);
 
@@ -7210,7 +7210,7 @@ static bool mgsl_dma_test( struct mgsl_struct *info )
 		spin_lock_irqsave(&info->irq_spinlock,flags);
 		FifoLevel = usc_InReg(info, TICR) >> 8;
 		spin_unlock_irqrestore(&info->irq_spinlock,flags);
-			
+
 		if ( FifoLevel < 16 )
 			break;
 		else
@@ -7228,11 +7228,11 @@ static bool mgsl_dma_test( struct mgsl_struct *info )
 		/* Enable 16C32 transmitter. */
 
 		spin_lock_irqsave(&info->irq_spinlock,flags);
-		
+
 		/* Transmit mode Register (TMR), <1..0> = 10, Enable Transmitter */
 		usc_TCmd( info, TCmd_SendFrame );
 		usc_OutReg( info, TMR, (unsigned short)((usc_InReg(info, TMR) & 0xfffc) | 0x0002) );
-		
+
 		spin_unlock_irqrestore(&info->irq_spinlock,flags);
 
 
@@ -7307,15 +7307,15 @@ static bool mgsl_dma_test( struct mgsl_struct *info )
 
 	/* restore current port options */
 	memcpy(&info->params,&tmp_params,sizeof(MGSL_PARAMS));
-	
+
 	return rc;
 
 }	/* end of mgsl_dma_test() */
 
 /* mgsl_adapter_test()
- * 
+ *
  * 	Perform the register, IRQ, and DMA tests for the 16C32.
- * 	
+ *
  * Arguments:		info	pointer to device instance data
  * Return Value:	0 if success, otherwise -ENODEV
  */
@@ -7324,7 +7324,7 @@ static int mgsl_adapter_test( struct mgsl_struct *info )
 	if ( debug_level >= DEBUG_LEVEL_INFO )
 		printk( "%s(%d):Testing device %s\n",
 			__FILE__,__LINE__,info->device_name );
-			
+
 	if ( !mgsl_register_test( info ) ) {
 		info->init_error = DiagStatus_AddressFailure;
 		printk( "%s(%d):Register test failure for device %s Addr=%04X\n",
@@ -7349,15 +7349,15 @@ static int mgsl_adapter_test( struct mgsl_struct *info )
 	if ( debug_level >= DEBUG_LEVEL_INFO )
 		printk( "%s(%d):device %s passed diagnostics\n",
 			__FILE__,__LINE__,info->device_name );
-			
+
 	return 0;
 
 }	/* end of mgsl_adapter_test() */
 
 /* mgsl_memory_test()
- * 
+ *
  * 	Test the shared memory on a PCI adapter.
- * 
+ *
  * Arguments:		info	pointer to device instance data
  * Return Value:	true if test passed, otherwise false
  */
@@ -7407,35 +7407,35 @@ static bool mgsl_memory_test( struct mgsl_struct *info )
 
 
 /* mgsl_load_pci_memory()
- * 
+ *
  * 	Load a large block of data into the PCI shared memory.
  * 	Use this instead of memcpy() or memmove() to move data
  * 	into the PCI shared memory.
- * 
+ *
  * Notes:
- * 
+ *
  * 	This function prevents the PCI9050 interface chip from hogging
  * 	the adapter local bus, which can starve the 16C32 by preventing
  * 	16C32 bus master cycles.
- * 
+ *
  * 	The PCI9050 documentation says that the 9050 will always release
  * 	control of the local bus after completing the current read
  * 	or write operation.
- * 
+ *
  * 	It appears that as long as the PCI9050 write FIFO is full, the
  * 	PCI9050 treats all of the writes as a single burst transaction
  * 	and will not release the bus. This causes DMA latency problems
  * 	at high speeds when copying large data blocks to the shared
  * 	memory.
- * 
+ *
  * 	This function in effect, breaks the a large shared memory write
  * 	into multiple transations by interleaving a shared memory read
  * 	which will flush the write FIFO and 'complete' the write
  * 	transation. This allows any pending DMA request to gain control
  * 	of the local bus in a timely fasion.
- * 
+ *
  * Arguments:
- * 
+ *
  * 	TargetPtr	pointer to target address in PCI shared memory
  * 	SourcePtr	pointer to source buffer for data
  * 	count		count in bytes of data to copy
@@ -7472,13 +7472,13 @@ static void mgsl_trace_block(struct mgsl_struct *info,const char* data, int coun
 		printk("%s tx data:\n",info->device_name);
 	else
 		printk("%s rx data:\n",info->device_name);
-		
+
 	while(count) {
 		if (count > 16)
 			linecount = 16;
 		else
 			linecount = count;
-			
+
 		for(i=0;i<linecount;i++)
 			printk("%02X ",(unsigned char)data[i]);
 		for(;i<17;i++)
@@ -7490,17 +7490,17 @@ static void mgsl_trace_block(struct mgsl_struct *info,const char* data, int coun
 				printk(".");
 		}
 		printk("\n");
-		
+
 		data  += linecount;
 		count -= linecount;
 	}
 }	/* end of mgsl_trace_block() */
 
 /* mgsl_tx_timeout()
- * 
+ *
  * 	called when HDLC frame times out
  * 	update stats and do tx completion processing
- * 	
+ *
  * Arguments:	context		pointer to device instance data
  * Return Value:	None
  */
@@ -7508,7 +7508,7 @@ static void mgsl_tx_timeout(struct timer_list *t)
 {
 	struct mgsl_struct *info = from_timer(info, t, tx_timer);
 	unsigned long flags;
-	
+
 	if ( debug_level >= DEBUG_LEVEL_INFO )
 		printk( "%s(%d):mgsl_tx_timeout(%s)\n",
 			__FILE__,__LINE__,info->device_name);
@@ -7525,14 +7525,14 @@ static void mgsl_tx_timeout(struct timer_list *t)
 		usc_loopmode_cancel_transmit( info );
 
 	spin_unlock_irqrestore(&info->irq_spinlock,flags);
-	
+
 #if SYNCLINK_GENERIC_HDLC
 	if (info->netcount)
 		hdlcdev_tx_done(info);
 	else
 #endif
 		mgsl_bh_transmit(info);
-	
+
 }	/* end of mgsl_tx_timeout() */
 
 /* signal that there are no more frames to send, so that
@@ -7542,7 +7542,7 @@ static void mgsl_tx_timeout(struct timer_list *t)
 static int mgsl_loopmode_send_done( struct mgsl_struct * info )
 {
 	unsigned long flags;
-	
+
 	spin_lock_irqsave(&info->irq_spinlock,flags);
 	if (info->params.flags & HDLC_FLAG_HDLC_LOOPMODE) {
 		if (info->tx_active)
@@ -7583,13 +7583,13 @@ static void usc_loopmode_cancel_transmit( struct mgsl_struct * info )
 static void usc_loopmode_insert_request( struct mgsl_struct * info )
 {
  	info->loopmode_insert_requested = true;
- 
+
  	/* enable RxAbort irq. On next RxAbort, clear CMR:13 to
  	 * begin repeating TxData on RxData (complete insertion)
 	 */
- 	usc_OutReg( info, RICR, 
+	usc_OutReg( info, RICR,
 		(usc_InReg( info, RICR ) | RXSTATUS_ABORT_RECEIVED ) );
-		
+
 	/* set CMR:13 to insert into loop on next GoAhead (RxAbort) */
 	info->cmr_value |= BIT13;
  	usc_OutReg(info, CMR, info->cmr_value);
@@ -8045,11 +8045,11 @@ static int synclink_init_one (struct pci_dev *dev,
 	}
 
         /* Copy user configuration info to device instance data */
-		
+
 	info->io_base = pci_resource_start(dev, 2);
 	info->irq_level = dev->irq;
 	info->phys_memory_base = pci_resource_start(dev, 3);
-				
+
         /* Because veremap only works on page boundaries we must map
 	 * a larger area than is actually implemented for the LCR
 	 * memory range. We map a full page starting at the page boundary.
@@ -8057,7 +8057,7 @@ static int synclink_init_one (struct pci_dev *dev,
 	info->phys_lcr_base = pci_resource_start(dev, 0);
 	info->lcr_offset    = info->phys_lcr_base & (PAGE_SIZE-1);
 	info->phys_lcr_base &= ~(PAGE_SIZE-1);
-				
+
 	info->bus_type = MGSL_BUS_TYPE_PCI;
 	info->io_addr_size = 8;
 	info->irq_flags = IRQF_SHARED;
@@ -8068,14 +8068,14 @@ static int synclink_init_one (struct pci_dev *dev,
 		info->hw_version = 1;
 	} else {
 		/* Version 0 PCI9050 based 5V PCI adapter
-		 * A PCI9050 bug prevents reading LCR registers if 
+		 * A PCI9050 bug prevents reading LCR registers if
 		 * LCR base address bit 7 is set. Maintain shadow
 		 * value so we can write to LCR misc control reg.
 		 */
 		info->misc_ctrl_value = 0x087e4546;
 		info->hw_version = 0;
 	}
-				
+
 	mgsl_add_device(info);
 
 	return 0;
diff --git a/drivers/tty/synclinkmp.c b/drivers/tty/synclinkmp.c
index 1e4d5b9c981a..58570451d0be 100644
--- a/drivers/tty/synclinkmp.c
+++ b/drivers/tty/synclinkmp.c
@@ -946,7 +946,7 @@ static int write(struct tty_struct *tty,
 			    info->max_frame_size - info->tx_put));
 		if (c <= 0)
 			break;
-			
+
 		memcpy(info->tx_buf + info->tx_put, buf, c);
 
 		spin_lock_irqsave(&info->lock,flags);
@@ -1291,7 +1291,7 @@ static int ioctl(struct tty_struct *tty,
 		 */
 	case TIOCMIWAIT:
 		return modem_input_wait(info,(int)arg);
-		
+
 		/*
 		 * Get counter of input serial line interrupts (DCD,RI,DSR,CTS)
 		 * Return: write counters to the user passed counter struct
@@ -2092,7 +2092,7 @@ static void isr_rxint(SLMP_INFO * info)
 
 	if (status2)
 		write_reg(info, SR2, status2);
-	
+
 	if ( debug_level >= DEBUG_LEVEL_ISR )
 		printk("%s(%d):%s isr_rxint status=%02X %02x\n",
 			__FILE__,__LINE__,info->device_name,status,status2);
@@ -4213,24 +4213,24 @@ static void tx_start(SLMP_INFO *info)
 
 			write_reg(info, TXDMA + DSR, 0); 		/* disable DMA channel */
 			write_reg(info, TXDMA + DCMD, SWABORT);	/* reset/init DMA channel */
-	
+
 			/* set TX CDA (current descriptor address) */
 			write_reg16(info, TXDMA + CDA,
 				info->tx_buf_list_ex[0].phys_entry);
-	
+
 			/* set TX EDA (last descriptor address) */
 			write_reg16(info, TXDMA + EDA,
 				info->tx_buf_list_ex[info->last_tx_buf].phys_entry);
-	
+
 			/* enable underrun IRQ */
 			info->ie1_value &= ~IDLE;
 			info->ie1_value |= UDRN;
 			write_reg(info, IE1, info->ie1_value);
 			write_reg(info, SR1, (unsigned char)(IDLE + UDRN));
-	
+
 			write_reg(info, TXDMA + DIR, 0x40);		/* enable Tx DMA interrupts (EOM) */
 			write_reg(info, TXDMA + DSR, 0xf2);		/* clear Tx DMA IRQs, enable Tx DMA */
-	
+
 			mod_timer(&info->tx_timer, jiffies +
 					msecs_to_jiffies(5000));
 		}
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index df94cdbe0096..6e47e9a5e86d 100644
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
@@ -2701,7 +2701,7 @@ static int this_tty(const void *t, struct file *file, unsigned fd)
 		return 0;
 	return file_tty(file) != t ? 0 : fd + 1;
 }
-	
+
 /*
  * This implements the "Secure Attention Key" ---  the idea is to
  * prevent trojan horses by killing all processes associated with this
diff --git a/drivers/tty/tty_ioctl.c b/drivers/tty/tty_ioctl.c
index f9bcae2b7e36..56426611050d 100644
--- a/drivers/tty/tty_ioctl.c
+++ b/drivers/tty/tty_ioctl.c
@@ -832,7 +832,7 @@ int tty_mode_ioctl(struct tty_struct *tty, struct file *file,
 		return set_termiox(real_tty, p, TERMIOS_WAIT);
 	case TCSETXF:
 		return set_termiox(real_tty, p, TERMIOS_FLUSH);
-#endif		
+#endif
 	case TIOCGSOFTCAR:
 		copy_termios(real_tty, &kterm);
 		ret = put_user((kterm.c_cflag & CLOCAL) ? 1 : 0,
diff --git a/drivers/tty/vt/consolemap.c b/drivers/tty/vt/consolemap.c
index 97d02684b922..71086e4abc9a 100644
--- a/drivers/tty/vt/consolemap.c
+++ b/drivers/tty/vt/consolemap.c
@@ -71,7 +71,7 @@ static unsigned short translations[][256] = {
     0x00e8, 0x00e9, 0x00ea, 0x00eb, 0x00ec, 0x00ed, 0x00ee, 0x00ef,
     0x00f0, 0x00f1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x00f6, 0x00f7,
     0x00f8, 0x00f9, 0x00fa, 0x00fb, 0x00fc, 0x00fd, 0x00fe, 0x00ff
-  }, 
+  },
   /* VT100 graphics mapped to Unicode */
   {
     0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007,
@@ -109,7 +109,7 @@ static unsigned short translations[][256] = {
   },
   /* IBM Codepage 437 mapped to Unicode */
   {
-    0x0000, 0x263a, 0x263b, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, 
+    0x0000, 0x263a, 0x263b, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022,
     0x25d8, 0x25cb, 0x25d9, 0x2642, 0x2640, 0x266a, 0x266b, 0x263c,
     0x25b6, 0x25c0, 0x2195, 0x203c, 0x00b6, 0x00a7, 0x25ac, 0x21a8,
     0x2191, 0x2193, 0x2192, 0x2190, 0x221f, 0x2194, 0x25b2, 0x25bc,
@@ -141,7 +141,7 @@ static unsigned short translations[][256] = {
     0x03a6, 0x0398, 0x03a9, 0x03b4, 0x221e, 0x03c6, 0x03b5, 0x2229,
     0x2261, 0x00b1, 0x2265, 0x2264, 0x2320, 0x2321, 0x00f7, 0x2248,
     0x00b0, 0x2219, 0x00b7, 0x221a, 0x207f, 0x00b2, 0x25a0, 0x00a0
-  }, 
+  },
   /* User mapping -- default to codes for direct font mapping */
   {
     0xf000, 0xf001, 0xf002, 0xf003, 0xf004, 0xf005, 0xf006, 0xf007,
@@ -201,7 +201,7 @@ static void set_inverse_transl(struct vc_data *conp, struct uni_pagedir *p, int
 	int j, glyph;
 	unsigned short *t = translations[i];
 	unsigned char *q;
-	
+
 	if (!p) return;
 	q = p->inverse_translations[i];
 
@@ -298,7 +298,7 @@ static void update_user_maps(void)
 {
 	int i;
 	struct uni_pagedir *p, *q = NULL;
-	
+
 	for (i = 0; i < MAX_NR_CONSOLES; i++) {
 		if (!vc_cons_allocated(i))
 			continue;
@@ -381,7 +381,7 @@ int con_get_trans_new(ushort __user * arg)
 }
 
 /*
- * Unicode -> current font conversion 
+ * Unicode -> current font conversion
  *
  * A font has at most 512 chars, usually 256.
  * But one font position may represent several Unicode chars.
@@ -398,7 +398,7 @@ static void con_release_unimap(struct uni_pagedir *p)
 	u16 **p1;
 	int i, j;
 
-	if (p == dflt) dflt = NULL;  
+	if (p == dflt) dflt = NULL;
 	for (i = 0; i < 32; i++) {
 		p1 = p->uni_pgdir[i];
 		if (p1 != NULL) {
@@ -430,12 +430,12 @@ void con_free_unimap(struct vc_data *vc)
 	con_release_unimap(p);
 	kfree(p);
 }
-  
+
 static int con_unify_unimap(struct vc_data *conp, struct uni_pagedir *p)
 {
 	int i, j, k;
 	struct uni_pagedir *q;
-	
+
 	for (i = 0; i < MAX_NR_CONSOLES; i++) {
 		if (!vc_cons_allocated(i))
 			continue;
@@ -494,7 +494,7 @@ con_insert_unipair(struct uni_pagedir *p, u_short unicode, u_short fontpos)
 	}
 
 	p2[unicode & 0x3f] = fontpos;
-	
+
 	p->sum += (fontpos << 20) + unicode;
 
 	return 0;
@@ -532,7 +532,7 @@ int con_clear_unimap(struct vc_data *vc)
 	console_unlock();
 	return ret;
 }
-	
+
 int con_set_unimap(struct vc_data *vc, ushort ct, struct unipair __user *list)
 {
 	int err = 0, err1, i;
@@ -556,17 +556,17 @@ int con_set_unimap(struct vc_data *vc, ushort ct, struct unipair __user *list)
 
 		goto out_unlock;
 	}
-	
+
 	if (p->refcount > 1) {
 		int j, k;
 		u16 **p1, *p2, l;
-		
+
 		err1 = con_do_clear_unimap(vc);
 		if (err1) {
 			err = err1;
 			goto out_unlock;
 		}
-		
+
 		/*
 		 * Since refcount was > 1, con_clear_unimap() allocated a
 		 * a new uni_pagedir for this vc.  Re: p != q
@@ -628,7 +628,7 @@ int con_set_unimap(struct vc_data *vc, ushort ct, struct unipair __user *list)
 		if (err1)
 			err = err1;
 	}
-	
+
 	/*
 	 * Merge with fontmaps of any other virtual consoles.
 	 */
@@ -652,7 +652,7 @@ int con_set_unimap(struct vc_data *vc, ushort ct, struct unipair __user *list)
  *	Loads the unimap for the hardware font, as defined in uni_hash.tbl.
  *	The representation used was the most compact I could come up
  *	with.  This routine is executed at video setup, and when the
- *	PIO_FONTRESET ioctl is called. 
+ *	PIO_FONTRESET ioctl is called.
  *
  *	The caller must hold the console lock
  */
@@ -675,23 +675,23 @@ int con_set_default_unimap(struct vc_data *vc)
 		}
 		return 0;
 	}
-	
+
 	/* The default font is always 256 characters */
 
 	err = con_do_clear_unimap(vc);
 	if (err)
 		return err;
-    
+
 	p = *vc->vc_uni_pagedir_loc;
 	q = dfont_unitable;
-	
+
 	for (i = 0; i < 256; i++)
 		for (j = dfont_unicount[i]; j; j--) {
 			err1 = con_insert_unipair(p, *(q++), i);
 			if (err1)
 				err = err1;
 		}
-			
+
 	if (con_unify_unimap(vc, p)) {
 		dflt = *vc->vc_uni_pagedir_loc;
 		return err;
@@ -807,12 +807,12 @@ int conv_uni_to_8bit(u32 uni)
 }
 
 int
-conv_uni_to_pc(struct vc_data *conp, long ucs) 
+conv_uni_to_pc(struct vc_data *conp, long ucs)
 {
 	int h;
 	u16 **p1, *p2;
 	struct uni_pagedir *p;
-  
+
 	/* Only 16-bit codes supported at this time */
 	if (ucs > 0xffff)
 		return -4;		/* Not found */
@@ -827,7 +827,7 @@ conv_uni_to_pc(struct vc_data *conp, long ucs)
 	 */
 	else if ((ucs & ~UNI_DIRECT_MASK) == UNI_DIRECT_BASE)
 		return ucs & UNI_DIRECT_MASK;
-  
+
 	if (!*conp->vc_uni_pagedir_loc)
 		return -3;
 
@@ -845,11 +845,11 @@ conv_uni_to_pc(struct vc_data *conp, long ucs)
  * initialized.  It must be possible to call kmalloc(..., GFP_KERNEL)
  * from this function, hence the call from sys_setup.
  */
-void __init 
+void __init
 console_map_init(void)
 {
 	int i;
-	
+
 	for (i = 0; i < MAX_NR_CONSOLES; i++)
 		if (vc_cons_allocated(i) && !*vc_cons[i].d->vc_uni_pagedir_loc)
 			con_set_default_unimap(vc_cons[i].d);
diff --git a/drivers/tty/vt/keyboard.c b/drivers/tty/vt/keyboard.c
index 214ad559fd2d..4d044bc7122f 100644
--- a/drivers/tty/vt/keyboard.c
+++ b/drivers/tty/vt/keyboard.c
@@ -1769,7 +1769,7 @@ int vt_do_diacrit(unsigned int cmd, void __user *udp, int perm)
 					  ct * sizeof(struct kbdiacruc));
 			if (IS_ERR(buf))
 				return PTR_ERR(buf);
-		} 
+		}
 		spin_lock_irqsave(&kbd_event_lock, flags);
 		if (ct)
 			memcpy(accent_table, buf,
diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
index 94131c746ef7..27f0f19a4c31 100644
--- a/drivers/tty/vt/vt.c
+++ b/drivers/tty/vt/vt.c
@@ -38,7 +38,7 @@
  *
  *     - Arno Griffioen <arno@usn.nl>
  *     - David Carter <carter@cs.bris.ac.uk>
- * 
+ *
  *   The abstract console driver provides a generic interface for a text
  *   console. It supports VGA text mode, frame buffer based graphical consoles
  *   and special graphics processors that are only accessible through some
@@ -293,7 +293,7 @@ static inline bool con_should_update(const struct vc_data *vc)
 static inline unsigned short *screenpos(struct vc_data *vc, int offset, int viewed)
 {
 	unsigned short *p;
-	
+
 	if (!viewed)
 		p = (unsigned short *)(vc->vc_origin + offset);
 	else if (!vc->vc_sw->con_screen_pos)
@@ -4380,9 +4380,9 @@ void reset_palette(struct vc_data *vc)
  *  Font switching
  *
  *  Currently we only support fonts up to 32 pixels wide, at a maximum height
- *  of 32 pixels. Userspace fontdata is stored with 32 bytes (shorts/ints, 
- *  depending on width) reserved for each character which is kinda wasty, but 
- *  this is done in order to maintain compatibility with the EGA/VGA fonts. It 
+ *  of 32 pixels. Userspace fontdata is stored with 32 bytes (shorts/ints,
+ *  depending on width) reserved for each character which is kinda wasty, but
+ *  this is done in order to maintain compatibility with the EGA/VGA fonts. It
  *  is up to the actual low-level console-driver convert data into its favorite
  *  format (maybe we should add a `fontoffset' field to the `display'
  *  structure so we won't have to convert the fontdata all the time.
@@ -4421,7 +4421,7 @@ static int con_font_get(struct vc_data *vc, struct console_font_op *op)
 	if (op->data && font.charcount > op->charcount)
 		rc = -ENOSPC;
 	if (!(op->flags & KD_FONT_FLAG_OLD)) {
-		if (font.width > op->width || font.height > op->height) 
+		if (font.width > op->width || font.height > op->height)
 			rc = -ENOSPC;
 	} else {
 		if (font.width != 8)
diff --git a/drivers/tty/vt/vt_ioctl.c b/drivers/tty/vt/vt_ioctl.c
index 30e02ec5d6a0..801f2f6e1302 100644
--- a/drivers/tty/vt/vt_ioctl.c
+++ b/drivers/tty/vt/vt_ioctl.c
@@ -222,13 +222,13 @@ int vt_waitactive(int n)
 
 
 
-static inline int 
+static inline int
 do_fontx_ioctl(int cmd, struct consolefontdesc __user *user_cfd, int perm, struct console_font_op *op)
 {
 	struct consolefontdesc cfdarg;
 	int i;
 
-	if (copy_from_user(&cfdarg, user_cfd, sizeof(struct consolefontdesc))) 
+	if (copy_from_user(&cfdarg, user_cfd, sizeof(struct consolefontdesc)))
 		return -EFAULT;
 
 	switch (cmd) {
@@ -262,7 +262,7 @@ do_fontx_ioctl(int cmd, struct consolefontdesc __user *user_cfd, int perm, struc
 	return -EINVAL;
 }
 
-static inline int 
+static inline int
 do_unimap_ioctl(int cmd, struct unimapdesc __user *user_ud, int perm, struct vc_data *vc)
 {
 	struct unimapdesc tmp;
@@ -328,7 +328,7 @@ static void vt_disallocate_all(void)
 
 /*
  * We handle the console-specific ioctl's here.  We allow the
- * capability to modify any console, not just the fg_console. 
+ * capability to modify any console, not just the fg_console.
  */
 int vt_ioctl(struct tty_struct *tty,
 	     unsigned int cmd, unsigned long arg)
@@ -382,7 +382,7 @@ int vt_ioctl(struct tty_struct *tty,
 			return -EPERM;
 	{
 		unsigned int ticks, count;
-		
+
 		/*
 		 * Generate the tone for the appropriate number of ticks.
 		 * If the time is zero, turn off sound ourselves.
@@ -433,11 +433,11 @@ int vt_ioctl(struct tty_struct *tty,
 #endif
 
 	/* Linux m68k/i386 interface for setting the keyboard delay/repeat rate */
-		
+
 	case KDKBDREP:
 	{
 		struct kbd_repeat kbrep;
-		
+
 		if (!capable(CAP_SYS_TTY_CONFIG))
 			return -EPERM;
 
@@ -664,7 +664,7 @@ int vt_ioctl(struct tty_struct *tty,
 			if (! VT_IS_IN_USE(i))
 				break;
 		uival = i < MAX_NR_CONSOLES ? (i+1) : -1;
-		goto setint;		 
+		goto setint;
 
 	/*
 	 * ioctl(fd, VT_ACTIVATE, num) will cause us to switch to vt # num,
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH v2 3/7] tty: Partially fix kernel-docs layout
  2018-10-18 22:37 [PATCH v2 0/7] drivers: tty: Fix kernel-docs comments Tobin C. Harding
  2018-10-18 22:37 ` [PATCH v2 1/7] tty: Fix whitespace before tab warnings Tobin C. Harding
  2018-10-18 22:37 ` [PATCH v2 2/7] tty: Remove trailing whitespace Tobin C. Harding
@ 2018-10-18 22:37 ` Tobin C. Harding
  2018-10-18 22:37 ` [PATCH v2 4/7] tty: Fix kernel-doc variable typos Tobin C. Harding
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: Tobin C. Harding @ 2018-10-18 22:37 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Jiri Slaby
  Cc: Tobin C. Harding, Geert Uytterhoeven, linux-kernel

Currently a bunch of the kernel-docs function comments contain custom
layout.  We should use the standard kernel-docs function comment layout
as per Documentation/doc-guide/kerenl-doc.rst

Fix layout in kernel-docs to be kernel standard.

Signed-off-by: Tobin C. Harding <tobin@kernel.org>
---

Subject line contains 'Partially' because a later patch fixes the
section format which is still part of the layout.

 drivers/tty/ehv_bytechan.c          |   2 +-
 drivers/tty/n_gsm.c                 | 699 ++++++++++++------------
 drivers/tty/n_hdlc.c                |  28 +-
 drivers/tty/n_tracerouter.c         |   4 +-
 drivers/tty/n_tracesink.c           |   4 +-
 drivers/tty/n_tty.c                 | 660 +++++++++++------------
 drivers/tty/pty.c                   | 116 ++--
 drivers/tty/serial/8250/8250_core.c |  64 +--
 drivers/tty/serial/8250/8250_port.c |  42 +-
 drivers/tty/serial/amba-pl011.c     |  26 +-
 drivers/tty/serial/earlycon.c       |  26 +-
 drivers/tty/serial/ifx6x60.c        | 382 ++++++-------
 drivers/tty/serial/ioc3_serial.c    |  68 +--
 drivers/tty/serial/ioc4_serial.c    |  82 +--
 drivers/tty/serial/kgdb_nmi.c       |   2 +-
 drivers/tty/serial/mux.c            |  44 +-
 drivers/tty/serial/serial-tegra.c   |   2 +-
 drivers/tty/serial/serial_core.c    | 198 +++----
 drivers/tty/serial/serial_txx9.c    |  20 +-
 drivers/tty/serial/sn_console.c     |  66 +--
 drivers/tty/serial/uartlite.c       |  10 +-
 drivers/tty/serial/xilinx_uartps.c  |  54 +-
 drivers/tty/tty_audit.c             |  38 +-
 drivers/tty/tty_baudrate.c          |  70 +--
 drivers/tty/tty_buffer.c            | 226 ++++----
 drivers/tty/tty_io.c                | 798 ++++++++++++++--------------
 drivers/tty/tty_ioctl.c             | 206 +++----
 drivers/tty/tty_jobctrl.c           | 132 ++---
 drivers/tty/tty_ldisc.c             | 272 +++++-----
 drivers/tty/tty_port.c              | 118 ++--
 drivers/tty/vt/consolemap.c         |  30 +-
 drivers/tty/vt/keyboard.c           | 132 ++---
 drivers/tty/vt/selection.c          |  26 +-
 drivers/tty/vt/vt.c                 |  66 +--
 drivers/tty/vt/vt_ioctl.c           |  37 +-
 35 files changed, 2372 insertions(+), 2378 deletions(-)

diff --git a/drivers/tty/ehv_bytechan.c b/drivers/tty/ehv_bytechan.c
index 769e0a5d1dfc..9e8d0439d802 100644
--- a/drivers/tty/ehv_bytechan.c
+++ b/drivers/tty/ehv_bytechan.c
@@ -730,7 +730,7 @@ static struct platform_driver ehv_bc_tty_driver = {
 };
 
 /**
- * ehv_bc_init - ePAPR hypervisor byte channel driver initialization
+ * ehv_bc_init() - ePAPR hypervisor byte channel driver initialization
  *
  * This function is called when this driver is loaded.
  */
diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c
index 86b7e20ffd7f..e25944ee2766 100644
--- a/drivers/tty/n_gsm.c
+++ b/drivers/tty/n_gsm.c
@@ -75,10 +75,10 @@ module_param(debug, int, 0600);
 #define	GSM_NET_TX_TIMEOUT (HZ*10)
 
 /**
- *	struct gsm_mux_net	-	network interface
- *	@struct gsm_dlci* dlci
+ * struct gsm_mux_net - network interface
+ * @struct gsm_dlci* dlci
  *
- *	Created when net interface is initialized.
+ * Created when net interface is initialized.
  **/
 struct gsm_mux_net {
 	struct kref ref;
@@ -359,12 +359,12 @@ static const u8 gsm_fcs8[256] = {
 #define GOOD_FCS	0xCF
 
 /**
- *	gsm_fcs_add	-	update FCS
- *	@fcs: Current FCS
- *	@c: Next data
+ * gsm_fcs_add() - update FCS
+ * @fcs: Current FCS
+ * @c: Next data
  *
- *	Update the FCS to include c. Uses the algorithm in the specification
- *	notes.
+ * Update the FCS to include c. Uses the algorithm in the specification
+ * notes.
  */
 
 static inline u8 gsm_fcs_add(u8 fcs, u8 c)
@@ -373,13 +373,13 @@ static inline u8 gsm_fcs_add(u8 fcs, u8 c)
 }
 
 /**
- *	gsm_fcs_add_block	-	update FCS for a block
- *	@fcs: Current FCS
- *	@c: buffer of data
- *	@len: length of buffer
+ * gsm_fcs_add_block() - update FCS for a block
+ * @fcs: Current FCS
+ * @c: buffer of data
+ * @len: length of buffer
  *
- *	Update the FCS to include c. Uses the algorithm in the specification
- *	notes.
+ * Update the FCS to include c. Uses the algorithm in the specification
+ * notes.
  */
 
 static inline u8 gsm_fcs_add_block(u8 fcs, u8 *c, int len)
@@ -390,12 +390,12 @@ static inline u8 gsm_fcs_add_block(u8 fcs, u8 *c, int len)
 }
 
 /**
- *	gsm_read_ea		-	read a byte into an EA
- *	@val: variable holding value
- *	c: byte going into the EA
+ * gsm_read_ea() - read a byte into an EA
+ * @val: variable holding value
+ * @c: byte going into the EA
  *
- *	Processes one byte of an EA. Updates the passed variable
- *	and returns 1 if the EA is now completely read
+ * Processes one byte of an EA. Updates the passed variable
+ * and returns 1 if the EA is now completely read
  */
 
 static int gsm_read_ea(unsigned int *val, u8 c)
@@ -408,11 +408,11 @@ static int gsm_read_ea(unsigned int *val, u8 c)
 }
 
 /**
- *	gsm_encode_modem	-	encode modem data bits
- *	@dlci: DLCI to encode from
+ * gsm_encode_modem() - encode modem data bits
+ * @dlci: DLCI to encode from
  *
- *	Returns the correct GSM encoded modem status bits (6 bit field) for
- *	the current status of the DLCI and attached tty object
+ * Returns the correct GSM encoded modem status bits (6 bit field) for
+ * the current status of the DLCI and attached tty object
  */
 
 static u8 gsm_encode_modem(const struct gsm_dlci *dlci)
@@ -433,16 +433,16 @@ static u8 gsm_encode_modem(const struct gsm_dlci *dlci)
 }
 
 /**
- *	gsm_print_packet	-	display a frame for debug
- *	@hdr: header to print before decode
- *	@addr: address EA from the frame
- *	@cr: C/R bit from the frame
- *	@control: control including PF bit
- *	@data: following data bytes
- *	@dlen: length of data
+ * gsm_print_packet() - display a frame for debug
+ * @hdr: header to print before decode
+ * @addr: address EA from the frame
+ * @cr: C/R bit from the frame
+ * @control: control including PF bit
+ * @data: following data bytes
+ * @dlen: length of data
  *
- *	Displays a packet in human readable format for debugging purposes. The
- *	style is based on amateur radio LAP-B dump display.
+ * Displays a packet in human readable format for debugging purposes. The
+ * style is based on amateur radio LAP-B dump display.
  */
 
 static void gsm_print_packet(const char *hdr, int addr, int cr,
@@ -516,14 +516,14 @@ static void gsm_print_packet(const char *hdr, int addr, int cr,
  */
 
 /**
- *	gsm_stuff_packet	-	bytestuff a packet
- *	@ibuf: input
- *	@obuf: output
- *	@len: length of input
+ * gsm_stuff_packet() - bytestuff a packet
+ * @ibuf: input
+ * @obuf: output
+ * @len: length of input
  *
- *	Expand a buffer by bytestuffing it. The worst case size change
- *	is doubling and the caller is responsible for handing out
- *	suitable sized buffers.
+ * Expand a buffer by bytestuffing it. The worst case size change
+ * is doubling and the caller is responsible for handing out
+ * suitable sized buffers.
  */
 
 static int gsm_stuff_frame(const u8 *input, u8 *output, int len)
@@ -543,17 +543,17 @@ static int gsm_stuff_frame(const u8 *input, u8 *output, int len)
 }
 
 /**
- *	gsm_send	-	send a control frame
- *	@gsm: our GSM mux
- *	@addr: address for control frame
- *	@cr: command/response bit
- *	@control:  control byte including PF bit
+ * gsm_send() - send a control frame
+ * @gsm: our GSM mux
+ * @addr: address for control frame
+ * @cr: command/response bit
+ * @control: control byte including PF bit
  *
- *	Format up and transmit a control frame. These do not go via the
- *	queueing logic as they should be transmitted ahead of data when
- *	they are needed.
+ * Format up and transmit a control frame. These do not go via the
+ * queueing logic as they should be transmitted ahead of data when
+ * they are needed.
  *
- *	FIXME: Lock versus data TX path
+ * FIXME: Lock versus data TX path
  */
 
 static void gsm_send(struct gsm_mux *gsm, int addr, int cr, int control)
@@ -595,12 +595,12 @@ static void gsm_send(struct gsm_mux *gsm, int addr, int cr, int control)
 }
 
 /**
- *	gsm_response	-	send a control response
- *	@gsm: our GSM mux
- *	@addr: address for control frame
- *	@control:  control byte including PF bit
+ * gsm_response() - send a control response
+ * @gsm: our GSM mux
+ * @addr: address for control frame
+ * @control: control byte including PF bit
  *
- *	Format up and transmit a link level response frame.
+ * Format up and transmit a link level response frame.
  */
 
 static inline void gsm_response(struct gsm_mux *gsm, int addr, int control)
@@ -609,12 +609,12 @@ static inline void gsm_response(struct gsm_mux *gsm, int addr, int control)
 }
 
 /**
- *	gsm_command	-	send a control command
- *	@gsm: our GSM mux
- *	@addr: address for control frame
- *	@control:  control byte including PF bit
+ * gsm_command() - send a control command
+ * @gsm: our GSM mux
+ * @addr: address for control frame
+ * @control: control byte including PF bit
  *
- *	Format up and transmit a link level command frame.
+ * Format up and transmit a link level command frame.
  */
 
 static inline void gsm_command(struct gsm_mux *gsm, int addr, int control)
@@ -627,15 +627,15 @@ static inline void gsm_command(struct gsm_mux *gsm, int addr, int control)
 #define HDR_LEN		6	/* ADDR CTRL [LEN.2] DATA FCS */
 
 /**
- *	gsm_data_alloc		-	allocate data frame
- *	@gsm: GSM mux
- *	@addr: DLCI address
- *	@len: length excluding header and FCS
- *	@ctrl: control byte
+ * gsm_data_alloc() - allocate data frame
+ * @gsm: GSM mux
+ * @addr: DLCI address
+ * @len: length excluding header and FCS
+ * @ctrl: control byte
  *
- *	Allocate a new data buffer for sending frames with data. Space is left
- *	at the front for header bytes but that is treated as an implementation
- *	detail and not for the high level code to use
+ * Allocate a new data buffer for sending frames with data. Space is left
+ * at the front for header bytes but that is treated as an implementation
+ * detail and not for the high level code to use
  */
 
 static struct gsm_msg *gsm_data_alloc(struct gsm_mux *gsm, u8 addr, int len,
@@ -654,15 +654,15 @@ static struct gsm_msg *gsm_data_alloc(struct gsm_mux *gsm, u8 addr, int len,
 }
 
 /**
- *	gsm_data_kick		-	poke the queue
- *	@gsm: GSM Mux
+ * gsm_data_kick() - poke the queue
+ * @gsm: GSM Mux
  *
- *	The tty device has called us to indicate that room has appeared in
- *	the transmit queue. Ram more data into the pipe if we have any
- *	If we have been flow-stopped by a CMD_FCOFF, then we can only
- *	send messages on DLCI0 until CMD_FCON
+ * The tty device has called us to indicate that room has appeared in
+ * the transmit queue. Ram more data into the pipe if we have any
+ * If we have been flow-stopped by a CMD_FCOFF, then we can only
+ * send messages on DLCI0 until CMD_FCON
  *
- *	FIXME: lock against link layer control transmissions
+ * FIXME: lock against link layer control transmissions
  */
 
 static void gsm_data_kick(struct gsm_mux *gsm)
@@ -707,13 +707,13 @@ static void gsm_data_kick(struct gsm_mux *gsm)
 }
 
 /**
- *	__gsm_data_queue		-	queue a UI or UIH frame
- *	@dlci: DLCI sending the data
- *	@msg: message queued
+ * __gsm_data_queue() - queue a UI or UIH frame
+ * @dlci: DLCI sending the data
+ * @msg: message queued
  *
- *	Add data to the transmit queue and try and get stuff moving
- *	out of the mux tty if not already doing so. The Caller must hold
- *	the gsm tx lock.
+ * Add data to the transmit queue and try and get stuff moving
+ * out of the mux tty if not already doing so. The Caller must hold
+ * the gsm tx lock.
  */
 
 static void __gsm_data_queue(struct gsm_dlci *dlci, struct gsm_msg *msg)
@@ -758,13 +758,13 @@ static void __gsm_data_queue(struct gsm_dlci *dlci, struct gsm_msg *msg)
 }
 
 /**
- *	gsm_data_queue		-	queue a UI or UIH frame
- *	@dlci: DLCI sending the data
- *	@msg: message queued
+ * gsm_data_queue() - queue a UI or UIH frame
+ * @dlci: DLCI sending the data
+ * @msg: message queued
  *
- *	Add data to the transmit queue and try and get stuff moving
- *	out of the mux tty if not already doing so. Take the
- *	the gsm tx lock and dlci lock.
+ * Add data to the transmit queue and try and get stuff moving
+ * out of the mux tty if not already doing so. Take the
+ * the gsm tx lock and dlci lock.
  */
 
 static void gsm_data_queue(struct gsm_dlci *dlci, struct gsm_msg *msg)
@@ -776,15 +776,15 @@ static void gsm_data_queue(struct gsm_dlci *dlci, struct gsm_msg *msg)
 }
 
 /**
- *	gsm_dlci_data_output	-	try and push data out of a DLCI
- *	@gsm: mux
- *	@dlci: the DLCI to pull data from
+ * gsm_dlci_data_output() - try and push data out of a DLCI
+ * @gsm: mux
+ * @dlci: the DLCI to pull data from
  *
- *	Pull data from a DLCI and send it into the transmit queue if there
- *	is data. Keep to the MRU of the mux. This path handles the usual tty
- *	interface which is a byte stream with optional modem data.
+ * Pull data from a DLCI and send it into the transmit queue if there
+ * is data. Keep to the MRU of the mux. This path handles the usual tty
+ * interface which is a byte stream with optional modem data.
  *
- *	Caller must hold the tx_lock of the mux.
+ * Caller must hold the tx_lock of the mux.
  */
 
 static int gsm_dlci_data_output(struct gsm_mux *gsm, struct gsm_dlci *dlci)
@@ -829,15 +829,15 @@ static int gsm_dlci_data_output(struct gsm_mux *gsm, struct gsm_dlci *dlci)
 }
 
 /**
- *	gsm_dlci_data_output_framed  -	try and push data out of a DLCI
- *	@gsm: mux
- *	@dlci: the DLCI to pull data from
+ * gsm_dlci_data_output_framed() - try and push data out of a DLCI
+ * @gsm: mux
+ * @dlci: the DLCI to pull data from
  *
- *	Pull data from a DLCI and send it into the transmit queue if there
- *	is data. Keep to the MRU of the mux. This path handles framed data
- *	queued as skbuffs to the DLCI.
+ * Pull data from a DLCI and send it into the transmit queue if there
+ * is data. Keep to the MRU of the mux. This path handles framed data
+ * queued as skbuffs to the DLCI.
  *
- *	Caller must hold the tx_lock of the mux.
+ * Caller must hold the tx_lock of the mux.
  */
 
 static int gsm_dlci_data_output_framed(struct gsm_mux *gsm,
@@ -902,16 +902,16 @@ static int gsm_dlci_data_output_framed(struct gsm_mux *gsm,
 }
 
 /**
- *	gsm_dlci_data_sweep		-	look for data to send
- *	@gsm: the GSM mux
+ * gsm_dlci_data_sweep() - look for data to send
+ * @gsm: the GSM mux
  *
- *	Sweep the GSM mux channels in priority order looking for ones with
- *	data to send. We could do with optimising this scan a bit. We aim
- *	to fill the queue totally or up to TX_THRESH_HI bytes. Once we hit
- *	TX_THRESH_LO we get called again
+ * Sweep the GSM mux channels in priority order looking for ones with
+ * data to send. We could do with optimising this scan a bit. We aim
+ * to fill the queue totally or up to TX_THRESH_HI bytes. Once we hit
+ * TX_THRESH_LO we get called again
  *
- *	FIXME: We should round robin between groups and in theory you can
- *	renegotiate DLCI priorities with optional stuff. Needs optimising.
+ * FIXME: We should round robin between groups and in theory you can
+ * renegotiate DLCI priorities with optional stuff. Needs optimising.
  */
 
 static void gsm_dlci_data_sweep(struct gsm_mux *gsm)
@@ -943,12 +943,12 @@ static void gsm_dlci_data_sweep(struct gsm_mux *gsm)
 }
 
 /**
- *	gsm_dlci_data_kick	-	transmit if possible
- *	@dlci: DLCI to kick
+ * gsm_dlci_data_kick() - transmit if possible
+ * @dlci: DLCI to kick
  *
- *	Transmit data from this DLCI if the queue is empty. We can't rely on
- *	a tty wakeup except when we filled the pipe so we need to fire off
- *	new data ourselves in other cases.
+ * Transmit data from this DLCI if the queue is empty. We can't rely on
+ * a tty wakeup except when we filled the pipe so we need to fire off
+ * new data ourselves in other cases.
  */
 
 static void gsm_dlci_data_kick(struct gsm_dlci *dlci)
@@ -979,13 +979,13 @@ static void gsm_dlci_data_kick(struct gsm_dlci *dlci)
 
 
 /**
- *	gsm_control_reply	-	send a response frame to a control
- *	@gsm: gsm channel
- *	@cmd: the command to use
- *	@data: data to follow encoded info
- *	@dlen: length of data
+ * gsm_control_reply() - send a response frame to a control
+ * @gsm: gsm channel
+ * @cmd: the command to use
+ * @data: data to follow encoded info
+ * @dlen: length of data
  *
- *	Encode up and queue a UI/UIH frame containing our response.
+ * Encode up and queue a UI/UIH frame containing our response.
  */
 
 static void gsm_control_reply(struct gsm_mux *gsm, int cmd, u8 *data,
@@ -1002,13 +1002,13 @@ static void gsm_control_reply(struct gsm_mux *gsm, int cmd, u8 *data,
 }
 
 /**
- *	gsm_process_modem	-	process received modem status
- *	@tty: virtual tty bound to the DLCI
- *	@dlci: DLCI to affect
- *	@modem: modem bits (full EA)
+ * gsm_process_modem() - process received modem status
+ * @tty: virtual tty bound to the DLCI
+ * @dlci: DLCI to affect
+ * @modem: modem bits (full EA)
  *
- *	Used when a modem control message or line state inline in adaption
- *	layer 2 is processed. Sort out the local modem state and throttles
+ * Used when a modem control message or line state inline in adaption
+ * layer 2 is processed. Sort out the local modem state and throttles
  */
 
 static void gsm_process_modem(struct tty_struct *tty, struct gsm_dlci *dlci,
@@ -1062,15 +1062,15 @@ static void gsm_process_modem(struct tty_struct *tty, struct gsm_dlci *dlci,
 }
 
 /**
- *	gsm_control_modem	-	modem status received
- *	@gsm: GSM channel
- *	@data: data following command
- *	@clen: command length
+ * gsm_control_modem() - modem status received
+ * @gsm: GSM channel
+ * @data: data following command
+ * @clen: command length
  *
- *	We have received a modem status control message. This is used by
- *	the GSM mux protocol to pass virtual modem line status and optionally
- *	to indicate break signals. Unpack it, convert to Linux representation
- *	and if need be stuff a break message down the tty.
+ * We have received a modem status control message. This is used by
+ * the GSM mux protocol to pass virtual modem line status and optionally
+ * to indicate break signals. Unpack it, convert to Linux representation
+ * and if need be stuff a break message down the tty.
  */
 
 static void gsm_control_modem(struct gsm_mux *gsm, u8 *data, int clen)
@@ -1124,14 +1124,14 @@ static void gsm_control_modem(struct gsm_mux *gsm, u8 *data, int clen)
 }
 
 /**
- *	gsm_control_rls		-	remote line status
- *	@gsm: GSM channel
- *	@data: data bytes
- *	@clen: data length
+ * gsm_control_rls() - remote line status
+ * @gsm: GSM channel
+ * @data: data bytes
+ * @clen: data length
  *
- *	The modem sends us a two byte message on the control channel whenever
- *	it wishes to send us an error state from the virtual link. Stuff
- *	this into the uplink tty if present
+ * The modem sends us a two byte message on the control channel whenever
+ * it wishes to send us an error state from the virtual link. Stuff
+ * this into the uplink tty if present
  */
 
 static void gsm_control_rls(struct gsm_mux *gsm, u8 *data, int clen)
@@ -1177,15 +1177,15 @@ static void gsm_control_rls(struct gsm_mux *gsm, u8 *data, int clen)
 static void gsm_dlci_begin_close(struct gsm_dlci *dlci);
 
 /**
- *	gsm_control_message	-	DLCI 0 control processing
- *	@gsm: our GSM mux
- *	@command:  the command EA
- *	@data: data beyond the command/length EAs
- *	@clen: length
+ * gsm_control_message() - DLCI 0 control processing
+ * @gsm: our GSM mux
+ * @command: the command EA
+ * @data: data beyond the command/length EAs
+ * @clen: length
  *
- *	Input processor for control messages from the other end of the link.
- *	Processes the incoming request and queues a response frame or an
- *	NSC response if not supported
+ * Input processor for control messages from the other end of the link.
+ * Processes the incoming request and queues a response frame or an
+ * NSC response if not supported
  */
 
 static void gsm_control_message(struct gsm_mux *gsm, unsigned int command,
@@ -1248,16 +1248,16 @@ static void gsm_control_message(struct gsm_mux *gsm, unsigned int command,
 }
 
 /**
- *	gsm_control_response	-	process a response to our control
- *	@gsm: our GSM mux
- *	@command: the command (response) EA
- *	@data: data beyond the command/length EA
- *	@clen: length
+ * gsm_control_response() - process a response to our control
+ * @gsm: our GSM mux
+ * @command: the command (response) EA
+ * @data: data beyond the command/length EA
+ * @clen: length
  *
- *	Process a response to an outstanding command. We only allow a single
- *	control message in flight so this is fairly easy. All the clean up
- *	is done by the caller, we just update the fields, flag it as done
- *	and return
+ * Process a response to an outstanding command. We only allow a single
+ * control message in flight so this is fairly easy. All the clean up
+ * is done by the caller, we just update the fields, flag it as done
+ * and return
  */
 
 static void gsm_control_response(struct gsm_mux *gsm, unsigned int command,
@@ -1285,11 +1285,11 @@ static void gsm_control_response(struct gsm_mux *gsm, unsigned int command,
 }
 
 /**
- *	gsm_control_transmit	-	send control packet
- *	@gsm: gsm mux
- *	@ctrl: frame to send
+ * gsm_control_transmit() - send control packet
+ * @gsm: gsm mux
+ * @ctrl: frame to send
  *
- *	Send out a pending control command (called under control lock)
+ * Send out a pending control command (called under control lock)
  */
 
 static void gsm_control_transmit(struct gsm_mux *gsm, struct gsm_control *ctrl)
@@ -1303,14 +1303,14 @@ static void gsm_control_transmit(struct gsm_mux *gsm, struct gsm_control *ctrl)
 }
 
 /**
- *	gsm_control_retransmit	-	retransmit a control frame
- *	@data: pointer to our gsm object
+ * gsm_control_retransmit() - retransmit a control frame
+ * @data: pointer to our gsm object
  *
- *	Called off the T2 timer expiry in order to retransmit control frames
- *	that have been lost in the system somewhere. The control_lock protects
- *	us from colliding with another sender or a receive completion event.
- *	In that situation the timer may still occur in a small window but
- *	gsm->pending_cmd will be NULL and we just let the timer expire.
+ * Called off the T2 timer expiry in order to retransmit control frames
+ * that have been lost in the system somewhere. The control_lock protects
+ * us from colliding with another sender or a receive completion event.
+ * In that situation the timer may still occur in a small window but
+ * gsm->pending_cmd will be NULL and we just let the timer expire.
  */
 
 static void gsm_control_retransmit(struct timer_list *t)
@@ -1337,15 +1337,15 @@ static void gsm_control_retransmit(struct timer_list *t)
 }
 
 /**
- *	gsm_control_send	-	send a control frame on DLCI 0
- *	@gsm: the GSM channel
- *	@command: command  to send including CR bit
- *	@data: bytes of data (must be kmalloced)
- *	@len: length of the block to send
+ * gsm_control_send() - send a control frame on DLCI 0
+ * @gsm: the GSM channel
+ * @command: command to send including CR bit
+ * @data: bytes of data (must be kmalloced)
+ * @len: length of the block to send
  *
- *	Queue and dispatch a control command. Only one command can be
- *	active at a time. In theory more can be outstanding but the matching
- *	gets really complicated so for now stick to one outstanding.
+ * Queue and dispatch a control command. Only one command can be
+ * active at a time. In theory more can be outstanding but the matching
+ * gets really complicated so for now stick to one outstanding.
  */
 
 static struct gsm_control *gsm_control_send(struct gsm_mux *gsm,
@@ -1381,13 +1381,13 @@ static struct gsm_control *gsm_control_send(struct gsm_mux *gsm,
 }
 
 /**
- *	gsm_control_wait	-	wait for a control to finish
- *	@gsm: GSM mux
- *	@control: control we are waiting on
+ * gsm_control_wait() - wait for a control to finish
+ * @gsm: GSM mux
+ * @control: control we are waiting on
  *
- *	Waits for the control to complete or time out. Frees any used
- *	resources and returns 0 for success, or an error if the remote
- *	rejected or ignored the request.
+ * Waits for the control to complete or time out. Frees any used
+ * resources and returns 0 for success, or an error if the remote
+ * rejected or ignored the request.
  */
 
 static int gsm_control_wait(struct gsm_mux *gsm, struct gsm_control *control)
@@ -1409,11 +1409,11 @@ static int gsm_control_wait(struct gsm_mux *gsm, struct gsm_control *control)
  */
 
 /**
- *	gsm_dlci_close		-	a DLCI has closed
- *	@dlci: DLCI that closed
+ * gsm_dlci_close() - a DLCI has closed
+ * @dlci: DLCI that closed
  *
- *	Perform processing when moving a DLCI into closed state. If there
- *	is an attached tty this is hung up
+ * Perform processing when moving a DLCI into closed state. If there
+ * is an attached tty this is hung up
  */
 
 static void gsm_dlci_close(struct gsm_dlci *dlci)
@@ -1433,10 +1433,10 @@ static void gsm_dlci_close(struct gsm_dlci *dlci)
 }
 
 /**
- *	gsm_dlci_open		-	a DLCI has opened
- *	@dlci: DLCI that opened
+ * gsm_dlci_open() - a DLCI has opened
+ * @dlci: DLCI that opened
  *
- *	Perform processing when moving a DLCI into open state.
+ * Perform processing when moving a DLCI into open state.
  */
 
 static void gsm_dlci_open(struct gsm_dlci *dlci)
@@ -1452,18 +1452,18 @@ static void gsm_dlci_open(struct gsm_dlci *dlci)
 }
 
 /**
- *	gsm_dlci_t1		-	T1 timer expiry
- *	@dlci: DLCI that opened
+ * gsm_dlci_t1() - T1 timer expiry
+ * @dlci: DLCI that opened
  *
- *	The T1 timer handles retransmits of control frames (essentially of
- *	SABM and DISC). We resend the command until the retry count runs out
- *	in which case an opening port goes back to closed and a closing port
- *	is simply put into closed state (any further frames from the other
- *	end will get a DM response)
+ * The T1 timer handles retransmits of control frames (essentially of
+ * SABM and DISC). We resend the command until the retry count runs out
+ * in which case an opening port goes back to closed and a closing port
+ * is simply put into closed state (any further frames from the other
+ * end will get a DM response)
  *
- *	Some control dlci can stay in ADM mode with other dlci working just
- *	fine. In that case we can just keep the control dlci open after the
- *	DLCI_OPENING retries time out.
+ * Some control dlci can stay in ADM mode with other dlci working just
+ * fine. In that case we can just keep the control dlci open after the
+ * DLCI_OPENING retries time out.
  */
 
 static void gsm_dlci_t1(struct timer_list *t)
@@ -1500,13 +1500,13 @@ static void gsm_dlci_t1(struct timer_list *t)
 }
 
 /**
- *	gsm_dlci_begin_open	-	start channel open procedure
- *	@dlci: DLCI to open
+ * gsm_dlci_begin_open() - start channel open procedure
+ * @dlci: DLCI to open
  *
- *	Commence opening a DLCI from the Linux side. We issue SABM messages
- *	to the modem which should then reply with a UA or ADM, at which point
- *	we will move into open state. Opening is done asynchronously with retry
- *	running off timers and the responses.
+ * Commence opening a DLCI from the Linux side. We issue SABM messages
+ * to the modem which should then reply with a UA or ADM, at which point
+ * we will move into open state. Opening is done asynchronously with retry
+ * running off timers and the responses.
  */
 
 static void gsm_dlci_begin_open(struct gsm_dlci *dlci)
@@ -1521,14 +1521,14 @@ static void gsm_dlci_begin_open(struct gsm_dlci *dlci)
 }
 
 /**
- *	gsm_dlci_begin_close	-	start channel open procedure
- *	@dlci: DLCI to open
+ * gsm_dlci_begin_close() - start channel open procedure
+ * @dlci: DLCI to open
  *
- *	Commence closing a DLCI from the Linux side. We issue DISC messages
- *	to the modem which should then reply with a UA, at which point we
- *	will move into closed state. Closing is done asynchronously with retry
- *	off timers. We may also receive a DM reply from the other end which
- *	indicates the channel was already closed.
+ * Commence closing a DLCI from the Linux side. We issue DISC messages
+ * to the modem which should then reply with a UA, at which point we
+ * will move into closed state. Closing is done asynchronously with retry
+ * off timers. We may also receive a DM reply from the other end which
+ * indicates the channel was already closed.
  */
 
 static void gsm_dlci_begin_close(struct gsm_dlci *dlci)
@@ -1543,14 +1543,14 @@ static void gsm_dlci_begin_close(struct gsm_dlci *dlci)
 }
 
 /**
- *	gsm_dlci_data		-	data arrived
- *	@dlci: channel
- *	@data: block of bytes received
- *	@len: length of received block
+ * gsm_dlci_data() - data arrived
+ * @dlci: channel
+ * @data: block of bytes received
+ * @len: length of received block
  *
- *	A UI or UIH frame has arrived which contains data for a channel
- *	other than the control channel. If the relevant virtual tty is
- *	open we shovel the bits down it, if not we drop them.
+ * A UI or UIH frame has arrived which contains data for a channel
+ * other than the control channel. If the relevant virtual tty is
+ * open we shovel the bits down it, if not we drop them.
  */
 
 static void gsm_dlci_data(struct gsm_dlci *dlci, u8 *data, int clen)
@@ -1592,15 +1592,15 @@ static void gsm_dlci_data(struct gsm_dlci *dlci, u8 *data, int clen)
 }
 
 /**
- *	gsm_dlci_control	-	data arrived on control channel
- *	@dlci: channel
- *	@data: block of bytes received
- *	@len: length of received block
+ * gsm_dlci_control() - data arrived on control channel
+ * @dlci: channel
+ * @data: block of bytes received
+ * @len: length of received block
  *
- *	A UI or UIH frame has arrived which contains data for DLCI 0 the
- *	control channel. This should contain a command EA followed by
- *	control data bytes. The command EA contains a command/response bit
- *	and we divide up the work accordingly.
+ * A UI or UIH frame has arrived which contains data for DLCI 0 the
+ * control channel. This should contain a command EA followed by
+ * control data bytes. The command EA contains a command/response bit
+ * and we divide up the work accordingly.
  */
 
 static void gsm_dlci_command(struct gsm_dlci *dlci, u8 *data, int len)
@@ -1632,13 +1632,13 @@ static void gsm_dlci_command(struct gsm_dlci *dlci, u8 *data, int len)
  */
 
 /**
- *	gsm_dlci_alloc		-	allocate a DLCI
- *	@gsm: GSM mux
- *	@addr: address of the DLCI
+ * gsm_dlci_alloc() - allocate a DLCI
+ * @gsm: GSM mux
+ * @addr: address of the DLCI
  *
- *	Allocate and install a new DLCI object into the GSM mux.
+ * Allocate and install a new DLCI object into the GSM mux.
  *
- *	FIXME: review locking races
+ * FIXME: review locking races
  */
 
 static struct gsm_dlci *gsm_dlci_alloc(struct gsm_mux *gsm, int addr)
@@ -1671,12 +1671,12 @@ static struct gsm_dlci *gsm_dlci_alloc(struct gsm_mux *gsm, int addr)
 }
 
 /**
- *	gsm_dlci_free		-	free DLCI
- *	@dlci: DLCI to free
+ * gsm_dlci_free() - free DLCI
+ * @dlci: DLCI to free
  *
- *	Free up a DLCI.
+ * Free up a DLCI.
  *
- *	Can sleep.
+ * Can sleep.
  */
 static void gsm_dlci_free(struct tty_port *port)
 {
@@ -1703,13 +1703,13 @@ static inline void dlci_put(struct gsm_dlci *dlci)
 static void gsm_destroy_network(struct gsm_dlci *dlci);
 
 /**
- *	gsm_dlci_release		-	release DLCI
- *	@dlci: DLCI to destroy
+ * gsm_dlci_release() - release DLCI
+ * @dlci: DLCI to destroy
  *
- *	Release a DLCI. Actual free is deferred until either
- *	mux is closed or tty is closed - whichever is last.
+ * Release a DLCI. Actual free is deferred until either
+ * mux is closed or tty is closed - whichever is last.
  *
- *	Can sleep.
+ * Can sleep.
  */
 static void gsm_dlci_release(struct gsm_dlci *dlci)
 {
@@ -1733,13 +1733,13 @@ static void gsm_dlci_release(struct gsm_dlci *dlci)
  */
 
 /**
- *	gsm_queue		-	a GSM frame is ready to process
- *	@gsm: pointer to our gsm mux
+ * gsm_queue() - a GSM frame is ready to process
+ * @gsm: pointer to our gsm mux
  *
- *	At this point in time a frame has arrived and been demangled from
- *	the line encoding. All the differences between the encodings have
- *	been handled below us and the frame is unpacked into the structures.
- *	The fcs holds the header FCS but any data FCS must be added here.
+ * At this point in time a frame has arrived and been demangled from
+ * the line encoding. All the differences between the encodings have
+ * been handled below us and the frame is unpacked into the structures.
+ * The fcs holds the header FCS but any data FCS must be added here.
  */
 
 static void gsm_queue(struct gsm_mux *gsm)
@@ -1848,13 +1848,12 @@ static void gsm_queue(struct gsm_mux *gsm)
 
 
 /**
- *	gsm0_receive	-	perform processing for non-transparency
- *	@gsm: gsm data for this ldisc instance
- *	@c: character
+ * gsm0_receive() - perform processing for non-transparency
+ * @gsm: gsm data for this ldisc instance
+ * @c: character
  *
- *	Receive bytes in gsm mode 0
+ * Receive bytes in gsm mode 0
  */
-
 static void gsm0_receive(struct gsm_mux *gsm, unsigned char c)
 {
 	unsigned int len;
@@ -1930,13 +1929,12 @@ static void gsm0_receive(struct gsm_mux *gsm, unsigned char c)
 }
 
 /**
- *	gsm1_receive	-	perform processing for non-transparency
- *	@gsm: gsm data for this ldisc instance
- *	@c: character
+ * gsm1_receive() - perform processing for non-transparency
+ * @gsm: gsm data for this ldisc instance
+ * @c: character
  *
- *	Receive bytes in mode 1 (Advanced option)
+ * Receive bytes in mode 1 (Advanced option)
  */
-
 static void gsm1_receive(struct gsm_mux *gsm, unsigned char c)
 {
 	if (c == GSM1_SOF) {
@@ -2004,15 +2002,15 @@ static void gsm1_receive(struct gsm_mux *gsm, unsigned char c)
 }
 
 /**
- *	gsm_error		-	handle tty error
- *	@gsm: ldisc data
- *	@data: byte received (may be invalid)
- *	@flag: error received
+ * gsm_error() - handle tty error
+ * @gsm: ldisc data
+ * @data: byte received (may be invalid)
+ * @flag: error received
  *
- *	Handle an error in the receipt of data for a frame. Currently we just
- *	go back to hunting for a SOF.
+ * Handle an error in the receipt of data for a frame. Currently we just
+ * go back to hunting for a SOF.
  *
- *	FIXME: better diagnostics ?
+ * FIXME: better diagnostics ?
  */
 
 static void gsm_error(struct gsm_mux *gsm,
@@ -2050,12 +2048,12 @@ static int gsm_disconnect(struct gsm_mux *gsm)
 }
 
 /**
- *	gsm_cleanup_mux		-	generic GSM protocol cleanup
- *	@gsm: our mux
+ * gsm_cleanup_mux() - generic GSM protocol cleanup
+ * @gsm: our mux
  *
- *	Clean up the bits of the mux which are the same for all framing
- *	protocols. Remove the mux from the mux table, stop all the timers
- *	and then shut down each device hanging up the channels as we go.
+ * Clean up the bits of the mux which are the same for all framing
+ * protocols. Remove the mux from the mux table, stop all the timers
+ * and then shut down each device hanging up the channels as we go.
  */
 
 static void gsm_cleanup_mux(struct gsm_mux *gsm)
@@ -2096,12 +2094,12 @@ static void gsm_cleanup_mux(struct gsm_mux *gsm)
 }
 
 /**
- *	gsm_activate_mux	-	generic GSM setup
- *	@gsm: our mux
+ * gsm_activate_mux() - generic GSM setup
+ * @gsm: our mux
  *
- *	Set up the bits of the mux which are the same for all framing
- *	protocols. Add the mux to the mux table so it can be opened and
- *	finally kick off connecting to DLCI 0 on the modem.
+ * Set up the bits of the mux which are the same for all framing
+ * protocols. Add the mux to the mux table so it can be opened and
+ * finally kick off connecting to DLCI 0 on the modem.
  */
 
 static int gsm_activate_mux(struct gsm_mux *gsm)
@@ -2140,10 +2138,10 @@ static int gsm_activate_mux(struct gsm_mux *gsm)
 }
 
 /**
- *	gsm_free_mux		-	free up a mux
- *	@mux: mux to free
+ * gsm_free_mux() - free up a mux
+ * @mux: mux to free
  *
- *	Dispose of allocated resources for a dead mux
+ * Dispose of allocated resources for a dead mux
  */
 static void gsm_free_mux(struct gsm_mux *gsm)
 {
@@ -2153,10 +2151,10 @@ static void gsm_free_mux(struct gsm_mux *gsm)
 }
 
 /**
- *	gsm_free_muxr		-	free up a mux
- *	@mux: mux to free
+ * gsm_free_muxr() - free up a mux
+ * @mux: mux to free
  *
- *	Dispose of allocated resources for a dead mux
+ * Dispose of allocated resources for a dead mux
  */
 static void gsm_free_muxr(struct kref *ref)
 {
@@ -2175,11 +2173,10 @@ static inline void mux_put(struct gsm_mux *gsm)
 }
 
 /**
- *	gsm_alloc_mux		-	allocate a mux
+ * gsm_alloc_mux() - allocate a mux
  *
- *	Creates a new mux ready for activation.
+ * Creates a new mux ready for activation.
  */
-
 static struct gsm_mux *gsm_alloc_mux(void)
 {
 	struct gsm_mux *gsm = kzalloc(sizeof(struct gsm_mux), GFP_KERNEL);
@@ -2215,13 +2212,13 @@ static struct gsm_mux *gsm_alloc_mux(void)
 }
 
 /**
- *	gsmld_output		-	write to link
- *	@gsm: our mux
- *	@data: bytes to output
- *	@len: size
+ * gsmld_output() - write to link
+ * @gsm: our mux
+ * @data: bytes to output
+ * @len: size
  *
- *	Write a block of data from the GSM mux to the data channel. This
- *	will eventually be serialized from above but at the moment isn't.
+ * Write a block of data from the GSM mux to the data channel. This
+ * will eventually be serialized from above but at the moment isn't.
  */
 
 static int gsmld_output(struct gsm_mux *gsm, u8 *data, int len)
@@ -2238,13 +2235,13 @@ static int gsmld_output(struct gsm_mux *gsm, u8 *data, int len)
 }
 
 /**
- *	gsmld_attach_gsm	-	mode set up
- *	@tty: our tty structure
- *	@gsm: our mux
+ * gsmld_attach_gsm() - mode set up
+ * @tty: our tty structure
+ * @gsm: our mux
  *
- *	Set up the MUX for basic mode and commence connecting to the
- *	modem. Currently called from the line discipline set up but
- *	will need moving to an ioctl path.
+ * Set up the MUX for basic mode and commence connecting to the
+ * modem. Currently called from the line discipline set up but
+ * will need moving to an ioctl path.
  */
 
 static int gsmld_attach_gsm(struct tty_struct *tty, struct gsm_mux *gsm)
@@ -2266,15 +2263,13 @@ static int gsmld_attach_gsm(struct tty_struct *tty, struct gsm_mux *gsm)
 	return ret;
 }
 
-
 /**
- *	gsmld_detach_gsm	-	stop doing 0710 mux
- *	@tty: tty attached to the mux
- *	@gsm: mux
+ * gsmld_detach_gsm() - stop doing 0710 mux
+ * @tty: tty attached to the mux
+ * @gsm: mux
  *
- *	Shutdown and then clean up the resources used by the line discipline
+ * Shutdown and then clean up the resources used by the line discipline
  */
-
 static void gsmld_detach_gsm(struct tty_struct *tty, struct gsm_mux *gsm)
 {
 	int i;
@@ -2325,26 +2320,25 @@ static void gsmld_receive_buf(struct tty_struct *tty, const unsigned char *cp,
 }
 
 /**
- *	gsmld_flush_buffer	-	clean input queue
- *	@tty:	terminal device
+ * gsmld_flush_buffer() - clean input queue
+ * @tty: terminal device
  *
- *	Flush the input buffer. Called when the line discipline is
- *	being closed, when the tty layer wants the buffer flushed (eg
- *	at hangup).
+ * Flush the input buffer. Called when the line discipline is
+ * being closed, when the tty layer wants the buffer flushed (eg
+ * at hangup).
  */
-
 static void gsmld_flush_buffer(struct tty_struct *tty)
 {
 }
 
 /**
- *	gsmld_close		-	close the ldisc for this tty
- *	@tty: device
+ * gsmld_close() - close the ldisc for this tty
+ * @tty: device
  *
- *	Called from the terminal layer when this line discipline is
- *	being shut down, either because of a close or becsuse of a
- *	discipline change. The function will not be called while other
- *	ldisc methods are in progress.
+ * Called from the terminal layer when this line discipline is
+ * being shut down, either because of a close or becsuse of a
+ * discipline change. The function will not be called while other
+ * ldisc methods are in progress.
  */
 
 static void gsmld_close(struct tty_struct *tty)
@@ -2359,13 +2353,13 @@ static void gsmld_close(struct tty_struct *tty)
 }
 
 /**
- *	gsmld_open		-	open an ldisc
- *	@tty: terminal to open
+ * gsmld_open() - open an ldisc
+ * @tty: terminal to open
  *
- *	Called when this line discipline is being attached to the
- *	terminal device. Can sleep. Called serialized so that no
- *	other events will occur in parallel. No further open will occur
- *	until a close.
+ * Called when this line discipline is being attached to the
+ * terminal device. Can sleep. Called serialized so that no
+ * other events will occur in parallel. No further open will occur
+ * until a close.
  */
 
 static int gsmld_open(struct tty_struct *tty)
@@ -2396,14 +2390,13 @@ static int gsmld_open(struct tty_struct *tty)
 }
 
 /**
- *	gsmld_write_wakeup	-	asynchronous I/O notifier
- *	@tty: tty device
+ * gsmld_write_wakeup() - asynchronous I/O notifier
+ * @tty: tty device
  *
- *	Required for the ptys, serial driver etc. since processes
- *	that attach themselves to the master and rely on ASYNC
- *	IO must be woken up
+ * Required for the ptys, serial driver etc. since processes
+ * that attach themselves to the master and rely on ASYNC
+ * IO must be woken up
  */
-
 static void gsmld_write_wakeup(struct tty_struct *tty)
 {
 	struct gsm_mux *gsm = tty->disc_data;
@@ -2420,18 +2413,18 @@ static void gsmld_write_wakeup(struct tty_struct *tty)
 }
 
 /**
- *	gsmld_read		-	read function for tty
- *	@tty: tty device
- *	@file: file object
- *	@buf: userspace buffer pointer
- *	@nr: size of I/O
+ * gsmld_read() - read function for tty
+ * @tty: tty device
+ * @file: file object
+ * @buf: userspace buffer pointer
+ * @nr: size of I/O
  *
- *	Perform reads for the line discipline. We are guaranteed that the
- *	line discipline will not be closed under us but we may get multiple
- *	parallel readers and must handle this ourselves. We may also get
- *	a hangup. Always called in user context, may sleep.
+ * Perform reads for the line discipline. We are guaranteed that the
+ * line discipline will not be closed under us but we may get multiple
+ * parallel readers and must handle this ourselves. We may also get
+ * a hangup. Always called in user context, may sleep.
  *
- *	This code must be sure never to sleep through a hangup.
+ * This code must be sure never to sleep through a hangup.
  */
 
 static ssize_t gsmld_read(struct tty_struct *tty, struct file *file,
@@ -2441,17 +2434,17 @@ static ssize_t gsmld_read(struct tty_struct *tty, struct file *file,
 }
 
 /**
- *	gsmld_write		-	write function for tty
- *	@tty: tty device
- *	@file: file object
- *	@buf: userspace buffer pointer
- *	@nr: size of I/O
+ * gsmld_write() - write function for tty
+ * @tty: tty device
+ * @file: file object
+ * @buf: userspace buffer pointer
+ * @nr: size of I/O
  *
- *	Called when the owner of the device wants to send a frame
- *	itself (or some other control data). The data is transferred
- *	as-is and must be properly framed and checksummed as appropriate
- *	by userspace. Frames are either sent whole or not at all as this
- *	avoids pain user side.
+ * Called when the owner of the device wants to send a frame
+ * itself (or some other control data). The data is transferred
+ * as-is and must be properly framed and checksummed as appropriate
+ * by userspace. Frames are either sent whole or not at all as this
+ * avoids pain user side.
  */
 
 static ssize_t gsmld_write(struct tty_struct *tty, struct file *file,
@@ -2465,17 +2458,17 @@ static ssize_t gsmld_write(struct tty_struct *tty, struct file *file,
 }
 
 /**
- *	gsmld_poll		-	poll method for N_GSM0710
- *	@tty: terminal device
- *	@file: file accessing it
- *	@wait: poll table
+ * gsmld_poll() - poll method for N_GSM0710
+ * @tty: terminal device
+ * @file: file accessing it
+ * @wait: poll table
  *
- *	Called when the line discipline is asked to poll() for data or
- *	for special events. This code is not serialized with respect to
- *	other events save open/close.
+ * Called when the line discipline is asked to poll() for data or
+ * for special events. This code is not serialized with respect to
+ * other events save open/close.
  *
- *	This code must be sure never to sleep through a hangup.
- *	Called without the kernel lock held - fine
+ * This code must be sure never to sleep through a hangup.
+ * Called without the kernel lock held - fine
  */
 
 static __poll_t gsmld_poll(struct tty_struct *tty, struct file *file,
diff --git a/drivers/tty/n_hdlc.c b/drivers/tty/n_hdlc.c
index 789251f8a1e2..4b7aaf9ee09c 100644
--- a/drivers/tty/n_hdlc.c
+++ b/drivers/tty/n_hdlc.c
@@ -227,7 +227,7 @@ static struct tty_ldisc_ops n_hdlc_ldisc = {
 };
 
 /**
- * n_hdlc_release - release an n_hdlc per device line discipline info structure
+ * n_hdlc_release() - release an n_hdlc per device line discipline info structure
  * @n_hdlc - per device line discipline info structure
  */
 static void n_hdlc_release(struct n_hdlc *n_hdlc)
@@ -279,7 +279,7 @@ static void n_hdlc_release(struct n_hdlc *n_hdlc)
 }	/* end of n_hdlc_release() */
 
 /**
- * n_hdlc_tty_close - line discipline close
+ * n_hdlc_tty_close() - line discipline close
  * @tty - pointer to tty info structure
  *
  * Called when the line discipline is changed to something
@@ -318,7 +318,7 @@ static void n_hdlc_tty_close(struct tty_struct *tty)
 }	/* end of n_hdlc_tty_close() */
 
 /**
- * n_hdlc_tty_open - called when line discipline changed to n_hdlc
+ * n_hdlc_tty_open() - called when line discipline changed to n_hdlc
  * @tty - pointer to tty info structure
  *
  * Returns 0 if success, otherwise error code
@@ -364,7 +364,7 @@ static int n_hdlc_tty_open (struct tty_struct *tty)
 }	/* end of n_tty_hdlc_open() */
 
 /**
- * n_hdlc_send_frames - send frames on pending send buffer list
+ * n_hdlc_send_frames() - send frames on pending send buffer list
  * @n_hdlc - pointer to ldisc instance data
  * @tty - pointer to tty instance data
  *
@@ -456,7 +456,7 @@ static void n_hdlc_send_frames(struct n_hdlc *n_hdlc, struct tty_struct *tty)
 }	/* end of n_hdlc_send_frames() */
 
 /**
- * n_hdlc_tty_wakeup - Callback for transmit wakeup
+ * n_hdlc_tty_wakeup() - Callback for transmit wakeup
  * @tty	- pointer to associated tty instance data
  *
  * Called when low level device driver can accept more send data.
@@ -481,7 +481,7 @@ static void n_hdlc_tty_wakeup(struct tty_struct *tty)
 }	/* end of n_hdlc_tty_wakeup() */
 
 /**
- * n_hdlc_tty_receive - Called by tty driver when receive data is available
+ * n_hdlc_tty_receive() - Called by tty driver when receive data is available
  * @tty	- pointer to tty instance data
  * @data - pointer to received data
  * @flags - pointer to flags for data
@@ -549,7 +549,7 @@ static void n_hdlc_tty_receive(struct tty_struct *tty, const __u8 *data,
 }	/* end of n_hdlc_tty_receive() */
 
 /**
- * n_hdlc_tty_read - Called to retrieve one frame of data (if available)
+ * n_hdlc_tty_read() - Called to retrieve one frame of data (if available)
  * @tty - pointer to tty instance data
  * @file - pointer to open file object
  * @buf - pointer to returned data buffer
@@ -633,7 +633,7 @@ static ssize_t n_hdlc_tty_read(struct tty_struct *tty, struct file *file,
 }	/* end of n_hdlc_tty_read() */
 
 /**
- * n_hdlc_tty_write - write a single frame of data to device
+ * n_hdlc_tty_write() - write a single frame of data to device
  * @tty	- pointer to associated tty device instance data
  * @file - pointer to file object data
  * @data - pointer to transmit data (one frame)
@@ -717,7 +717,7 @@ static ssize_t n_hdlc_tty_write(struct tty_struct *tty, struct file *file,
 }	/* end of n_hdlc_tty_write() */
 
 /**
- * n_hdlc_tty_ioctl - process IOCTL system call for the tty device.
+ * n_hdlc_tty_ioctl() - process IOCTL system call for the tty device.
  * @tty - pointer to tty instance data
  * @file - pointer to open file object for device
  * @cmd - IOCTL command code
@@ -787,7 +787,7 @@ static int n_hdlc_tty_ioctl(struct tty_struct *tty, struct file *file,
 }	/* end of n_hdlc_tty_ioctl() */
 
 /**
- * n_hdlc_tty_poll - TTY callback for poll system call
+ * n_hdlc_tty_poll() - TTY callback for poll system call
  * @tty - pointer to tty instance data
  * @filp - pointer to open file object for device
  * @poll_table - wait queue for operations
@@ -827,7 +827,7 @@ static __poll_t n_hdlc_tty_poll(struct tty_struct *tty, struct file *filp,
 }	/* end of n_hdlc_tty_poll() */
 
 /**
- * n_hdlc_alloc - allocate an n_hdlc instance data structure
+ * n_hdlc_alloc() - allocate an n_hdlc instance data structure
  *
  * Returns a pointer to newly created structure if success, otherwise %NULL
  */
@@ -877,7 +877,7 @@ static struct n_hdlc *n_hdlc_alloc(void)
 }	/* end of n_hdlc_alloc() */
 
 /**
- * n_hdlc_buf_return - put the HDLC buffer after the head of the specified list
+ * n_hdlc_buf_return() - put the HDLC buffer after the head of the specified list
  * @buf_list - pointer to the buffer list
  * @buf - pointer to the buffer
  */
@@ -895,7 +895,7 @@ static void n_hdlc_buf_return(struct n_hdlc_buf_list *buf_list,
 }
 
 /**
- * n_hdlc_buf_put - add specified HDLC buffer to tail of specified list
+ * n_hdlc_buf_put() - add specified HDLC buffer to tail of specified list
  * @buf_list - pointer to buffer list
  * @buf	- pointer to buffer
  */
@@ -913,7 +913,7 @@ static void n_hdlc_buf_put(struct n_hdlc_buf_list *buf_list,
 }	/* end of n_hdlc_buf_put() */
 
 /**
- * n_hdlc_buf_get - remove and return an HDLC buffer from list
+ * n_hdlc_buf_get() - remove and return an HDLC buffer from list
  * @buf_list - pointer to HDLC buffer list
  *
  * Remove and return an HDLC buffer from the head of the specified HDLC buffer
diff --git a/drivers/tty/n_tracerouter.c b/drivers/tty/n_tracerouter.c
index 4479af4d2fa5..f7a2616145cf 100644
--- a/drivers/tty/n_tracerouter.c
+++ b/drivers/tty/n_tracerouter.c
@@ -184,7 +184,7 @@ static struct tty_ldisc_ops tty_ptirouter_ldisc = {
 };
 
 /**
- * n_tracerouter_init -	module initialisation
+ * n_tracerouter_init() - module initialisation
  *
  * Registers this module as a line discipline driver.
  *
@@ -210,7 +210,7 @@ static int __init n_tracerouter_init(void)
 }
 
 /**
- * n_tracerouter_exit -	module unload
+ * n_tracerouter_exit() - module unload
  *
  * Removes this module as a line discipline driver.
  */
diff --git a/drivers/tty/n_tracesink.c b/drivers/tty/n_tracesink.c
index d96ba82cc356..8feeea7d33b6 100644
--- a/drivers/tty/n_tracesink.c
+++ b/drivers/tty/n_tracesink.c
@@ -188,7 +188,7 @@ static struct tty_ldisc_ops tty_n_tracesink = {
 };
 
 /**
- * n_tracesink_init-	module initialisation
+ * n_tracesink_init() - module initialisation
  *
  * Registers this module as a line discipline driver.
  *
@@ -207,7 +207,7 @@ static int __init n_tracesink_init(void)
 }
 
 /**
- * n_tracesink_exit -	module unload
+ * n_tracesink_exit() - module unload
  *
  * Removes this module as a line discipline driver.
  */
diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c
index 3ad460219fd6..af0836f11459 100644
--- a/drivers/tty/n_tty.c
+++ b/drivers/tty/n_tty.c
@@ -188,15 +188,15 @@ static int tty_copy_to_user(struct tty_struct *tty, void __user *to,
 }
 
 /**
- *	n_tty_kick_worker - start input worker (if required)
- *	@tty: terminal
+ * n_tty_kick_worker() - start input worker (if required)
+ * @tty: terminal
  *
- *	Re-schedules the flip buffer work if it may have stopped
+ * Re-schedules the flip buffer work if it may have stopped
  *
- *	Caller holds exclusive termios_rwsem
- *	   or
- *	n_tty_read()/consumer path:
- *		holds non-exclusive termios_rwsem
+ * Caller holds exclusive termios_rwsem
+ *    or
+ * n_tty_read()/consumer path:
+ *    holds non-exclusive termios_rwsem
  */
 
 static void n_tty_kick_worker(struct tty_struct *tty)
@@ -232,12 +232,12 @@ static ssize_t chars_in_buffer(struct tty_struct *tty)
 }
 
 /**
- *	n_tty_write_wakeup	-	asynchronous I/O notifier
- *	@tty: tty device
+ * n_tty_write_wakeup() - asynchronous I/O notifier
+ * @tty: tty device
  *
- *	Required for the ptys, serial driver etc. since processes
- *	that attach themselves to the master and rely on ASYNC
- *	IO must be woken up
+ * Required for the ptys, serial driver etc. since processes
+ * that attach themselves to the master and rely on ASYNC
+ * IO must be woken up
  */
 
 static void n_tty_write_wakeup(struct tty_struct *tty)
@@ -302,14 +302,14 @@ static void n_tty_check_unthrottle(struct tty_struct *tty)
 }
 
 /**
- *	put_tty_queue		-	add character to tty
- *	@c: character
- *	@ldata: n_tty data
+ * put_tty_queue() - add character to tty
+ * @c: character
+ * @ldata: n_tty data
  *
- *	Add a character to the tty read_buf queue.
+ * Add a character to the tty read_buf queue.
  *
- *	n_tty_receive_buf()/producer path:
- *		caller holds non-exclusive termios_rwsem
+ * n_tty_receive_buf()/producer path:
+ *     caller holds non-exclusive termios_rwsem
  */
 
 static inline void put_tty_queue(unsigned char c, struct n_tty_data *ldata)
@@ -319,14 +319,14 @@ static inline void put_tty_queue(unsigned char c, struct n_tty_data *ldata)
 }
 
 /**
- *	reset_buffer_flags	-	reset buffer state
- *	@tty: terminal to reset
+ * reset_buffer_flags() - reset buffer state
+ * @tty: terminal to reset
  *
- *	Reset the read buffer counters and clear the flags.
- *	Called from n_tty_open() and n_tty_flush_buffer().
+ * Reset the read buffer counters and clear the flags.
+ * Called from n_tty_open() and n_tty_flush_buffer().
  *
- *	Locking: caller holds exclusive termios_rwsem
- *		 (or locking is not required)
+ * Locking: caller holds exclusive termios_rwsem
+ *          (or locking is not required)
  */
 
 static void reset_buffer_flags(struct n_tty_data *ldata)
@@ -353,17 +353,17 @@ static void n_tty_packet_mode_flush(struct tty_struct *tty)
 }
 
 /**
- *	n_tty_flush_buffer	-	clean input queue
- *	@tty:	terminal device
+ * n_tty_flush_buffer() - clean input queue
+ * @tty: terminal device
  *
- *	Flush the input buffer. Called when the tty layer wants the
- *	buffer flushed (eg at hangup) or when the N_TTY line discipline
- *	internally has to clean the pending queue (for example some signals).
+ * Flush the input buffer. Called when the tty layer wants the
+ * buffer flushed (eg at hangup) or when the N_TTY line discipline
+ * internally has to clean the pending queue (for example some signals).
  *
- *	Holds termios_rwsem to exclude producer/consumer while
- *	buffer indices are reset.
+ * Holds termios_rwsem to exclude producer/consumer while
+ * buffer indices are reset.
  *
- *	Locking: ctrl_lock, exclusive termios_rwsem
+ * Locking: ctrl_lock, exclusive termios_rwsem
  */
 
 static void n_tty_flush_buffer(struct tty_struct *tty)
@@ -378,12 +378,12 @@ static void n_tty_flush_buffer(struct tty_struct *tty)
 }
 
 /**
- *	is_utf8_continuation	-	utf8 multibyte check
- *	@c: byte to check
+ * is_utf8_continuation() - utf8 multibyte check
+ * @c: byte to check
  *
- *	Returns true if the utf8 character 'c' is a multibyte continuation
- *	character. We use this to correctly compute the on screen size
- *	of the character when printing
+ * Returns true if the utf8 character 'c' is a multibyte continuation
+ * character. We use this to correctly compute the on screen size
+ * of the character when printing
  */
 
 static inline int is_utf8_continuation(unsigned char c)
@@ -392,11 +392,11 @@ static inline int is_utf8_continuation(unsigned char c)
 }
 
 /**
- *	is_continuation		-	multibyte check
- *	@c: byte to check
+ * is_continuation() - multibyte check
+ * @c: byte to check
  *
- *	Returns true if the utf8 character 'c' is a multibyte continuation
- *	character and the terminal is in unicode mode.
+ * Returns true if the utf8 character 'c' is a multibyte continuation
+ * character and the terminal is in unicode mode.
  */
 
 static inline int is_continuation(unsigned char c, struct tty_struct *tty)
@@ -405,25 +405,25 @@ static inline int is_continuation(unsigned char c, struct tty_struct *tty)
 }
 
 /**
- *	do_output_char			-	output one character
- *	@c: character (or partial unicode symbol)
- *	@tty: terminal device
- *	@space: space available in tty driver write buffer
+ * do_output_char() - output one character
+ * @c: character (or partial unicode symbol)
+ * @tty: terminal device
+ * @space: space available in tty driver write buffer
  *
- *	This is a helper function that handles one output character
- *	(including special characters like TAB, CR, LF, etc.),
- *	doing OPOST processing and putting the results in the
- *	tty driver's write buffer.
+ * This is a helper function that handles one output character
+ * (including special characters like TAB, CR, LF, etc.),
+ * doing OPOST processing and putting the results in the
+ * tty driver's write buffer.
  *
- *	Note that Linux currently ignores TABDLY, CRDLY, VTDLY, FFDLY
- *	and NLDLY.  They simply aren't relevant in the world today.
- *	If you ever need them, add them here.
+ * Note that Linux currently ignores TABDLY, CRDLY, VTDLY, FFDLY
+ * and NLDLY.  They simply aren't relevant in the world today.
+ * If you ever need them, add them here.
  *
- *	Returns the number of bytes of buffer space used or -1 if
- *	no space left.
+ * Returns the number of bytes of buffer space used or -1 if
+ * no space left.
  *
- *	Locking: should be called under the output_lock to protect
- *		 the column state and space left in the buffer
+ * Locking: should be called under the output_lock to protect
+ *          the column state and space left in the buffer
  */
 
 static int do_output_char(unsigned char c, struct tty_struct *tty, int space)
@@ -488,17 +488,17 @@ static int do_output_char(unsigned char c, struct tty_struct *tty, int space)
 }
 
 /**
- *	process_output			-	output post processor
- *	@c: character (or partial unicode symbol)
- *	@tty: terminal device
+ * process_output() - output post processor
+ * @c: character (or partial unicode symbol)
+ * @tty: terminal device
  *
- *	Output one character with OPOST processing.
- *	Returns -1 when the output device is full and the character
- *	must be retried.
+ * Output one character with OPOST processing.
+ * Returns -1 when the output device is full and the character
+ * must be retried.
  *
- *	Locking: output_lock to protect column state and space left
- *		 (also, this is called from n_tty_write under the
- *		  tty layer write lock)
+ * Locking: output_lock to protect column state and space left
+ *          (also, this is called from n_tty_write under the
+ *          tty layer write lock)
  */
 
 static int process_output(unsigned char c, struct tty_struct *tty)
@@ -519,22 +519,22 @@ static int process_output(unsigned char c, struct tty_struct *tty)
 }
 
 /**
- *	process_output_block		-	block post processor
- *	@tty: terminal device
- *	@buf: character buffer
- *	@nr: number of bytes to output
- *
- *	Output a block of characters with OPOST processing.
- *	Returns the number of characters output.
- *
- *	This path is used to speed up block console writes, among other
- *	things when processing blocks of output data. It handles only
- *	the simple cases normally found and helps to generate blocks of
- *	symbols for the console driver and thus improve performance.
- *
- *	Locking: output_lock to protect column state and space left
- *		 (also, this is called from n_tty_write under the
- *		  tty layer write lock)
+ * process_output_block() - block post processor
+ * @tty: terminal device
+ * @buf: character buffer
+ * @nr: number of bytes to output
+ *
+ * Output a block of characters with OPOST processing.
+ * Returns the number of characters output.
+ *
+ * This path is used to speed up block console writes, among other
+ * things when processing blocks of output data. It handles only
+ * the simple cases normally found and helps to generate blocks of
+ * symbols for the console driver and thus improve performance.
+ *
+ * Locking: output_lock to protect column state and space left
+ *          (also, this is called from n_tty_write under the
+ *          tty layer write lock)
  */
 
 static ssize_t process_output_block(struct tty_struct *tty,
@@ -597,28 +597,28 @@ static ssize_t process_output_block(struct tty_struct *tty,
 }
 
 /**
- *	process_echoes	-	write pending echo characters
- *	@tty: terminal device
+ * process_echoes() - write pending echo characters
+ * @tty: terminal device
  *
- *	Write previously buffered echo (and other ldisc-generated)
- *	characters to the tty.
+ * Write previously buffered echo (and other ldisc-generated)
+ * characters to the tty.
  *
- *	Characters generated by the ldisc (including echoes) need to
- *	be buffered because the driver's write buffer can fill during
- *	heavy program output.  Echoing straight to the driver will
- *	often fail under these conditions, causing lost characters and
- *	resulting mismatches of ldisc state information.
+ * Characters generated by the ldisc (including echoes) need to
+ * be buffered because the driver's write buffer can fill during
+ * heavy program output.  Echoing straight to the driver will
+ * often fail under these conditions, causing lost characters and
+ * resulting mismatches of ldisc state information.
  *
- *	Since the ldisc state must represent the characters actually sent
- *	to the driver at the time of the write, operations like certain
- *	changes in column state are also saved in the buffer and executed
- *	here.
+ * Since the ldisc state must represent the characters actually sent
+ * to the driver at the time of the write, operations like certain
+ * changes in column state are also saved in the buffer and executed
+ * here.
  *
- *	A circular fifo buffer is used so that the most recent characters
- *	are prioritized.  Also, when control characters are echoed with a
- *	prefixed "^", the pair is treated atomically and thus not separated.
+ * A circular fifo buffer is used so that the most recent characters
+ * are prioritized.  Also, when control characters are echoed with a
+ * prefixed "^", the pair is treated atomically and thus not separated.
  *
- *	Locking: callers must hold output_lock
+ * Locking: callers must hold output_lock
  */
 
 static size_t __process_echoes(struct tty_struct *tty)
@@ -829,11 +829,11 @@ static void flush_echoes(struct tty_struct *tty)
 }
 
 /**
- *	add_echo_byte	-	add a byte to the echo buffer
- *	@c: unicode byte to echo
- *	@ldata: n_tty data
+ * add_echo_byte() - add a byte to the echo buffer
+ * @c: unicode byte to echo
+ * @ldata: n_tty data
  *
- *	Add a character or operation byte to the echo buffer.
+ * Add a character or operation byte to the echo buffer.
  */
 
 static inline void add_echo_byte(unsigned char c, struct n_tty_data *ldata)
@@ -844,10 +844,10 @@ static inline void add_echo_byte(unsigned char c, struct n_tty_data *ldata)
 }
 
 /**
- *	echo_move_back_col	-	add operation to move back a column
- *	@ldata: n_tty data
+ * echo_move_back_col() - add operation to move back a column
+ * @ldata: n_tty data
  *
- *	Add an operation to the echo buffer to move back one column.
+ * Add an operation to the echo buffer to move back one column.
  */
 
 static void echo_move_back_col(struct n_tty_data *ldata)
@@ -857,11 +857,11 @@ static void echo_move_back_col(struct n_tty_data *ldata)
 }
 
 /**
- *	echo_set_canon_col	-	add operation to set the canon column
- *	@ldata: n_tty data
+ * echo_set_canon_col() - add operation to set the canon column
+ * @ldata: n_tty data
  *
- *	Add an operation to the echo buffer to set the canon column
- *	to the current column.
+ * Add an operation to the echo buffer to set the canon column
+ * to the current column.
  */
 
 static void echo_set_canon_col(struct n_tty_data *ldata)
@@ -871,18 +871,18 @@ static void echo_set_canon_col(struct n_tty_data *ldata)
 }
 
 /**
- *	echo_erase_tab	-	add operation to erase a tab
- *	@num_chars: number of character columns already used
- *	@after_tab: true if num_chars starts after a previous tab
- *	@ldata: n_tty data
- *
- *	Add an operation to the echo buffer to erase a tab.
- *
- *	Called by the eraser function, which knows how many character
- *	columns have been used since either a previous tab or the start
- *	of input.  This information will be used later, along with
- *	canon column (if applicable), to go back the correct number
- *	of columns.
+ * echo_erase_tab() - add operation to erase a tab
+ * @num_chars: number of character columns already used
+ * @after_tab: true if num_chars starts after a previous tab
+ * @ldata: n_tty data
+ *
+ * Add an operation to the echo buffer to erase a tab.
+ *
+ * Called by the eraser function, which knows how many character
+ * columns have been used since either a previous tab or the start
+ * of input.  This information will be used later, along with
+ * canon column (if applicable), to go back the correct number
+ * of columns.
  */
 
 static void echo_erase_tab(unsigned int num_chars, int after_tab,
@@ -902,14 +902,14 @@ static void echo_erase_tab(unsigned int num_chars, int after_tab,
 }
 
 /**
- *	echo_char_raw	-	echo a character raw
- *	@c: unicode byte to echo
- *	@tty: terminal device
+ * echo_char_raw() - echo a character raw
+ * @c: unicode byte to echo
+ * @tty: terminal device
  *
- *	Echo user input back onto the screen. This must be called only when
- *	L_ECHO(tty) is true. Called from the driver receive_buf path.
+ * Echo user input back onto the screen. This must be called only when
+ * L_ECHO(tty) is true. Called from the driver receive_buf path.
  *
- *	This variant does not treat control characters specially.
+ * This variant does not treat control characters specially.
  */
 
 static void echo_char_raw(unsigned char c, struct n_tty_data *ldata)
@@ -923,15 +923,15 @@ static void echo_char_raw(unsigned char c, struct n_tty_data *ldata)
 }
 
 /**
- *	echo_char	-	echo a character
- *	@c: unicode byte to echo
- *	@tty: terminal device
+ * echo_char() - echo a character
+ * @c: unicode byte to echo
+ * @tty: terminal device
  *
- *	Echo user input back onto the screen. This must be called only when
- *	L_ECHO(tty) is true. Called from the driver receive_buf path.
+ * Echo user input back onto the screen. This must be called only when
+ * L_ECHO(tty) is true. Called from the driver receive_buf path.
  *
- *	This variant tags control characters to be echoed as "^X"
- *	(where X is the letter representing the control char).
+ * This variant tags control characters to be echoed as "^X"
+ * (where X is the letter representing the control char).
  */
 
 static void echo_char(unsigned char c, struct tty_struct *tty)
@@ -949,8 +949,8 @@ static void echo_char(unsigned char c, struct tty_struct *tty)
 }
 
 /**
- *	finish_erasing		-	complete erase
- *	@ldata: n_tty data
+ * finish_erasing() - complete erase
+ * @ldata: n_tty data
  */
 
 static inline void finish_erasing(struct n_tty_data *ldata)
@@ -962,16 +962,16 @@ static inline void finish_erasing(struct n_tty_data *ldata)
 }
 
 /**
- *	eraser		-	handle erase function
- *	@c: character input
- *	@tty: terminal device
+ * eraser() - handle erase function
+ * @c: character input
+ * @tty: terminal device
  *
- *	Perform erase and necessary output when an erase character is
- *	present in the stream from the driver layer. Handles the complexities
- *	of UTF-8 multibyte symbols.
+ * Perform erase and necessary output when an erase character is
+ * present in the stream from the driver layer. Handles the complexities
+ * of UTF-8 multibyte symbols.
  *
- *	n_tty_receive_buf()/producer path:
- *		caller holds non-exclusive termios_rwsem
+ * n_tty_receive_buf()/producer path:
+ *     caller holds non-exclusive termios_rwsem
  */
 
 static void eraser(unsigned char c, struct tty_struct *tty)
@@ -1093,18 +1093,18 @@ static void eraser(unsigned char c, struct tty_struct *tty)
 }
 
 /**
- *	isig		-	handle the ISIG optio
- *	@sig: signal
- *	@tty: terminal
+ * isig() - handle the ISIG optio
+ * @sig: signal
+ * @tty: terminal
  *
- *	Called when a signal is being sent due to terminal input.
- *	Called from the driver receive_buf path so serialized.
+ * Called when a signal is being sent due to terminal input.
+ * Called from the driver receive_buf path so serialized.
  *
- *	Performs input and output flush if !NOFLSH. In this context, the echo
- *	buffer is 'output'. The signal is processed first to alert any current
- *	readers or writers to discontinue and exit their i/o loops.
+ * Performs input and output flush if !NOFLSH. In this context, the echo
+ * buffer is 'output'. The signal is processed first to alert any current
+ * readers or writers to discontinue and exit their i/o loops.
  *
- *	Locking: ctrl_lock
+ * Locking: ctrl_lock
  */
 
 static void __isig(int sig, struct tty_struct *tty)
@@ -1152,16 +1152,16 @@ static void isig(int sig, struct tty_struct *tty)
 }
 
 /**
- *	n_tty_receive_break	-	handle break
- *	@tty: terminal
+ * n_tty_receive_break() - handle break
+ * @tty: terminal
  *
- *	An RS232 break event has been hit in the incoming bitstream. This
- *	can cause a variety of events depending upon the termios settings.
+ * An RS232 break event has been hit in the incoming bitstream. This
+ * can cause a variety of events depending upon the termios settings.
  *
- *	n_tty_receive_buf()/producer path:
- *		caller holds non-exclusive termios_rwsem
+ * n_tty_receive_buf()/producer path:
+ *    caller holds non-exclusive termios_rwsem
  *
- *	Note: may get exclusive termios_rwsem if flushing input buffer
+ * Note: may get exclusive termios_rwsem if flushing input buffer
  */
 
 static void n_tty_receive_break(struct tty_struct *tty)
@@ -1182,16 +1182,16 @@ static void n_tty_receive_break(struct tty_struct *tty)
 }
 
 /**
- *	n_tty_receive_overrun	-	handle overrun reporting
- *	@tty: terminal
+ * n_tty_receive_overrun() - handle overrun reporting
+ * @tty: terminal
  *
- *	Data arrived faster than we could process it. While the tty
- *	driver has flagged this the bits that were missed are gone
- *	forever.
+ * Data arrived faster than we could process it. While the tty
+ * driver has flagged this the bits that were missed are gone
+ * forever.
  *
- *	Called from the receive_buf path so single threaded. Does not
- *	need locking as num_overrun and overrun_time are function
- *	private.
+ * Called from the receive_buf path so single threaded. Does not
+ * need locking as num_overrun and overrun_time are function
+ * private.
  */
 
 static void n_tty_receive_overrun(struct tty_struct *tty)
@@ -1208,15 +1208,15 @@ static void n_tty_receive_overrun(struct tty_struct *tty)
 }
 
 /**
- *	n_tty_receive_parity_error	-	error notifier
- *	@tty: terminal device
- *	@c: character
+ * n_tty_receive_parity_error() - error notifier
+ * @tty: terminal device
+ * @c: character
  *
- *	Process a parity error and queue the right data to indicate
- *	the error case if necessary.
+ * Process a parity error and queue the right data to indicate
+ * the error case if necessary.
  *
- *	n_tty_receive_buf()/producer path:
- *		caller holds non-exclusive termios_rwsem
+ * n_tty_receive_buf()/producer path:
+ *     caller holds non-exclusive termios_rwsem
  */
 static void n_tty_receive_parity_error(struct tty_struct *tty, unsigned char c)
 {
@@ -1250,19 +1250,19 @@ n_tty_receive_signal_char(struct tty_struct *tty, int signal, unsigned char c)
 }
 
 /**
- *	n_tty_receive_char	-	perform processing
- *	@tty: terminal device
- *	@c: character
+ * n_tty_receive_char() - perform processing
+ * @tty: terminal device
+ * @c: character
  *
- *	Process an individual character of input received from the driver.
- *	This is serialized with respect to itself by the rules for the
- *	driver above.
+ * Process an individual character of input received from the driver.
+ * This is serialized with respect to itself by the rules for the
+ * driver above.
  *
- *	n_tty_receive_buf()/producer path:
- *		caller holds non-exclusive termios_rwsem
- *		publishes canon_head if canonical mode is active
+ * n_tty_receive_buf()/producer path:
+ *     caller holds non-exclusive termios_rwsem
+ *     publishes canon_head if canonical mode is active
  *
- *	Returns 1 if LNEXT was received, else returns 0
+ * Returns 1 if LNEXT was received, else returns 0
  */
 
 static int
@@ -1661,37 +1661,37 @@ static void __receive_buf(struct tty_struct *tty, const unsigned char *cp,
 }
 
 /**
- *	n_tty_receive_buf_common	-	process input
- *	@tty: device to receive input
- *	@cp: input chars
- *	@fp: flags for each char (if NULL, all chars are TTY_NORMAL)
- *	@count: number of input chars in @cp
- *
- *	Called by the terminal driver when a block of characters has
- *	been received. This function must be called from soft contexts
- *	not from interrupt context. The driver is responsible for making
- *	calls one at a time and in order (or using flush_to_ldisc)
- *
- *	Returns the # of input chars from @cp which were processed.
- *
- *	In canonical mode, the maximum line length is 4096 chars (including
- *	the line termination char); lines longer than 4096 chars are
- *	truncated. After 4095 chars, input data is still processed but
- *	not stored. Overflow processing ensures the tty can always
- *	receive more input until at least one line can be read.
- *
- *	In non-canonical mode, the read buffer will only accept 4095 chars;
- *	this provides the necessary space for a newline char if the input
- *	mode is switched to canonical.
- *
- *	Note it is possible for the read buffer to _contain_ 4096 chars
- *	in non-canonical mode: the read buffer could already contain the
- *	maximum canon line of 4096 chars when the mode is switched to
- *	non-canonical.
- *
- *	n_tty_receive_buf()/producer path:
- *		claims non-exclusive termios_rwsem
- *		publishes commit_head or canon_head
+ * n_tty_receive_buf_common() - process input
+ * @tty: device to receive input
+ * @cp: input chars
+ * @fp: flags for each char (if NULL, all chars are TTY_NORMAL)
+ * @count: number of input chars in @cp
+ *
+ * Called by the terminal driver when a block of characters has
+ * been received. This function must be called from soft contexts
+ * not from interrupt context. The driver is responsible for making
+ * calls one at a time and in order (or using flush_to_ldisc)
+ *
+ * Returns the # of input chars from @cp which were processed.
+ *
+ * In canonical mode, the maximum line length is 4096 chars (including
+ * the line termination char); lines longer than 4096 chars are
+ * truncated. After 4095 chars, input data is still processed but
+ * not stored. Overflow processing ensures the tty can always
+ * receive more input until at least one line can be read.
+ *
+ * In non-canonical mode, the read buffer will only accept 4095 chars;
+ * this provides the necessary space for a newline char if the input
+ * mode is switched to canonical.
+ *
+ * Note it is possible for the read buffer to _contain_ 4096 chars
+ * in non-canonical mode: the read buffer could already contain the
+ * maximum canon line of 4096 chars when the mode is switched to
+ * non-canonical.
+ *
+ * n_tty_receive_buf()/producer path:
+ *     claims non-exclusive termios_rwsem
+ *     publishes commit_head or canon_head
  */
 static int
 n_tty_receive_buf_common(struct tty_struct *tty, const unsigned char *cp,
@@ -1776,17 +1776,17 @@ static int n_tty_receive_buf2(struct tty_struct *tty, const unsigned char *cp,
 }
 
 /**
- *	n_tty_set_termios	-	termios data changed
- *	@tty: terminal
- *	@old: previous data
+ * n_tty_set_termios() - termios data changed
+ * @tty: terminal
+ * @old: previous data
  *
- *	Called by the tty layer when the user changes termios flags so
- *	that the line discipline can plan ahead. This function cannot sleep
- *	and is protected from re-entry by the tty layer. The user is
- *	guaranteed that this function will not be re-entered or in progress
- *	when the ldisc is closed.
+ * Called by the tty layer when the user changes termios flags so
+ * that the line discipline can plan ahead. This function cannot sleep
+ * and is protected from re-entry by the tty layer. The user is
+ * guaranteed that this function will not be re-entered or in progress
+ * when the ldisc is closed.
  *
- *	Locking: Caller holds tty->termios_rwsem
+ * Locking: Caller holds tty->termios_rwsem
  */
 
 static void n_tty_set_termios(struct tty_struct *tty, struct ktermios *old)
@@ -1874,13 +1874,13 @@ static void n_tty_set_termios(struct tty_struct *tty, struct ktermios *old)
 }
 
 /**
- *	n_tty_close		-	close the ldisc for this tty
- *	@tty: device
+ * n_tty_close() - close the ldisc for this tty
+ * @tty: device
  *
- *	Called from the terminal layer when this line discipline is
- *	being shut down, either because of a close or becsuse of a
- *	discipline change. The function will not be called while other
- *	ldisc methods are in progress.
+ * Called from the terminal layer when this line discipline is
+ * being shut down, either because of a close or becsuse of a
+ * discipline change. The function will not be called while other
+ * ldisc methods are in progress.
  */
 
 static void n_tty_close(struct tty_struct *tty)
@@ -1895,13 +1895,13 @@ static void n_tty_close(struct tty_struct *tty)
 }
 
 /**
- *	n_tty_open		-	open an ldisc
- *	@tty: terminal to open
+ * n_tty_open() - open an ldisc
+ * @tty: terminal to open
  *
- *	Called when this line discipline is being attached to the
- *	terminal device. Can sleep. Called serialized so that no
- *	other events will occur in parallel. No further open will occur
- *	until a close.
+ * Called when this line discipline is being attached to the
+ * terminal device. Can sleep. Called serialized so that no
+ * other events will occur in parallel. No further open will occur
+ * until a close.
  */
 
 static int n_tty_open(struct tty_struct *tty)
@@ -1938,23 +1938,23 @@ static inline int input_available_p(struct tty_struct *tty, int poll)
 }
 
 /**
- *	copy_from_read_buf	-	copy read data directly
- *	@tty: terminal device
- *	@b: user data
- *	@nr: size of data
- *
- *	Helper function to speed up n_tty_read.  It is only called when
- *	ICANON is off; it copies characters straight from the tty queue to
- *	user space directly.  It can be profitably called twice; once to
- *	drain the space from the tail pointer to the (physical) end of the
- *	buffer, and once to drain the space from the (physical) beginning of
- *	the buffer to head pointer.
- *
- *	Called under the ldata->atomic_read_lock sem
- *
- *	n_tty_read()/consumer path:
- *		caller holds non-exclusive termios_rwsem
- *		read_tail published
+ * copy_from_read_buf() - copy read data directly
+ * @tty: terminal device
+ * @b: user data
+ * @nr: size of data
+ *
+ * Helper function to speed up n_tty_read.  It is only called when
+ * ICANON is off; it copies characters straight from the tty queue to
+ * user space directly.  It can be profitably called twice; once to
+ * drain the space from the tail pointer to the (physical) end of the
+ * buffer, and once to drain the space from the (physical) beginning of
+ * the buffer to head pointer.
+ *
+ * Called under the ldata->atomic_read_lock sem
+ *
+ * n_tty_read()/consumer path:
+ *     caller holds non-exclusive termios_rwsem
+ *     read_tail published
  */
 
 static int copy_from_read_buf(struct tty_struct *tty,
@@ -1991,26 +1991,26 @@ static int copy_from_read_buf(struct tty_struct *tty,
 }
 
 /**
- *	canon_copy_from_read_buf	-	copy read data in canonical mode
- *	@tty: terminal device
- *	@b: user data
- *	@nr: size of data
- *
- *	Helper function for n_tty_read.  It is only called when ICANON is on;
- *	it copies one line of input up to and including the line-delimiting
- *	character into the user-space buffer.
- *
- *	NB: When termios is changed from non-canonical to canonical mode and
- *	the read buffer contains data, n_tty_set_termios() simulates an EOF
- *	push (as if C-d were input) _without_ the DISABLED_CHAR in the buffer.
- *	This causes data already processed as input to be immediately available
- *	as input although a newline has not been received.
- *
- *	Called under the atomic_read_lock mutex
- *
- *	n_tty_read()/consumer path:
- *		caller holds non-exclusive termios_rwsem
- *		read_tail published
+ * canon_copy_from_read_buf() - copy read data in canonical mode
+ * @tty: terminal device
+ * @b: user data
+ * @nr: size of data
+ *
+ * Helper function for n_tty_read.  It is only called when ICANON is on;
+ * it copies one line of input up to and including the line-delimiting
+ * character into the user-space buffer.
+ *
+ * NB: When termios is changed from non-canonical to canonical mode and
+ * the read buffer contains data, n_tty_set_termios() simulates an EOF
+ * push (as if C-d were input) _without_ the DISABLED_CHAR in the buffer.
+ * This causes data already processed as input to be immediately available
+ * as input although a newline has not been received.
+ *
+ * Called under the atomic_read_lock mutex
+ *
+ * n_tty_read()/consumer path:
+ *     caller holds non-exclusive termios_rwsem
+ *     read_tail published
  */
 
 static int canon_copy_from_read_buf(struct tty_struct *tty,
@@ -2081,17 +2081,17 @@ extern ssize_t redirected_tty_write(struct file *, const char __user *,
 							size_t, loff_t *);
 
 /**
- *	job_control		-	check job control
- *	@tty: tty
- *	@file: file handle
+ * job_control() - check job control
+ * @tty: tty
+ * @file: file handle
  *
- *	Perform job control management checks on this file/tty descriptor
- *	and if appropriate send any needed signals and return a negative
- *	error code if action should be taken.
+ * Perform job control management checks on this file/tty descriptor
+ * and if appropriate send any needed signals and return a negative
+ * error code if action should be taken.
  *
- *	Locking: redirected write test is safe
- *		 current->signal->tty check is safe
- *		 ctrl_lock to safely reference tty->pgrp
+ * Locking: redirected write test is safe
+ *          current->signal->tty check is safe
+ *          ctrl_lock to safely reference tty->pgrp
  */
 
 static int job_control(struct tty_struct *tty, struct file *file)
@@ -2109,22 +2109,22 @@ static int job_control(struct tty_struct *tty, struct file *file)
 
 
 /**
- *	n_tty_read		-	read function for tty
- *	@tty: tty device
- *	@file: file object
- *	@buf: userspace buffer pointer
- *	@nr: size of I/O
- *
- *	Perform reads for the line discipline. We are guaranteed that the
- *	line discipline will not be closed under us but we may get multiple
- *	parallel readers and must handle this ourselves. We may also get
- *	a hangup. Always called in user context, may sleep.
- *
- *	This code must be sure never to sleep through a hangup.
- *
- *	n_tty_read()/consumer path:
- *		claims non-exclusive termios_rwsem
- *		publishes read_tail
+ * n_tty_read() - read function for tty
+ * @tty: tty device
+ * @file: file object
+ * @buf: userspace buffer pointer
+ * @nr: size of I/O
+ *
+ * Perform reads for the line discipline. We are guaranteed that the
+ * line discipline will not be closed under us but we may get multiple
+ * parallel readers and must handle this ourselves. We may also get
+ * a hangup. Always called in user context, may sleep.
+ *
+ * This code must be sure never to sleep through a hangup.
+ *
+ * n_tty_read()/consumer path:
+ *     claims non-exclusive termios_rwsem
+ *     publishes read_tail
  */
 
 static ssize_t n_tty_read(struct tty_struct *tty, struct file *file,
@@ -2275,25 +2275,25 @@ static ssize_t n_tty_read(struct tty_struct *tty, struct file *file,
 }
 
 /**
- *	n_tty_write		-	write function for tty
- *	@tty: tty device
- *	@file: file object
- *	@buf: userspace buffer pointer
- *	@nr: size of I/O
- *
- *	Write function of the terminal device.  This is serialized with
- *	respect to other write callers but not to termios changes, reads
- *	and other such events.  Since the receive code will echo characters,
- *	thus calling driver write methods, the output_lock is used in
- *	the output processing functions called here as well as in the
- *	echo processing function to protect the column state and space
- *	left in the buffer.
- *
- *	This code must be sure never to sleep through a hangup.
- *
- *	Locking: output_lock to protect column state and space left
- *		 (note that the process_output*() functions take this
- *		  lock themselves)
+ * n_tty_write() - write function for tty
+ * @tty: tty device
+ * @file: file object
+ * @buf: userspace buffer pointer
+ * @nr: size of I/O
+ *
+ * Write function of the terminal device.  This is serialized with
+ * respect to other write callers but not to termios changes, reads
+ * and other such events.  Since the receive code will echo characters,
+ * thus calling driver write methods, the output_lock is used in
+ * the output processing functions called here as well as in the
+ * echo processing function to protect the column state and space
+ * left in the buffer.
+ *
+ * This code must be sure never to sleep through a hangup.
+ *
+ * Locking: output_lock to protect column state and space left
+ *          (note that the process_output*() functions take this
+ *          lock themselves)
  */
 
 static ssize_t n_tty_write(struct tty_struct *tty, struct file *file,
@@ -2384,17 +2384,17 @@ static ssize_t n_tty_write(struct tty_struct *tty, struct file *file,
 }
 
 /**
- *	n_tty_poll		-	poll method for N_TTY
- *	@tty: terminal device
- *	@file: file accessing it
- *	@wait: poll table
+ * n_tty_poll() - poll method for N_TTY
+ * @tty: terminal device
+ * @file: file accessing it
+ * @wait: poll table
  *
- *	Called when the line discipline is asked to poll() for data or
- *	for special events. This code is not serialized with respect to
- *	other events save open/close.
+ * Called when the line discipline is asked to poll() for data or
+ * for special events. This code is not serialized with respect to
+ * other events save open/close.
  *
- *	This code must be sure never to sleep through a hangup.
- *	Called without the kernel lock held - fine
+ * This code must be sure never to sleep through a hangup.
+ * Called without the kernel lock held - fine
  */
 
 static __poll_t n_tty_poll(struct tty_struct *tty, struct file *file,
@@ -2482,10 +2482,10 @@ static struct tty_ldisc_ops n_tty_ops = {
 };
 
 /**
- *	n_tty_inherit_ops	-	inherit N_TTY methods
- *	@ops: struct tty_ldisc_ops where to save N_TTY methods
+ * n_tty_inherit_ops() - inherit N_TTY methods
+ * @ops: struct tty_ldisc_ops where to save N_TTY methods
  *
- *	Enables a 'subclass' line discipline to 'inherit' N_TTY methods.
+ * Enables a 'subclass' line discipline to 'inherit' N_TTY methods.
  */
 
 void n_tty_inherit_ops(struct tty_ldisc_ops *ops)
diff --git a/drivers/tty/pty.c b/drivers/tty/pty.c
index 678406e0948b..a8ec902fd9be 100644
--- a/drivers/tty/pty.c
+++ b/drivers/tty/pty.c
@@ -96,15 +96,15 @@ static void pty_unthrottle(struct tty_struct *tty)
 }
 
 /**
- *	pty_write		-	write to a pty
- *	@tty: the tty we write from
- *	@buf: kernel buffer of data
- *	@count: bytes to write
+ * pty_write() - write to a pty
+ * @tty: the tty we write from
+ * @buf: kernel buffer of data
+ * @count: bytes to write
  *
- *	Our "hardware" write method. Data is coming from the ldisc which
- *	may be in a non sleeping state. We simply throw this at the other
- *	end of the link as if we were an IRQ handler receiving stuff for
- *	the other side of the pty/tty pair.
+ * Our "hardware" write method. Data is coming from the ldisc which
+ * may be in a non sleeping state. We simply throw this at the other
+ * end of the link as if we were an IRQ handler receiving stuff for
+ * the other side of the pty/tty pair.
  */
 
 static int pty_write(struct tty_struct *tty, const unsigned char *buf, int c)
@@ -128,11 +128,11 @@ static int pty_write(struct tty_struct *tty, const unsigned char *buf, int c)
 }
 
 /**
- *	pty_write_room	-	write space
- *	@tty: tty we are writing from
+ * pty_write_room() - write space
+ * @tty: tty we are writing from
  *
- *	Report how many bytes the ldisc can send into the queue for
- *	the other device.
+ * Report how many bytes the ldisc can send into the queue for
+ * the other device.
  */
 
 static int pty_write_room(struct tty_struct *tty)
@@ -143,11 +143,11 @@ static int pty_write_room(struct tty_struct *tty)
 }
 
 /**
- *	pty_chars_in_buffer	-	characters currently in our tx queue
- *	@tty: our tty
+ * pty_chars_in_buffer() - characters currently in our tx queue
+ * @tty: our tty
  *
- *	Report how much we have in the transmit queue. As everything is
- *	instantly at the other end this is easy to implement.
+ * Report how much we have in the transmit queue. As everything is
+ * instantly at the other end this is easy to implement.
  */
 
 static int pty_chars_in_buffer(struct tty_struct *tty)
@@ -291,12 +291,12 @@ static void pty_set_termios(struct tty_struct *tty,
 }
 
 /**
- *	pty_do_resize		-	resize event
- *	@tty: tty being resized
- *	@ws: window size being set.
+ * pty_do_resize() - resize event
+ * @tty: tty being resized
+ * @ws: window size being set.
  *
- *	Update the termios variables and send the necessary signals to
- *	peform a terminal resize correctly
+ * Update the termios variables and send the necessary signals to
+ * peform a terminal resize correctly
  */
 
 static int pty_resize(struct tty_struct *tty,  struct winsize *ws)
@@ -329,14 +329,14 @@ static int pty_resize(struct tty_struct *tty,  struct winsize *ws)
 }
 
 /**
- *	pty_start - start() handler
- *	pty_stop  - stop() handler
- *	@tty: tty being flow-controlled
+ * pty_start() - start handler
+ * pty_stop() - stop handler
+ * @tty: tty being flow-controlled
  *
- *	Propagates the TIOCPKT status to the master pty.
+ * Propagates the TIOCPKT status to the master pty.
  *
- *	NB: only the master pty can be in packet mode so only the slave
- *	    needs start()/stop() handlers
+ * NB: only the master pty can be in packet mode so only the slave
+ *     needs start()/stop() handlers
  */
 static void pty_start(struct tty_struct *tty)
 {
@@ -365,15 +365,15 @@ static void pty_stop(struct tty_struct *tty)
 }
 
 /**
- *	pty_common_install		-	set up the pty pair
- *	@driver: the pty driver
- *	@tty: the tty being instantiated
- *	@legacy: true if this is BSD style
+ * pty_common_install() - set up the pty pair
+ * @driver: the pty driver
+ * @tty: the tty being instantiated
+ * @legacy: true if this is BSD style
  *
- *	Perform the initial set up for the tty/pty pair. Called from the
- *	tty layer when the port is first opened.
+ * Perform the initial set up for the tty/pty pair. Called from the
+ * tty layer when the port is first opened.
  *
- *	Locking: the caller must hold the tty_mutex
+ * Locking: the caller must hold the tty_mutex
  */
 static int pty_common_install(struct tty_driver *driver, struct tty_struct *tty,
 		bool legacy)
@@ -606,14 +606,14 @@ static inline void legacy_pty_init(void) { }
 static struct cdev ptmx_cdev;
 
 /**
- *	ptm_open_peer - open the peer of a pty
- *	@master: the open struct file of the ptmx device node
- *	@tty: the master of the pty being opened
- *	@flags: the flags for open
+ * ptm_open_peer() - open the peer of a pty
+ * @master: the open struct file of the ptmx device node
+ * @tty: the master of the pty being opened
+ * @flags: the flags for open
  *
- *	Provide a race free way for userspace to open the slave end of a pty
- *	(where they have the master fd and cannot access or trust the mount
- *	namespace /dev/pts was mounted inside).
+ * Provide a race free way for userspace to open the slave end of a pty
+ * (where they have the master fd and cannot access or trust the mount
+ * namespace /dev/pts was mounted inside).
  */
 int ptm_open_peer(struct file *master, struct tty_struct *tty, int flags)
 {
@@ -687,12 +687,12 @@ static long pty_unix98_compat_ioctl(struct tty_struct *tty,
 }
 
 /**
- *	ptm_unix98_lookup	-	find a pty master
- *	@driver: ptm driver
- *	@idx: tty index
+ * ptm_unix98_lookup() - find a pty master
+ * @driver: ptm driver
+ * @idx: tty index
  *
- *	Look up a pty master device. Called under the tty_mutex for now.
- *	This provides our locking.
+ * Look up a pty master device. Called under the tty_mutex for now.
+ * This provides our locking.
  */
 
 static struct tty_struct *ptm_unix98_lookup(struct tty_driver *driver,
@@ -703,12 +703,12 @@ static struct tty_struct *ptm_unix98_lookup(struct tty_driver *driver,
 }
 
 /**
- *	pts_unix98_lookup	-	find a pty slave
- *	@driver: pts driver
- *	@idx: tty index
+ * pts_unix98_lookup() - find a pty slave
+ * @driver: pts driver
+ * @idx: tty index
  *
- *	Look up a pty master device. Called under the tty_mutex for now.
- *	This provides our locking for the tty pointer.
+ * Look up a pty master device. Called under the tty_mutex for now.
+ * This provides our locking for the tty pointer.
  */
 
 static struct tty_struct *pts_unix98_lookup(struct tty_driver *driver,
@@ -787,15 +787,15 @@ static const struct tty_operations pty_unix98_ops = {
 };
 
 /**
- *	ptmx_open		-	open a unix 98 pty master
- *	@inode: inode of device file
- *	@filp: file pointer to tty
+ * ptmx_open() - open a unix 98 pty master
+ * @inode: inode of device file
+ * @filp: file pointer to tty
  *
- *	Allocate a unix98 pty master device from the ptmx driver.
+ * Allocate a unix98 pty master device from the ptmx driver.
  *
- *	Locking: tty_mutex protects the init_dev work. tty->count should
- *		protect the rest.
- *		allocated_ptys_lock handles the list of free pty numbers
+ * Locking: tty_mutex protects the init_dev work. tty->count should
+ *          protect the rest.
+ *          allocated_ptys_lock handles the list of free pty numbers
  */
 
 static int ptmx_open(struct inode *inode, struct file *filp)
diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c
index 94f3e1c64490..63d7537a1db1 100644
--- a/drivers/tty/serial/8250/8250_core.c
+++ b/drivers/tty/serial/8250/8250_core.c
@@ -397,7 +397,7 @@ static const struct uart_8250_ops univ8250_driver_ops = {
 static struct uart_8250_port serial8250_ports[UART_NR];
 
 /**
- * serial8250_get_port - retrieve struct uart_8250_port
+ * serial8250_get_port() - retrieve struct uart_8250_port
  * @line: serial line number
  *
  * This function retrieves struct uart_8250_port for the specific line.
@@ -609,22 +609,22 @@ static int univ8250_console_setup(struct console *co, char *options)
 }
 
 /**
- *	univ8250_console_match - non-standard console matching
- *	@co:	  registering console
- *	@name:	  name from console command line
- *	@idx:	  index from console command line
- *	@options: ptr to option string from console command line
+ * univ8250_console_match() - non-standard console matching
+ * @co: registering console
+ * @name: name from console command line
+ * @idx: index from console command line
+ * @options: ptr to option string from console command line
  *
- *	Only attempts to match console command lines of the form:
- *	    console=uart[8250],io|mmio|mmio16|mmio32,<addr>[,<options>]
- *	    console=uart[8250],0x<addr>[,<options>]
- *	This form is used to register an initial earlycon boot console and
- *	replace it with the serial8250_console at 8250 driver init.
+ * Only attempts to match console command lines of the form:
+ *     console=uart[8250],io|mmio|mmio16|mmio32,<addr>[,<options>]
+ *     console=uart[8250],0x<addr>[,<options>]
+ * This form is used to register an initial earlycon boot console and
+ * replace it with the serial8250_console at 8250 driver init.
  *
- *	Performs console setup for a match (as required by interface)
- *	If no <options> are specified, then assume the h/w is already setup.
+ * Performs console setup for a match (as required by interface)
+ * If no <options> are specified, then assume the h/w is already setup.
  *
- *	Returns 0 if console matches; otherwise non-zero to use default matching
+ * Returns 0 if console matches; otherwise non-zero to use default matching
  */
 static int univ8250_console_match(struct console *co, char *name, int idx,
 				  char *options)
@@ -740,10 +740,10 @@ int __init early_serial_setup(struct uart_port *port)
 }
 
 /**
- *	serial8250_suspend_port - suspend one serial port
- *	@line:  serial line number
+ * serial8250_suspend_port() - suspend one serial port
+ * @line: serial line number
  *
- *	Suspend one serial port.
+ * Suspend one serial port.
  */
 void serial8250_suspend_port(int line)
 {
@@ -763,10 +763,10 @@ void serial8250_suspend_port(int line)
 EXPORT_SYMBOL(serial8250_suspend_port);
 
 /**
- *	serial8250_resume_port - resume one serial port
- *	@line:  serial line number
+ * serial8250_resume_port() - resume one serial port
+ * @line: serial line number
  *
- *	Resume one serial port.
+ * Resume one serial port.
  */
 void serial8250_resume_port(int line)
 {
@@ -943,17 +943,17 @@ static struct uart_8250_port *serial8250_find_match_or_unused(struct uart_port *
 }
 
 /**
- *	serial8250_register_8250_port - register a serial port
- *	@up: serial port template
+ * serial8250_register_8250_port() - register a serial port
+ * @up: serial port template
  *
- *	Configure the serial port specified by the request. If the
- *	port exists and is in use, it is hung up and unregistered
- *	first.
+ * Configure the serial port specified by the request. If the
+ * port exists and is in use, it is hung up and unregistered
+ * first.
  *
- *	The port is then probed and if necessary the IRQ is autodetected
- *	If this fails an error is returned.
+ * The port is then probed and if necessary the IRQ is autodetected
+ * If this fails an error is returned.
  *
- *	On success the port is ready to use and the line number is returned.
+ * On success the port is ready to use and the line number is returned.
  */
 int serial8250_register_8250_port(struct uart_8250_port *up)
 {
@@ -1063,11 +1063,11 @@ int serial8250_register_8250_port(struct uart_8250_port *up)
 EXPORT_SYMBOL(serial8250_register_8250_port);
 
 /**
- *	serial8250_unregister_port - remove a 16x50 serial port at runtime
- *	@line: serial line number
+ * serial8250_unregister_port() - remove a 16x50 serial port at runtime
+ * @line: serial line number
  *
- *	Remove one serial port.  This may not be called from interrupt
- *	context.  We hand the port back to the our control.
+ * Remove one serial port.  This may not be called from interrupt
+ * context.  We hand the port back to the our control.
  */
 void serial8250_unregister_port(int line)
 {
diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c
index f776b3eafb96..c3c20310c30c 100644
--- a/drivers/tty/serial/8250/8250_port.c
+++ b/drivers/tty/serial/8250/8250_port.c
@@ -618,24 +618,24 @@ void serial8250_rpm_put(struct uart_8250_port *p)
 EXPORT_SYMBOL_GPL(serial8250_rpm_put);
 
 /**
- *	serial8250_em485_init() - put uart_8250_port into rs485 emulating
- *	@p:	uart_8250_port port instance
+ * serial8250_em485_init() - put uart_8250_port into rs485 emulating
+ * @p: uart_8250_port port instance
  *
- *	The function is used to start rs485 software emulating on the
- *	&struct uart_8250_port* @p. Namely, RTS is switched before/after
- *	transmission. The function is idempotent, so it is safe to call it
- *	multiple times.
+ * The function is used to start rs485 software emulating on the
+ * &struct uart_8250_port* @p. Namely, RTS is switched before/after
+ * transmission. The function is idempotent, so it is safe to call it
+ * multiple times.
  *
- *	The caller MUST enable interrupt on empty shift register before
- *	calling serial8250_em485_init(). This interrupt is not a part of
- *	8250 standard, but implementation defined.
+ * The caller MUST enable interrupt on empty shift register before
+ * calling serial8250_em485_init(). This interrupt is not a part of
+ * 8250 standard, but implementation defined.
  *
- *	The function is supposed to be called from .rs485_config callback
- *	or from any other callback protected with p->port.lock spinlock.
+ * The function is supposed to be called from .rs485_config callback
+ * or from any other callback protected with p->port.lock spinlock.
  *
- *	See also serial8250_em485_destroy()
+ * See also serial8250_em485_destroy()
  *
- *	Return 0 - success, -errno - otherwise
+ * Return 0 - success, -errno - otherwise
  */
 int serial8250_em485_init(struct uart_8250_port *p)
 {
@@ -661,17 +661,17 @@ int serial8250_em485_init(struct uart_8250_port *p)
 EXPORT_SYMBOL_GPL(serial8250_em485_init);
 
 /**
- *	serial8250_em485_destroy() - put uart_8250_port into normal state
- *	@p:	uart_8250_port port instance
+ * serial8250_em485_destroy() - put uart_8250_port into normal state
+ * @p: uart_8250_port port instance
  *
- *	The function is used to stop rs485 software emulating on the
- *	&struct uart_8250_port* @p. The function is idempotent, so it is safe to
- *	call it multiple times.
+ * The function is used to stop rs485 software emulating on the
+ * &struct uart_8250_port* @p. The function is idempotent, so it is safe to
+ * call it multiple times.
  *
- *	The function is supposed to be called from .rs485_config callback
- *	or from any other callback protected with p->port.lock spinlock.
+ * The function is supposed to be called from .rs485_config callback
+ * or from any other callback protected with p->port.lock spinlock.
  *
- *	See also serial8250_em485_init()
+ * See also serial8250_em485_init()
  */
 void serial8250_em485_destroy(struct uart_8250_port *p)
 {
diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
index 8a47ba2cfe54..589adc597923 100644
--- a/drivers/tty/serial/amba-pl011.c
+++ b/drivers/tty/serial/amba-pl011.c
@@ -2340,22 +2340,22 @@ static int __init pl011_console_setup(struct console *co, char *options)
 }
 
 /**
- *	pl011_console_match - non-standard console matching
- *	@co:	  registering console
- *	@name:	  name from console command line
- *	@idx:	  index from console command line
- *	@options: ptr to option string from console command line
+ * pl011_console_match() - non-standard console matching
+ * @co: registering console
+ * @name: name from console command line
+ * @idx: index from console command line
+ * @options: ptr to option string from console command line
  *
- *	Only attempts to match console command lines of the form:
- *	    console=pl011,mmio|mmio32,<addr>[,<options>]
- *	    console=pl011,0x<addr>[,<options>]
- *	This form is used to register an initial earlycon boot console and
- *	replace it with the amba_console at pl011 driver init.
+ * Only attempts to match console command lines of the form:
+ *     console=pl011,mmio|mmio32,<addr>[,<options>]
+ *     console=pl011,0x<addr>[,<options>]
+ * This form is used to register an initial earlycon boot console and
+ * replace it with the amba_console at pl011 driver init.
  *
- *	Performs console setup for a match (as required by interface)
- *	If no <options> are specified, then assume the h/w is already setup.
+ * Performs console setup for a match (as required by interface)
+ * If no <options> are specified, then assume the h/w is already setup.
  *
- *	Returns 0 if console matches; otherwise non-zero to use default matching
+ * Returns 0 if console matches; otherwise non-zero to use default matching
  */
 static int __init pl011_console_match(struct console *co, char *name, int idx,
 				      char *options)
diff --git a/drivers/tty/serial/earlycon.c b/drivers/tty/serial/earlycon.c
index c14873b67803..85bd5a5d7f39 100644
--- a/drivers/tty/serial/earlycon.c
+++ b/drivers/tty/serial/earlycon.c
@@ -150,22 +150,22 @@ static int __init register_earlycon(char *buf, const struct earlycon_id *match)
 }
 
 /**
- *	setup_earlycon - match and register earlycon console
- *	@buf:	earlycon param string
+ * setup_earlycon() - match and register earlycon console
+ * @buf: earlycon param string
  *
- *	Registers the earlycon console matching the earlycon specified
- *	in the param string @buf. Acceptable param strings are of the form
- *	   <name>,io|mmio|mmio32|mmio32be,<addr>,<options>
- *	   <name>,0x<addr>,<options>
- *	   <name>,<options>
- *	   <name>
+ * Registers the earlycon console matching the earlycon specified
+ * in the param string @buf. Acceptable param strings are of the form
+ *    <name>,io|mmio|mmio32|mmio32be,<addr>,<options>
+ *    <name>,0x<addr>,<options>
+ *    <name>,<options>
+ *    <name>
  *
- *	Only for the third form does the earlycon setup() method receive the
- *	<options> string in the 'options' parameter; all other forms set
- *	the parameter to NULL.
+ * Only for the third form does the earlycon setup() method receive the
+ * <options> string in the 'options' parameter; all other forms set
+ * the parameter to NULL.
  *
- *	Returns 0 if an attempt to register the earlycon was made,
- *	otherwise negative error code
+ * Returns 0 if an attempt to register the earlycon was made,
+ * otherwise negative error code
  */
 int __init setup_earlycon(char *buf)
 {
diff --git a/drivers/tty/serial/ifx6x60.c b/drivers/tty/serial/ifx6x60.c
index ffefd218761e..3ddd320162c0 100644
--- a/drivers/tty/serial/ifx6x60.c
+++ b/drivers/tty/serial/ifx6x60.c
@@ -101,8 +101,8 @@ static int ifx_modem_reboot_callback(struct notifier_block *nfb,
 /* GPIO/GPE settings */
 
 /**
- *	mrdy_set_high		-	set MRDY GPIO
- *	@ifx: device we are controlling
+ * mrdy_set_high() - set MRDY GPIO
+ * @ifx: device we are controlling
  *
  */
 static inline void mrdy_set_high(struct ifx_spi_device *ifx)
@@ -111,8 +111,8 @@ static inline void mrdy_set_high(struct ifx_spi_device *ifx)
 }
 
 /**
- *	mrdy_set_low		-	clear MRDY GPIO
- *	@ifx: device we are controlling
+ * mrdy_set_low() - clear MRDY GPIO
+ * @ifx: device we are controlling
  *
  */
 static inline void mrdy_set_low(struct ifx_spi_device *ifx)
@@ -121,11 +121,11 @@ static inline void mrdy_set_low(struct ifx_spi_device *ifx)
 }
 
 /**
- *	ifx_spi_power_state_set
- *	@ifx_dev: our SPI device
- *	@val: bits to set
+ * ifx_spi_power_state_set()
+ * @ifx_dev: our SPI device
+ * @val: bits to set
  *
- *	Set bit in power status and signal power system if status becomes non-0
+ * Set bit in power status and signal power system if status becomes non-0
  */
 static void
 ifx_spi_power_state_set(struct ifx_spi_device *ifx_dev, unsigned char val)
@@ -146,11 +146,11 @@ ifx_spi_power_state_set(struct ifx_spi_device *ifx_dev, unsigned char val)
 }
 
 /**
- *	ifx_spi_power_state_clear	-	clear power bit
- *	@ifx_dev: our SPI device
- *	@val: bits to clear
+ * ifx_spi_power_state_clear() - clear power bit
+ * @ifx_dev: our SPI device
+ * @val: bits to clear
  *
- *	clear bit in power status and signal power system if status becomes 0
+ * clear bit in power status and signal power system if status becomes 0
  */
 static void
 ifx_spi_power_state_clear(struct ifx_spi_device *ifx_dev, unsigned char val)
@@ -169,12 +169,12 @@ ifx_spi_power_state_clear(struct ifx_spi_device *ifx_dev, unsigned char val)
 }
 
 /**
- *	swap_buf_8
- *	@buf: our buffer
- *	@len : number of bytes (not words) in the buffer
- *	@end: end of buffer
+ * swap_buf_8()
+ * @buf: our buffer
+ * @len: number of bytes (not words) in the buffer
+ * @end: end of buffer
  *
- *	Swap the contents of a buffer into big endian format
+ * Swap the contents of a buffer into big endian format
  */
 static inline void swap_buf_8(unsigned char *buf, int len, void *end)
 {
@@ -183,12 +183,12 @@ static inline void swap_buf_8(unsigned char *buf, int len, void *end)
 }
 
 /**
- *	swap_buf_16
- *	@buf: our buffer
- *	@len : number of bytes (not words) in the buffer
- *	@end: end of buffer
+ * swap_buf_16()
+ * @buf: our buffer
+ * @len: number of bytes (not words) in the buffer
+ * @end: end of buffer
  *
- *	Swap the contents of a buffer into big endian format
+ * Swap the contents of a buffer into big endian format
  */
 static inline void swap_buf_16(unsigned char *buf, int len, void *end)
 {
@@ -208,12 +208,12 @@ static inline void swap_buf_16(unsigned char *buf, int len, void *end)
 }
 
 /**
- *	swap_buf_32
- *	@buf: our buffer
- *	@len : number of bytes (not words) in the buffer
- *	@end: end of buffer
+ * swap_buf_32()
+ * @buf: our buffer
+ * @len: number of bytes (not words) in the buffer
+ * @end: end of buffer
  *
- *	Swap the contents of a buffer into big endian format
+ * Swap the contents of a buffer into big endian format
  */
 static inline void swap_buf_32(unsigned char *buf, int len, void *end)
 {
@@ -234,13 +234,13 @@ static inline void swap_buf_32(unsigned char *buf, int len, void *end)
 }
 
 /**
- *	mrdy_assert		-	assert MRDY line
- *	@ifx_dev: our SPI device
+ * mrdy_assert() - assert MRDY line
+ * @ifx_dev: our SPI device
  *
- *	Assert mrdy and set timer to wait for SRDY interrupt, if SRDY is low
- *	now.
+ * Assert mrdy and set timer to wait for SRDY interrupt, if SRDY is low
+ * now.
  *
- *	FIXME: Can SRDY even go high as we are running this code ?
+ * FIXME: Can SRDY even go high as we are running this code ?
  */
 static void mrdy_assert(struct ifx_spi_device *ifx_dev)
 {
@@ -257,11 +257,11 @@ static void mrdy_assert(struct ifx_spi_device *ifx_dev)
 }
 
 /**
- *	ifx_spi_timeout		-	SPI timeout
- *	@arg: our SPI device
+ * ifx_spi_timeout() - SPI timeout
+ * @arg: our SPI device
  *
- *	The SPI has timed out: hang up the tty. Users will then see a hangup
- *	and error events.
+ * The SPI has timed out: hang up the tty. Users will then see a hangup
+ * and error events.
  */
 static void ifx_spi_timeout(struct timer_list *t)
 {
@@ -276,12 +276,12 @@ static void ifx_spi_timeout(struct timer_list *t)
 /* char/tty operations */
 
 /**
- *	ifx_spi_tiocmget	-	get modem lines
- *	@tty: our tty device
- *	@filp: file handle issuing the request
+ * ifx_spi_tiocmget() - get modem lines
+ * @tty: our tty device
+ * @filp: file handle issuing the request
  *
- *	Map the signal state into Linux modem flags and report the value
- *	in Linux terms
+ * Map the signal state into Linux modem flags and report the value
+ * in Linux terms
  */
 static int ifx_spi_tiocmget(struct tty_struct *tty)
 {
@@ -299,15 +299,15 @@ static int ifx_spi_tiocmget(struct tty_struct *tty)
 }
 
 /**
- *	ifx_spi_tiocmset	-	set modem bits
- *	@tty: the tty structure
- *	@set: bits to set
- *	@clear: bits to clear
+ * ifx_spi_tiocmset() - set modem bits
+ * @tty: the tty structure
+ * @set: bits to set
+ * @clear: bits to clear
  *
- *	The IFX6x60 only supports DTR and RTS. Set them accordingly
- *	and flag that an update to the modem is needed.
+ * The IFX6x60 only supports DTR and RTS. Set them accordingly
+ * and flag that an update to the modem is needed.
  *
- *	FIXME: do we need to kick the tranfers when we do this ?
+ * FIXME: do we need to kick the tranfers when we do this ?
  */
 static int ifx_spi_tiocmset(struct tty_struct *tty,
 			    unsigned int set, unsigned int clear)
@@ -328,14 +328,14 @@ static int ifx_spi_tiocmset(struct tty_struct *tty,
 }
 
 /**
- *	ifx_spi_open	-	called on tty open
- *	@tty: our tty device
- *	@filp: file handle being associated with the tty
+ * ifx_spi_open() - called on tty open
+ * @tty: our tty device
+ * @filp: file handle being associated with the tty
  *
- *	Open the tty interface. We let the tty_port layer do all the work
- *	for us.
+ * Open the tty interface. We let the tty_port layer do all the work
+ * for us.
  *
- *	FIXME: Remove single device assumption and saved_ifx_dev
+ * FIXME: Remove single device assumption and saved_ifx_dev
  */
 static int ifx_spi_open(struct tty_struct *tty, struct file *filp)
 {
@@ -343,12 +343,12 @@ static int ifx_spi_open(struct tty_struct *tty, struct file *filp)
 }
 
 /**
- *	ifx_spi_close	-	called when our tty closes
- *	@tty: the tty being closed
- *	@filp: the file handle being closed
+ * ifx_spi_close() - called when our tty closes
+ * @tty: the tty being closed
+ * @filp: the file handle being closed
  *
- *	Perform the close of the tty. We use the tty_port layer to do all
- *	our hard work.
+ * Perform the close of the tty. We use the tty_port layer to do all
+ * our hard work.
  */
 static void ifx_spi_close(struct tty_struct *tty, struct file *filp)
 {
@@ -358,17 +358,17 @@ static void ifx_spi_close(struct tty_struct *tty, struct file *filp)
 }
 
 /**
- *	ifx_decode_spi_header	-	decode received header
- *	@buffer: the received data
- *	@length: decoded length
- *	@more: decoded more flag
- *	@received_cts: status of cts we received
+ * ifx_decode_spi_header() - decode received header
+ * @buffer: the received data
+ * @length: decoded length
+ * @more: decoded more flag
+ * @received_cts: status of cts we received
  *
- *	Note how received_cts is handled -- if header is all F it is left
- *	the same as it was, if header is all 0 it is set to 0 otherwise it is
- *	taken from the incoming header.
+ * Note how received_cts is handled -- if header is all F it is left
+ * the same as it was, if header is all 0 it is set to 0 otherwise it is
+ * taken from the incoming header.
  *
- *	FIXME: endianness
+ * FIXME: endianness
  */
 static int ifx_spi_decode_spi_header(unsigned char *buffer, int *length,
 			unsigned char *more, unsigned char *received_cts)
@@ -397,14 +397,14 @@ static int ifx_spi_decode_spi_header(unsigned char *buffer, int *length,
 }
 
 /**
- *	ifx_setup_spi_header	-	set header fields
- *	@txbuffer: pointer to start of SPI buffer
- *	@tx_count: bytes
- *	@more: indicate if more to follow
+ * ifx_setup_spi_header() - set header fields
+ * @txbuffer: pointer to start of SPI buffer
+ * @tx_count: bytes
+ * @more: indicate if more to follow
  *
- *	Format up an SPI header for a transfer
+ * Format up an SPI header for a transfer
  *
- *	FIXME: endianness?
+ * FIXME: endianness?
  */
 static void ifx_spi_setup_spi_header(unsigned char *txbuffer, int tx_count,
 					unsigned char more)
@@ -415,16 +415,16 @@ static void ifx_spi_setup_spi_header(unsigned char *txbuffer, int tx_count,
 }
 
 /**
- *	ifx_spi_prepare_tx_buffer	-	prepare transmit frame
- *	@ifx_dev: our SPI device
+ * ifx_spi_prepare_tx_buffer() - prepare transmit frame
+ * @ifx_dev: our SPI device
  *
- *	The transmit buffr needs a header and various other bits of
- *	information followed by as much data as we can pull from the FIFO
- *	and transfer. This function formats up a suitable buffer in the
- *	ifx_dev->tx_buffer
+ * The transmit buffr needs a header and various other bits of
+ * information followed by as much data as we can pull from the FIFO
+ * and transfer. This function formats up a suitable buffer in the
+ * ifx_dev->tx_buffer
  *
- *	FIXME: performance - should we wake the tty when the queue is half
- *			     empty ?
+ * FIXME: performance() - should we wake the tty when the queue is half
+ *        empty ?
  */
 static int ifx_spi_prepare_tx_buffer(struct ifx_spi_device *ifx_dev)
 {
@@ -476,14 +476,14 @@ static int ifx_spi_prepare_tx_buffer(struct ifx_spi_device *ifx_dev)
 }
 
 /**
- *	ifx_spi_write		-	line discipline write
- *	@tty: our tty device
- *	@buf: pointer to buffer to write (kernel space)
- *	@count: size of buffer
+ * ifx_spi_write() - line discipline write
+ * @tty: our tty device
+ * @buf: pointer to buffer to write (kernel space)
+ * @count: size of buffer
  *
- *	Write the characters we have been given into the FIFO. If the device
- *	is not active then activate it, when the SRDY line is asserted back
- *	this will commence I/O
+ * Write the characters we have been given into the FIFO. If the device
+ * is not active then activate it, when the SRDY line is asserted back
+ * this will commence I/O
  */
 static int ifx_spi_write(struct tty_struct *tty, const unsigned char *buf,
 			 int count)
@@ -505,11 +505,11 @@ static int ifx_spi_write(struct tty_struct *tty, const unsigned char *buf,
 }
 
 /**
- *	ifx_spi_chars_in_buffer	-	line discipline helper
- *	@tty: our tty device
+ * ifx_spi_write_room() - line discipline helper
+ * @tty: our tty device
  *
- *	Report how much data we can accept before we drop bytes. As we use
- *	a simple FIFO this is nice and easy.
+ * Report how much data we can accept before we drop bytes. As we use
+ * a simple FIFO this is nice and easy.
  */
 static int ifx_spi_write_room(struct tty_struct *tty)
 {
@@ -518,11 +518,11 @@ static int ifx_spi_write_room(struct tty_struct *tty)
 }
 
 /**
- *	ifx_spi_chars_in_buffer	-	line discipline helper
- *	@tty: our tty device
+ * ifx_spi_chars_in_buffer() - line discipline helper
+ * @tty: our tty device
  *
- *	Report how many characters we have buffered. In our case this is the
- *	number of bytes sitting in our transmit FIFO.
+ * Report how many characters we have buffered. In our case this is the
+ * number of bytes sitting in our transmit FIFO.
  */
 static int ifx_spi_chars_in_buffer(struct tty_struct *tty)
 {
@@ -531,12 +531,12 @@ static int ifx_spi_chars_in_buffer(struct tty_struct *tty)
 }
 
 /**
- *	ifx_port_hangup
- *	@port: our tty port
+ * ifx_port_hangup()
+ * @port: our tty port
  *
- *	tty port hang up. Called when tty_hangup processing is invoked either
- *	by loss of carrier, or by software (eg vhangup). Serialized against
- *	activate/shutdown by the tty layer.
+ * tty port hang up. Called when tty_hangup processing is invoked either
+ * by loss of carrier, or by software (eg vhangup). Serialized against
+ * activate/shutdown by the tty layer.
  */
 static void ifx_spi_hangup(struct tty_struct *tty)
 {
@@ -545,11 +545,11 @@ static void ifx_spi_hangup(struct tty_struct *tty)
 }
 
 /**
- *	ifx_port_activate
- *	@port: our tty port
+ * ifx_port_activate()
+ * @port: our tty port
  *
- *	tty port activate method - called for first open. Serialized
- *	with hangup and shutdown by the tty layer.
+ * tty port activate method - called for first open. Serialized
+ * with hangup and shutdown by the tty layer.
  */
 static int ifx_port_activate(struct tty_port *port, struct tty_struct *tty)
 {
@@ -576,11 +576,11 @@ static int ifx_port_activate(struct tty_port *port, struct tty_struct *tty)
 }
 
 /**
- *	ifx_port_shutdown
- *	@port: our tty port
+ * ifx_port_shutdown()
+ * @port: our tty port
  *
- *	tty port shutdown method - called for last port close. Serialized
- *	with hangup and activate by the tty layer.
+ * tty port shutdown method - called for last port close. Serialized
+ * with hangup and activate by the tty layer.
  */
 static void ifx_port_shutdown(struct tty_port *port)
 {
@@ -611,13 +611,13 @@ static const struct tty_operations ifx_spi_serial_ops = {
 };
 
 /**
- *	ifx_spi_insert_fip_string	-	queue received data
- *	@ifx_ser: our SPI device
- *	@chars: buffer we have received
- *	@size: number of chars reeived
+ * ifx_spi_insert_fip_string() - queue received data
+ * @ifx_ser: our SPI device
+ * @chars: buffer we have received
+ * @size: number of chars reeived
  *
- *	Queue bytes to the tty assuming the tty side is currently open. If
- *	not the discard the data.
+ * Queue bytes to the tty assuming the tty side is currently open. If
+ * not the discard the data.
  */
 static void ifx_spi_insert_flip_string(struct ifx_spi_device *ifx_dev,
 				    unsigned char *chars, size_t size)
@@ -627,11 +627,11 @@ static void ifx_spi_insert_flip_string(struct ifx_spi_device *ifx_dev,
 }
 
 /**
- *	ifx_spi_complete	-	SPI transfer completed
- *	@ctx: our SPI device
+ * ifx_spi_complete() - SPI transfer completed
+ * @ctx: our SPI device
  *
- *	An SPI transfer has completed. Process any received data and kick off
- *	any further transmits we can commence.
+ * An SPI transfer has completed. Process any received data and kick off
+ * any further transmits we can commence.
  */
 static void ifx_spi_complete(void *ctx)
 {
@@ -720,11 +720,11 @@ static void ifx_spi_complete(void *ctx)
 }
 
 /**
- *	ifx_spio_io		-	I/O tasklet
- *	@data: our SPI device
+ * ifx_spio_io() - I/O tasklet
+ * @data: our SPI device
  *
- *	Queue data for transmission if possible and then kick off the
- *	transfer.
+ * Queue data for transmission if possible and then kick off the
+ * transfer.
  */
 static void ifx_spi_io(unsigned long data)
 {
@@ -792,10 +792,10 @@ static void ifx_spi_io(unsigned long data)
 }
 
 /**
- *	ifx_spi_free_port	-	free up the tty side
- *	@ifx_dev: IFX device going away
+ * ifx_spi_free_port() - free up the tty side
+ * @ifx_dev: IFX device going away
  *
- *	Unregister and free up a port when the device goes away
+ * Unregister and free up a port when the device goes away
  */
 static void ifx_spi_free_port(struct ifx_spi_device *ifx_dev)
 {
@@ -806,11 +806,11 @@ static void ifx_spi_free_port(struct ifx_spi_device *ifx_dev)
 }
 
 /**
- *	ifx_spi_create_port	-	create a new port
- *	@ifx_dev: our spi device
+ * ifx_spi_create_port() - create a new port
+ * @ifx_dev: our spi device
  *
- *	Allocate and initialise the tty port that goes with this interface
- *	and add it to the tty layer so that it can be opened.
+ * Allocate and initialise the tty port that goes with this interface
+ * and add it to the tty layer so that it can be opened.
  */
 static int ifx_spi_create_port(struct ifx_spi_device *ifx_dev)
 {
@@ -847,12 +847,12 @@ static int ifx_spi_create_port(struct ifx_spi_device *ifx_dev)
 }
 
 /**
- *	ifx_spi_handle_srdy		-	handle SRDY
- *	@ifx_dev: device asserting SRDY
+ * ifx_spi_handle_srdy() - handle SRDY
+ * @ifx_dev: device asserting SRDY
  *
- *	Check our device state and see what we need to kick off when SRDY
- *	is asserted. This usually means killing the timer and firing off the
- *	I/O processing.
+ * Check our device state and see what we need to kick off when SRDY
+ * is asserted. This usually means killing the timer and firing off the
+ * I/O processing.
  */
 static void ifx_spi_handle_srdy(struct ifx_spi_device *ifx_dev)
 {
@@ -870,11 +870,11 @@ static void ifx_spi_handle_srdy(struct ifx_spi_device *ifx_dev)
 }
 
 /**
- *	ifx_spi_srdy_interrupt	-	SRDY asserted
- *	@irq: our IRQ number
- *	@dev: our ifx device
+ * ifx_spi_srdy_interrupt() - SRDY asserted
+ * @irq: our IRQ number
+ * @dev: our ifx device
  *
- *	The modem asserted SRDY. Handle the srdy event
+ * The modem asserted SRDY. Handle the srdy event
  */
 static irqreturn_t ifx_spi_srdy_interrupt(int irq, void *dev)
 {
@@ -885,15 +885,15 @@ static irqreturn_t ifx_spi_srdy_interrupt(int irq, void *dev)
 }
 
 /**
- *	ifx_spi_reset_interrupt	-	Modem has changed reset state
- *	@irq: interrupt number
- *	@dev: our device pointer
+ * ifx_spi_reset_interrupt() - Modem has changed reset state
+ * @irq: interrupt number
+ * @dev: our device pointer
  *
- *	The modem has either entered or left reset state. Check the GPIO
- *	line to see which.
+ * The modem has either entered or left reset state. Check the GPIO
+ * line to see which.
  *
- *	FIXME: review locking on MR_INPROGRESS versus
- *	parallel unsolicited reset/solicited reset
+ * FIXME: review locking on MR_INPROGRESS versus
+ * parallel unsolicited reset/solicited reset
  */
 static irqreturn_t ifx_spi_reset_interrupt(int irq, void *dev)
 {
@@ -920,10 +920,10 @@ static irqreturn_t ifx_spi_reset_interrupt(int irq, void *dev)
 }
 
 /**
- *	ifx_spi_free_device - free device
- *	@ifx_dev: device to free
+ * ifx_spi_free_device() - free device
+ * @ifx_dev: device to free
  *
- *	Free the IFX device
+ * Free the IFX device
  */
 static void ifx_spi_free_device(struct ifx_spi_device *ifx_dev)
 {
@@ -939,10 +939,10 @@ static void ifx_spi_free_device(struct ifx_spi_device *ifx_dev)
 }
 
 /**
- *	ifx_spi_reset	-	reset modem
- *	@ifx_dev: modem to reset
+ * ifx_spi_reset() - reset modem
+ * @ifx_dev: modem to reset
  *
- *	Perform a reset on the modem
+ * Perform a reset on the modem
  */
 static int ifx_spi_reset(struct ifx_spi_device *ifx_dev)
 {
@@ -975,15 +975,15 @@ static int ifx_spi_reset(struct ifx_spi_device *ifx_dev)
 }
 
 /**
- *	ifx_spi_spi_probe	-	probe callback
- *	@spi: our possible matching SPI device
+ * ifx_spi_spi_probe() - probe callback
+ * @spi: our possible matching SPI device
  *
- *	Probe for a 6x60 modem on SPI bus. Perform any needed device and
- *	GPIO setup.
+ * Probe for a 6x60 modem on SPI bus. Perform any needed device and
+ * GPIO setup.
  *
- *	FIXME:
- *	-	Support for multiple devices
- *	-	Split out MID specific GPIO handling eventually
+ * FIXME:
+ * -	Support for multiple devices
+ * -	Split out MID specific GPIO handling eventually
  */
 
 static int ifx_spi_spi_probe(struct spi_device *spi)
@@ -1218,11 +1218,11 @@ static int ifx_spi_spi_probe(struct spi_device *spi)
 }
 
 /**
- *	ifx_spi_spi_remove	-	SPI device was removed
- *	@spi: SPI device
+ * ifx_spi_spi_remove() - SPI device was removed
+ * @spi: SPI device
  *
- *	FIXME: We should be shutting the device down here not in
- *	the module unload path.
+ * FIXME: We should be shutting the device down here not in
+ * the module unload path.
  */
 
 static int ifx_spi_spi_remove(struct spi_device *spi)
@@ -1248,10 +1248,10 @@ static int ifx_spi_spi_remove(struct spi_device *spi)
 }
 
 /**
- *	ifx_spi_spi_shutdown	-	called on SPI shutdown
- *	@spi: SPI device
+ * ifx_spi_spi_shutdown() - called on SPI shutdown
+ * @spi: SPI device
  *
- *	No action needs to be taken here
+ * No action needs to be taken here
  */
 
 static void ifx_spi_spi_shutdown(struct spi_device *spi)
@@ -1267,11 +1267,11 @@ static void ifx_spi_spi_shutdown(struct spi_device *spi)
  */
 
 /**
- *	ifx_spi_pm_suspend	-	suspend modem on system suspend
- *	@dev: device being suspended
+ * ifx_spi_pm_suspend() - suspend modem on system suspend
+ * @dev: device being suspended
  *
- *	Suspend the modem. No action needed on Intel MID platforms, may
- *	need extending for other systems.
+ * Suspend the modem. No action needed on Intel MID platforms, may
+ * need extending for other systems.
  */
 static int ifx_spi_pm_suspend(struct device *dev)
 {
@@ -1279,12 +1279,12 @@ static int ifx_spi_pm_suspend(struct device *dev)
 }
 
 /**
- *	ifx_spi_pm_resume	-	resume modem on system resume
- *	@dev: device being suspended
+ * ifx_spi_pm_resume() - resume modem on system resume
+ * @dev: device being resumed
  *
- *	Allow the modem to resume. No action needed.
+ * Allow the modem to resume. No action needed.
  *
- *	FIXME: do we need to reset anything here ?
+ * FIXME: do we need to reset anything here ?
  */
 static int ifx_spi_pm_resume(struct device *dev)
 {
@@ -1292,10 +1292,10 @@ static int ifx_spi_pm_resume(struct device *dev)
 }
 
 /**
- *	ifx_spi_pm_runtime_resume	-	suspend modem
- *	@dev: device being suspended
+ * ifx_spi_pm_runtime_resume() - suspend modem
+ * @dev: device being resumed
  *
- *	Allow the modem to resume. No action needed.
+ * Allow the modem to resume. No action needed.
  */
 static int ifx_spi_pm_runtime_resume(struct device *dev)
 {
@@ -1303,11 +1303,11 @@ static int ifx_spi_pm_runtime_resume(struct device *dev)
 }
 
 /**
- *	ifx_spi_pm_runtime_suspend	-	suspend modem
- *	@dev: device being suspended
+ * ifx_spi_pm_runtime_suspend() - suspend modem
+ * @dev: device being suspended
  *
- *	Allow the modem to suspend and thus suspend to continue up the
- *	device tree.
+ * Allow the modem to suspend and thus suspend to continue up the
+ * device tree.
  */
 static int ifx_spi_pm_runtime_suspend(struct device *dev)
 {
@@ -1315,10 +1315,10 @@ static int ifx_spi_pm_runtime_suspend(struct device *dev)
 }
 
 /**
- *	ifx_spi_pm_runtime_idle		-	check if modem idle
- *	@dev: our device
+ * ifx_spi_pm_runtime_idle() - check if modem idle
+ * @dev: our device
  *
- *	Check conditions and queue runtime suspend if idle.
+ * Check conditions and queue runtime suspend if idle.
  */
 static int ifx_spi_pm_runtime_idle(struct device *dev)
 {
@@ -1359,9 +1359,9 @@ static struct spi_driver ifx_spi_driver = {
 };
 
 /**
- *	ifx_spi_exit	-	module exit
+ * ifx_spi_exit() - module exit
  *
- *	Unload the module.
+ * Unload the module.
  */
 
 static void __exit ifx_spi_exit(void)
@@ -1374,11 +1374,11 @@ static void __exit ifx_spi_exit(void)
 }
 
 /**
- *	ifx_spi_init		-	module entry point
+ * ifx_spi_init() - module entry point
  *
- *	Initialise the SPI and tty interfaces for the IFX SPI driver
- *	We need to initialize upper-edge spi driver after the tty
- *	driver because otherwise the spi probe will race
+ * Initialise the SPI and tty interfaces for the IFX SPI driver
+ * We need to initialize upper-edge spi driver after the tty
+ * driver because otherwise the spi probe will race
  */
 
 static int __init ifx_spi_init(void)
diff --git a/drivers/tty/serial/ioc3_serial.c b/drivers/tty/serial/ioc3_serial.c
index d8a1cdd6a53d..f0f76ea6f8ea 100644
--- a/drivers/tty/serial/ioc3_serial.c
+++ b/drivers/tty/serial/ioc3_serial.c
@@ -298,7 +298,7 @@ struct ring_buffer {
 
 
 /**
- * set_baud - Baud rate setting code
+ * set_baud() - Baud rate setting code
  * @port: port to set
  * @baud: baud rate to use
  */
@@ -346,7 +346,7 @@ static int set_baud(struct ioc3_port *port, int baud)
 }
 
 /**
- * get_ioc3_port - given a uart port, return the control structure
+ * get_ioc3_port() - given a uart port, return the control structure
  * @the_port: uart port to find
  */
 static struct ioc3_port *get_ioc3_port(struct uart_port *the_port)
@@ -370,7 +370,7 @@ static struct ioc3_port *get_ioc3_port(struct uart_port *the_port)
 }
 
 /**
- * port_init - Initialize the sio and ioc3 hardware for a given port
+ * port_init() - Initialize the sio and ioc3 hardware for a given port
  *			called per port from attach...
  * @port: port to initialize
  */
@@ -474,7 +474,7 @@ static inline int port_init(struct ioc3_port *port)
 }
 
 /**
- * enable_intrs - enable interrupts
+ * enable_intrs() - enable interrupts
  * @port: port to enable
  * @mask: mask to use
  */
@@ -487,7 +487,7 @@ static void enable_intrs(struct ioc3_port *port, uint32_t mask)
 }
 
 /**
- * local_open - local open a port
+ * local_open() - local open a port
  * @port: port to open
  */
 static inline int local_open(struct ioc3_port *port)
@@ -536,7 +536,7 @@ static inline int local_open(struct ioc3_port *port)
 }
 
 /**
- * set_rx_timeout - Set rx timeout and threshold values.
+ * set_rx_timeout() - Set rx timeout and threshold values.
  * @port: port to use
  * @timeout: timeout value in ticks
  */
@@ -575,7 +575,7 @@ static inline int set_rx_timeout(struct ioc3_port *port, int timeout)
 }
 
 /**
- * config_port - config the hardware
+ * config_port() - config the hardware
  * @port: port to config
  * @baud: baud rate for the port
  * @byte_size: data size
@@ -667,7 +667,7 @@ config_port(struct ioc3_port *port,
 }
 
 /**
- * do_write - Write bytes to the port.  Returns the number of bytes
+ * do_write() - Write bytes to the port.  Returns the number of bytes
  *			actually written. Called from transmit_chars
  * @port: port to use
  * @buf: the stuff to write
@@ -752,7 +752,7 @@ static inline int do_write(struct ioc3_port *port, char *buf, int len)
 }
 
 /**
- * disable_intrs - disable interrupts
+ * disable_intrs() - disable interrupts
  * @port: port to enable
  * @mask: mask to use
  */
@@ -765,7 +765,7 @@ static inline void disable_intrs(struct ioc3_port *port, uint32_t mask)
 }
 
 /**
- * set_notification - Modify event notification
+ * set_notification() - Modify event notification
  * @port: port to use
  * @mask: events mask
  * @set_on: set ?
@@ -814,7 +814,7 @@ static int set_notification(struct ioc3_port *port, int mask, int set_on)
 }
 
 /**
- * set_mcr - set the master control reg
+ * set_mcr() - set the master control reg
  * @the_port: port to use
  * @mask1: mcr mask
  * @mask2: shadow mask
@@ -858,7 +858,7 @@ static inline int set_mcr(struct uart_port *the_port,
 }
 
 /**
- * ioc3_set_proto - set the protocol for the port
+ * ioc3_set_proto() - set the protocol for the port
  * @port: port to use
  * @proto: protocol to use
  */
@@ -886,7 +886,7 @@ static int ioc3_set_proto(struct ioc3_port *port, int proto)
 }
 
 /**
- * transmit_chars - upper level write, called with the_port->lock
+ * transmit_chars() - upper level write, called with the_port->lock
  * @the_port: port to write
  */
 static void transmit_chars(struct uart_port *the_port)
@@ -942,7 +942,7 @@ static void transmit_chars(struct uart_port *the_port)
 }
 
 /**
- * ioc3_change_speed - change the speed of the port
+ * ioc3_change_speed() - change the speed of the port
  * @the_port: port to change
  * @new_termios: new termios settings
  * @old_termios: old termios settings
@@ -1040,7 +1040,7 @@ ioc3_change_speed(struct uart_port *the_port,
 }
 
 /**
- * ic3_startup_local - Start up the serial port - returns >= 0 if no errors
+ * ic3_startup_local() - Start up the serial port - returns >= 0 if no errors
  * @the_port: Port to operate on
  */
 static inline int ic3_startup_local(struct uart_port *the_port)
@@ -1104,7 +1104,7 @@ static void ioc3_cb_post_ncs(struct uart_port *the_port, int ncs)
 }
 
 /**
- * do_read - Read in bytes from the port.  Return the number of bytes
+ * do_read() - Read in bytes from the port.  Return the number of bytes
  *			actually read.
  * @the_port: port to use
  * @buf: place to put the stuff we read
@@ -1385,7 +1385,7 @@ static inline int do_read(struct uart_port *the_port, char *buf, int len)
 }
 
 /**
- * receive_chars - upper level read.
+ * receive_chars() - upper level read.
  * @the_port: port to read from
  */
 static int receive_chars(struct uart_port *the_port)
@@ -1421,7 +1421,7 @@ static int receive_chars(struct uart_port *the_port)
 }
 
 /**
- * ioc3uart_intr_one - lowest level (per port) interrupt handler.
+ * ioc3uart_intr_one() - lowest level (per port) interrupt handler.
  * @is : submodule
  * @idd: driver data
  * @pending: interrupts to handle
@@ -1620,7 +1620,7 @@ ioc3uart_intr_one(struct ioc3_submodule *is,
 }
 
 /**
- * ioc3uart_intr - field all serial interrupts
+ * ioc3uart_intr() - field all serial interrupts
  * @is : submodule
  * @idd: driver data
  * @pending: interrupts to handle
@@ -1660,7 +1660,7 @@ static const char *ic3_type(struct uart_port *the_port)
 }
 
 /**
- * ic3_tx_empty - Is the transmitter empty?
+ * ic3_tx_empty() - Is the transmitter empty?
  * @port: Port to operate on
  *
  */
@@ -1675,7 +1675,7 @@ static unsigned int ic3_tx_empty(struct uart_port *the_port)
 }
 
 /**
- * ic3_stop_tx - stop the transmitter
+ * ic3_stop_tx() - stop the transmitter
  * @port: Port to operate on
  *
  */
@@ -1688,7 +1688,7 @@ static void ic3_stop_tx(struct uart_port *the_port)
 }
 
 /**
- * ic3_stop_rx - stop the receiver
+ * ic3_stop_rx() - stop the receiver
  * @port: Port to operate on
  *
  */
@@ -1710,7 +1710,7 @@ static void null_void_function(struct uart_port *the_port)
 }
 
 /**
- * ic3_shutdown - shut down the port - free irq and disable
+ * ic3_shutdown() - shut down the port - free irq and disable
  * @port: port to shut down
  *
  */
@@ -1733,7 +1733,7 @@ static void ic3_shutdown(struct uart_port *the_port)
 }
 
 /**
- * ic3_set_mctrl - set control lines (dtr, rts, etc)
+ * ic3_set_mctrl() - set control lines (dtr, rts, etc)
  * @port: Port to operate on
  * @mctrl: Lines to set/unset
  *
@@ -1757,7 +1757,7 @@ static void ic3_set_mctrl(struct uart_port *the_port, unsigned int mctrl)
 }
 
 /**
- * ic3_get_mctrl - get control line info
+ * ic3_get_mctrl() - get control line info
  * @port: port to operate on
  *
  */
@@ -1781,7 +1781,7 @@ static unsigned int ic3_get_mctrl(struct uart_port *the_port)
 }
 
 /**
- * ic3_start_tx - Start transmitter. Called with the_port->lock
+ * ic3_start_tx() - Start transmitter. Called with the_port->lock
  * @port: Port to operate on
  *
  */
@@ -1796,7 +1796,7 @@ static void ic3_start_tx(struct uart_port *the_port)
 }
 
 /**
- * ic3_break_ctl - handle breaks
+ * ic3_break_ctl() - handle breaks
  * @port: Port to operate on
  * @break_state: Break state
  *
@@ -1806,7 +1806,7 @@ static void ic3_break_ctl(struct uart_port *the_port, int break_state)
 }
 
 /**
- * ic3_startup - Start up the serial port - always return 0 (We're always on)
+ * ic3_startup() - Start up the serial port - always return 0 (We're always on)
  * @port: Port to operate on
  *
  */
@@ -1842,7 +1842,7 @@ static int ic3_startup(struct uart_port *the_port)
 }
 
 /**
- * ic3_set_termios - set termios stuff
+ * ic3_set_termios() - set termios stuff
  * @port: port to operate on
  * @termios: New settings
  * @termios: Old
@@ -1860,7 +1860,7 @@ ic3_set_termios(struct uart_port *the_port,
 }
 
 /**
- * ic3_request_port - allocate resources for port - no op....
+ * ic3_request_port() - allocate resources for port - no op....
  * @port: port to operate on
  *
  */
@@ -1900,7 +1900,7 @@ static struct uart_driver ioc3_uart = {
 };
 
 /**
- * ioc3_serial_core_attach - register with serial core
+ * ioc3_serial_core_attach() - register with serial core
  *		This is done during pci probing
  * @is: submodule struct for this
  * @idd: handle for this card
@@ -1960,7 +1960,7 @@ static inline int ioc3_serial_core_attach( struct ioc3_submodule *is,
 }
 
 /**
- * ioc3uart_remove - register detach function
+ * ioc3uart_remove() - register detach function
  * @is: submodule struct for this submodule
  * @idd: ioc3 driver data for this submodule
  */
@@ -1998,7 +1998,7 @@ static int ioc3uart_remove(struct ioc3_submodule *is,
 }
 
 /**
- * ioc3uart_probe - card probe function called from shim driver
+ * ioc3uart_probe() - card probe function called from shim driver
  * @is: submodule struct for this submodule
  * @idd: ioc3 driver data for this card
  */
@@ -2162,7 +2162,7 @@ static struct ioc3_submodule ioc3uart_ops = {
 };
 
 /**
- * ioc3_detect - module init called,
+ * ioc3_detect() - module init called
  */
 static int __init ioc3uart_init(void)
 {
diff --git a/drivers/tty/serial/ioc4_serial.c b/drivers/tty/serial/ioc4_serial.c
index db5b979e5a0c..804002fae0ee 100644
--- a/drivers/tty/serial/ioc4_serial.c
+++ b/drivers/tty/serial/ioc4_serial.c
@@ -651,7 +651,7 @@ static inline int port_is_active(struct ioc4_port *port,
 
 
 /**
- * write_ireg - write the interrupt regs
+ * write_ireg() - write the interrupt regs
  * @ioc4_soft: ptr to soft struct for this port
  * @val: value to write
  * @which: which register
@@ -697,7 +697,7 @@ write_ireg(struct ioc4_soft *ioc4_soft, uint32_t val, int which, int type)
 }
 
 /**
- * set_baud - Baud rate setting code
+ * set_baud() - Baud rate setting code
  * @port: port to set
  * @baud: baud rate to use
  */
@@ -733,7 +733,7 @@ static int set_baud(struct ioc4_port *port, int baud)
 
 
 /**
- * get_ioc4_port - given a uart port, return the control structure
+ * get_ioc4_port() - given a uart port, return the control structure
  * @port: uart port
  * @set: set this port as current
  */
@@ -817,7 +817,7 @@ pending_intrs(struct ioc4_soft *soft, int type)
 }
 
 /**
- * port_init - Initialize the sio and ioc4 hardware for a given port
+ * port_init() - Initialize the sio and ioc4 hardware for a given port
  *			called per port from attach...
  * @port: port to initialize
  */
@@ -910,7 +910,7 @@ static inline int port_init(struct ioc4_port *port)
 }
 
 /**
- * handle_dma_error_intr - service any pending DMA error interrupts for the
+ * handle_dma_error_intr() - service any pending DMA error interrupts for the
  *			given port - 2nd level called via sd_intr
  * @arg: handler arg
  * @other_ir: ioc4regs
@@ -954,7 +954,7 @@ static void handle_dma_error_intr(void *arg, uint32_t other_ir)
 }
 
 /**
- * intr_connect - interrupt connect function
+ * intr_connect() - interrupt connect function
  * @soft: soft struct for this card
  * @type: interrupt type
  * @intrbits: bit pattern to set
@@ -982,7 +982,7 @@ intr_connect(struct ioc4_soft *soft, int type,
 }
 
 /**
- * ioc4_intr - Top level IOC4 interrupt handler.
+ * ioc4_intr() - Top level IOC4 interrupt handler.
  * @irq: irq value
  * @arg: handler arg
  */
@@ -1040,9 +1040,9 @@ static irqreturn_t ioc4_intr(int irq, void *arg)
 }
 
 /**
- * ioc4_attach_local - Device initialization.
- *			Called at *_attach() time for each
- *			IOC4 with serial ports in the system.
+ * ioc4_attach_local() - Device initialization.
+ *                       Called at *_attach() time for each
+ *                       IOC4 with serial ports in the system.
  * @idd: Master module data for this IOC4
  */
 static inline int ioc4_attach_local(struct ioc4_driver_data *idd)
@@ -1195,7 +1195,7 @@ static inline int ioc4_attach_local(struct ioc4_driver_data *idd)
 }
 
 /**
- * enable_intrs - enable interrupts
+ * enable_intrs() - enable interrupts
  * @port: port to enable
  * @mask: mask to use
  */
@@ -1215,7 +1215,7 @@ static void enable_intrs(struct ioc4_port *port, uint32_t mask)
 }
 
 /**
- * local_open - local open a port
+ * local_open() - local open a port
  * @port: port to open
  */
 static inline int local_open(struct ioc4_port *port)
@@ -1264,7 +1264,7 @@ static inline int local_open(struct ioc4_port *port)
 }
 
 /**
- * set_rx_timeout - Set rx timeout and threshold values.
+ * set_rx_timeout() - Set rx timeout and threshold values.
  * @port: port to use
  * @timeout: timeout value in ticks
  */
@@ -1305,7 +1305,7 @@ static inline int set_rx_timeout(struct ioc4_port *port, int timeout)
 }
 
 /**
- * config_port - config the hardware
+ * config_port() - config the hardware
  * @port: port to config
  * @baud: baud rate for the port
  * @byte_size: data size
@@ -1396,7 +1396,7 @@ config_port(struct ioc4_port *port,
 }
 
 /**
- * do_write - Write bytes to the port.  Returns the number of bytes
+ * do_write() - Write bytes to the port.  Returns the number of bytes
  *			actually written. Called from transmit_chars
  * @port: port to use
  * @buf: the stuff to write
@@ -1481,7 +1481,7 @@ static inline int do_write(struct ioc4_port *port, char *buf, int len)
 }
 
 /**
- * disable_intrs - disable interrupts
+ * disable_intrs() - disable interrupts
  * @port: port to enable
  * @mask: mask to use
  */
@@ -1501,7 +1501,7 @@ static void disable_intrs(struct ioc4_port *port, uint32_t mask)
 }
 
 /**
- * set_notification - Modify event notification
+ * set_notification() - Modify event notification
  * @port: port to use
  * @mask: events mask
  * @set_on: set ?
@@ -1550,7 +1550,7 @@ static int set_notification(struct ioc4_port *port, int mask, int set_on)
 }
 
 /**
- * set_mcr - set the master control reg
+ * set_mcr() - set the master control reg
  * @the_port: port to use
  * @mask1: mcr mask
  * @mask2: shadow mask
@@ -1595,7 +1595,7 @@ static inline int set_mcr(struct uart_port *the_port,
 }
 
 /**
- * ioc4_set_proto - set the protocol for the port
+ * ioc4_set_proto() - set the protocol for the port
  * @port: port to use
  * @proto: protocol to use
  */
@@ -1621,7 +1621,7 @@ static int ioc4_set_proto(struct ioc4_port *port, int proto)
 }
 
 /**
- * transmit_chars - upper level write, called with ip_lock
+ * transmit_chars() - upper level write, called with ip_lock
  * @the_port: port to write
  */
 static void transmit_chars(struct uart_port *the_port)
@@ -1677,7 +1677,7 @@ static void transmit_chars(struct uart_port *the_port)
 }
 
 /**
- * ioc4_change_speed - change the speed of the port
+ * ioc4_change_speed() - change the speed of the port
  * @the_port: port to change
  * @new_termios: new termios settings
  * @old_termios: old termios settings
@@ -1783,7 +1783,7 @@ ioc4_change_speed(struct uart_port *the_port,
 }
 
 /**
- * ic4_startup_local - Start up the serial port - returns >= 0 if no errors
+ * ic4_startup_local() - Start up the serial port - returns >= 0 if no errors
  * @the_port: Port to operate on
  */
 static inline int ic4_startup_local(struct uart_port *the_port)
@@ -1829,7 +1829,7 @@ static void ioc4_cb_output_lowat(struct uart_port *the_port)
 }
 
 /**
- * handle_intr - service any interrupts for the given port - 2nd level
+ * handle_intr() - service any interrupts for the given port - 2nd level
  *			called via sd_intr
  * @arg: handler arg
  * @sio_ir: ioc4regs
@@ -2058,7 +2058,7 @@ static void ioc4_cb_post_ncs(struct uart_port *the_port, int ncs)
 }
 
 /**
- * do_read - Read in bytes from the port.  Return the number of bytes
+ * do_read() - Read in bytes from the port.  Return the number of bytes
  *			actually read.
  * @the_port: port to use
  * @buf: place to put the stuff we read
@@ -2338,7 +2338,7 @@ static inline int do_read(struct uart_port *the_port, unsigned char *buf,
 }
 
 /**
- * receive_chars - upper level read. Called with ip_lock.
+ * receive_chars() - upper level read. Called with ip_lock.
  * @the_port: port to read from
  */
 static void receive_chars(struct uart_port *the_port)
@@ -2372,7 +2372,7 @@ static void receive_chars(struct uart_port *the_port)
 }
 
 /**
- * ic4_type - What type of console are we?
+ * ic4_type() - What type of console are we?
  * @port: Port to operate with (we ignore since we only have one port)
  *
  */
@@ -2385,7 +2385,7 @@ static const char *ic4_type(struct uart_port *the_port)
 }
 
 /**
- * ic4_tx_empty - Is the transmitter empty?
+ * ic4_tx_empty() - Is the transmitter empty?
  * @port: Port to operate on
  *
  */
@@ -2402,7 +2402,7 @@ static unsigned int ic4_tx_empty(struct uart_port *the_port)
 }
 
 /**
- * ic4_stop_tx - stop the transmitter
+ * ic4_stop_tx() - stop the transmitter
  * @port: Port to operate on
  *
  */
@@ -2415,7 +2415,7 @@ static void ic4_stop_tx(struct uart_port *the_port)
 }
 
 /**
- * null_void_function -
+ * null_void_function()
  * @port: Port to operate on
  *
  */
@@ -2424,7 +2424,7 @@ static void null_void_function(struct uart_port *the_port)
 }
 
 /**
- * ic4_shutdown - shut down the port - free irq and disable
+ * ic4_shutdown() - shut down the port - free irq and disable
  * @port: Port to shut down
  *
  */
@@ -2453,7 +2453,7 @@ static void ic4_shutdown(struct uart_port *the_port)
 }
 
 /**
- * ic4_set_mctrl - set control lines (dtr, rts, etc)
+ * ic4_set_mctrl() - set control lines (dtr, rts, etc)
  * @port: Port to operate on
  * @mctrl: Lines to set/unset
  *
@@ -2482,7 +2482,7 @@ static void ic4_set_mctrl(struct uart_port *the_port, unsigned int mctrl)
 }
 
 /**
- * ic4_get_mctrl - get control line info
+ * ic4_get_mctrl() - get control line info
  * @port: port to operate on
  *
  */
@@ -2506,7 +2506,7 @@ static unsigned int ic4_get_mctrl(struct uart_port *the_port)
 }
 
 /**
- * ic4_start_tx - Start transmitter, flush any output
+ * ic4_start_tx() - Start transmitter, flush any output
  * @port: Port to operate on
  *
  */
@@ -2521,7 +2521,7 @@ static void ic4_start_tx(struct uart_port *the_port)
 }
 
 /**
- * ic4_break_ctl - handle breaks
+ * ic4_break_ctl() - handle breaks
  * @port: Port to operate on
  * @break_state: Break state
  *
@@ -2531,7 +2531,7 @@ static void ic4_break_ctl(struct uart_port *the_port, int break_state)
 }
 
 /**
- * ic4_startup - Start up the serial port
+ * ic4_startup() - Start up the serial port
  * @port: Port to operate on
  *
  */
@@ -2564,7 +2564,7 @@ static int ic4_startup(struct uart_port *the_port)
 }
 
 /**
- * ic4_set_termios - set termios stuff
+ * ic4_set_termios() - set termios stuff
  * @port: port to operate on
  * @termios: New settings
  * @termios: Old
@@ -2582,7 +2582,7 @@ ic4_set_termios(struct uart_port *the_port,
 }
 
 /**
- * ic4_request_port - allocate resources for port - no op....
+ * ic4_request_port() - allocate resources for port - no op....
  * @port: port to operate on
  *
  */
@@ -2633,7 +2633,7 @@ static struct uart_driver ioc4_uart_rs422 = {
 
 
 /**
- * ioc4_serial_remove_one - detach function
+ * ioc4_serial_remove_one() - detach function
  *
  * @idd: IOC4 master module data for this IOC4
  */
@@ -2700,7 +2700,7 @@ static int ioc4_serial_remove_one(struct ioc4_driver_data *idd)
 
 
 /**
- * ioc4_serial_core_attach_rs232 - register with serial core
+ * ioc4_serial_core_attach_rs232() - register with serial core
  *		This is done during pci probing
  * @pdev: handle for this card
  */
@@ -2765,7 +2765,7 @@ ioc4_serial_core_attach(struct pci_dev *pdev, int port_type)
 }
 
 /**
- * ioc4_serial_attach_one - register attach function
+ * ioc4_serial_attach_one() - register attach function
  *		called per card found from IOC4 master module.
  * @idd: Master module data for this IOC4
  */
@@ -2906,7 +2906,7 @@ static struct ioc4_submodule ioc4_serial_submodule = {
 };
 
 /**
- * ioc4_serial_init - module init
+ * ioc4_serial_init() - module init
  */
 static int __init ioc4_serial_init(void)
 {
diff --git a/drivers/tty/serial/kgdb_nmi.c b/drivers/tty/serial/kgdb_nmi.c
index 4029272891f9..f4fa9c6d61ab 100644
--- a/drivers/tty/serial/kgdb_nmi.c
+++ b/drivers/tty/serial/kgdb_nmi.c
@@ -154,7 +154,7 @@ static int kgdb_nmi_poll_one_knock(void)
 }
 
 /**
- * kgdb_nmi_poll_knock - Check if it is time to enter the debugger
+ * kgdb_nmi_poll_knock() - Check if it is time to enter the debugger
  *
  * "Serial ports are often noisy, especially when muxed over another port (we
  * often use serial over the headset connector). Noise on the async command
diff --git a/drivers/tty/serial/mux.c b/drivers/tty/serial/mux.c
index f7d67125675e..40fccbf384ca 100644
--- a/drivers/tty/serial/mux.c
+++ b/drivers/tty/serial/mux.c
@@ -68,7 +68,7 @@ static struct timer_list mux_timer;
 #define UART_GET_FIFO_CNT(p) __raw_readl((p)->membase + IO_DCOUNT_REG_OFFSET)
 
 /**
- * get_mux_port_count - Get the number of available ports on the Mux.
+ * get_mux_port_count() - Get the number of available ports on the Mux.
  * @dev: The parisc device.
  *
  * This function is used to determine the number of ports the Mux
@@ -98,7 +98,7 @@ static int __init get_mux_port_count(struct parisc_device *dev)
 }
 
 /**
- * mux_tx_empty - Check if the transmitter fifo is empty.
+ * mux_tx_empty() - Check if the transmitter fifo is empty.
  * @port: Ptr to the uart_port.
  *
  * This function test if the transmitter fifo for the port
@@ -111,7 +111,7 @@ static unsigned int mux_tx_empty(struct uart_port *port)
 }
 
 /**
- * mux_set_mctrl - Set the current state of the modem control inputs.
+ * mux_set_mctrl() - Set the current state of the modem control inputs.
  * @ports: Ptr to the uart_port.
  * @mctrl: Modem control bits.
  *
@@ -123,7 +123,7 @@ static void mux_set_mctrl(struct uart_port *port, unsigned int mctrl)
 }
 
 /**
- * mux_get_mctrl - Returns the current state of modem control inputs.
+ * mux_get_mctrl() - Returns the current state of modem control inputs.
  * @port: Ptr to the uart_port.
  *
  * The Serial MUX does not support CTS, DCD or DSR so these lines are
@@ -135,7 +135,7 @@ static unsigned int mux_get_mctrl(struct uart_port *port)
 }
 
 /**
- * mux_stop_tx - Stop transmitting characters.
+ * mux_stop_tx() - Stop transmitting characters.
  * @port: Ptr to the uart_port.
  *
  * The Serial MUX does not support this function.
@@ -145,7 +145,7 @@ static void mux_stop_tx(struct uart_port *port)
 }
 
 /**
- * mux_start_tx - Start transmitting characters.
+ * mux_start_tx() - Start transmitting characters.
  * @port: Ptr to the uart_port.
  *
  * The Serial Mux does not support this function.
@@ -155,7 +155,7 @@ static void mux_start_tx(struct uart_port *port)
 }
 
 /**
- * mux_stop_rx - Stop receiving characters.
+ * mux_stop_rx() - Stop receiving characters.
  * @port: Ptr to the uart_port.
  *
  * The Serial Mux does not support this function.
@@ -165,7 +165,7 @@ static void mux_stop_rx(struct uart_port *port)
 }
 
 /**
- * mux_break_ctl - Control the transmitssion of a break signal.
+ * mux_break_ctl() - Control the transmitssion of a break signal.
  * @port: Ptr to the uart_port.
  * @break_state: Raise/Lower the break signal.
  *
@@ -176,7 +176,7 @@ static void mux_break_ctl(struct uart_port *port, int break_state)
 }
 
 /**
- * mux_write - Write chars to the mux fifo.
+ * mux_write() - Write chars to the mux fifo.
  * @port: Ptr to the uart_port.
  *
  * This function writes all the data from the uart buffer to
@@ -220,7 +220,7 @@ static void mux_write(struct uart_port *port)
 }
 
 /**
- * mux_read - Read chars from the mux fifo.
+ * mux_read() - Read chars from the mux fifo.
  * @port: Ptr to the uart_port.
  *
  * This reads all available data from the mux's fifo and pushes
@@ -260,7 +260,7 @@ static void mux_read(struct uart_port *port)
 }
 
 /**
- * mux_startup - Initialize the port.
+ * mux_startup() - Initialize the port.
  * @port: Ptr to the uart_port.
  *
  * Grab any resources needed for this port and start the
@@ -273,7 +273,7 @@ static int mux_startup(struct uart_port *port)
 }
 
 /**
- * mux_shutdown - Disable the port.
+ * mux_shutdown() - Disable the port.
  * @port: Ptr to the uart_port.
  *
  * Release any resources needed for the port.
@@ -284,7 +284,7 @@ static void mux_shutdown(struct uart_port *port)
 }
 
 /**
- * mux_set_termios - Chane port parameters.
+ * mux_set_termios() - Chane port parameters.
  * @port: Ptr to the uart_port.
  * @termios: new termios settings.
  * @old: old termios settings.
@@ -298,7 +298,7 @@ mux_set_termios(struct uart_port *port, struct ktermios *termios,
 }
 
 /**
- * mux_type - Describe the port.
+ * mux_type() - Describe the port.
  * @port: Ptr to the uart_port.
  *
  * Return a pointer to a string constant describing the
@@ -310,7 +310,7 @@ static const char *mux_type(struct uart_port *port)
 }
 
 /**
- * mux_release_port - Release memory and IO regions.
+ * mux_release_port() - Release memory and IO regions.
  * @port: Ptr to the uart_port.
  *
  * Release any memory and IO region resources currently in use by
@@ -321,7 +321,7 @@ static void mux_release_port(struct uart_port *port)
 }
 
 /**
- * mux_request_port - Request memory and IO regions.
+ * mux_request_port() - Request memory and IO regions.
  * @port: Ptr to the uart_port.
  *
  * Request any memory and IO region resources required by the port.
@@ -334,7 +334,7 @@ static int mux_request_port(struct uart_port *port)
 }
 
 /**
- * mux_config_port - Perform port autoconfiguration.
+ * mux_config_port() - Perform port autoconfiguration.
  * @port: Ptr to the uart_port.
  * @type: Bitmask of required configurations.
  *
@@ -350,7 +350,7 @@ static void mux_config_port(struct uart_port *port, int type)
 }
 
 /**
- * mux_verify_port - Verify the port information.
+ * mux_verify_port() - Verify the port information.
  * @port: Ptr to the uart_port.
  * @ser: Ptr to the serial information.
  *
@@ -366,7 +366,7 @@ static int mux_verify_port(struct uart_port *port, struct serial_struct *ser)
 }
 
 /**
- * mux_drv_poll - Mux poll function.
+ * mux_drv_poll() - Mux poll function.
  * @unused: Unused variable
  *
  * This function periodically polls the Serial MUX to check for new data.
@@ -442,7 +442,7 @@ static const struct uart_ops mux_pops = {
 };
 
 /**
- * mux_probe - Determine if the Serial Mux should claim this device.
+ * mux_probe() - Determine if the Serial Mux should claim this device.
  * @dev: The parisc device.
  *
  * Deterimine if the Serial Mux should claim this chip (return 0)
@@ -561,7 +561,7 @@ static struct parisc_driver serial_mux_driver __refdata = {
 };
 
 /**
- * mux_init - Serial MUX initialization procedure.
+ * mux_init() - Serial MUX initialization procedure.
  *
  * Register the Serial MUX driver.
  */
@@ -584,7 +584,7 @@ static int __init mux_init(void)
 }
 
 /**
- * mux_exit - Serial MUX cleanup procedure.
+ * mux_exit() - Serial MUX cleanup procedure.
  *
  * Unregister the Serial MUX driver from the tty layer.
  */
diff --git a/drivers/tty/serial/serial-tegra.c b/drivers/tty/serial/serial-tegra.c
index af2a29cfbbe9..872f3b2ed196 100644
--- a/drivers/tty/serial/serial-tegra.c
+++ b/drivers/tty/serial/serial-tegra.c
@@ -219,7 +219,7 @@ static void tegra_uart_break_ctl(struct uart_port *u, int break_ctl)
 }
 
 /**
- * tegra_uart_wait_cycle_time: Wait for N UART clock periods
+ * tegra_uart_wait_cycle_time() - Wait for N UART clock periods
  *
  * @tup:	Tegra serial port data structure.
  * @cycles:	Number of clock periods to wait.
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
index 70402cdb4d8c..2d28afaf67e4 100644
--- a/drivers/tty/serial/serial_core.c
+++ b/drivers/tty/serial/serial_core.c
@@ -309,13 +309,13 @@ static void uart_shutdown(struct tty_struct *tty, struct uart_state *state)
 }
 
 /**
- *	uart_update_timeout - update per-port FIFO timeout.
- *	@port:  uart_port structure describing the port
- *	@cflag: termios cflag value
- *	@baud:  speed of the port
+ * uart_update_timeout() - update per-port FIFO timeout.
+ * @port: uart_port structure describing the port
+ * @cflag: termios cflag value
+ * @baud: speed of the port
  *
- *	Set the port FIFO timeout value.  The @cflag value should
- *	reflect the actual hardware settings.
+ * Set the port FIFO timeout value.  The @cflag value should
+ * reflect the actual hardware settings.
  */
 void
 uart_update_timeout(struct uart_port *port, unsigned int cflag,
@@ -359,23 +359,23 @@ uart_update_timeout(struct uart_port *port, unsigned int cflag,
 EXPORT_SYMBOL(uart_update_timeout);
 
 /**
- *	uart_get_baud_rate - return baud rate for a particular port
- *	@port: uart_port structure describing the port in question.
- *	@termios: desired termios settings.
- *	@old: old termios (or NULL)
- *	@min: minimum acceptable baud rate
- *	@max: maximum acceptable baud rate
+ * uart_get_baud_rate() - return baud rate for a particular port
+ * @port: uart_port structure describing the port in question.
+ * @termios: desired termios settings.
+ * @old: old termios (or NULL)
+ * @min: minimum acceptable baud rate
+ * @max: maximum acceptable baud rate
  *
- *	Decode the termios structure into a numeric baud rate,
- *	taking account of the magic 38400 baud rate (with spd_*
- *	flags), and mapping the %B0 rate to 9600 baud.
+ * Decode the termios structure into a numeric baud rate,
+ * taking account of the magic 38400 baud rate (with spd_*
+ * flags), and mapping the %B0 rate to 9600 baud.
  *
- *	If the new baud rate is invalid, try the old termios setting.
- *	If it's still invalid, we try 9600 baud.
+ * If the new baud rate is invalid, try the old termios setting.
+ * If it's still invalid, we try 9600 baud.
  *
- *	Update the @termios structure to reflect the baud rate
- *	we're actually going to be using. Don't do this for the case
- *	where B0 is requested ("hang up").
+ * Update the @termios structure to reflect the baud rate
+ * we're actually going to be using. Don't do this for the case
+ * where B0 is requested ("hang up").
  */
 unsigned int
 uart_get_baud_rate(struct uart_port *port, struct ktermios *termios,
@@ -461,11 +461,11 @@ uart_get_baud_rate(struct uart_port *port, struct ktermios *termios,
 EXPORT_SYMBOL(uart_get_baud_rate);
 
 /**
- *	uart_get_divisor - return uart clock divisor
- *	@port: uart_port structure describing the port.
- *	@baud: desired baud rate
+ * uart_get_divisor() - return uart clock divisor
+ * @port: uart_port structure describing the port.
+ * @baud: desired baud rate
  *
- *	Calculate the uart clock divisor for the port.
+ * Calculate the uart clock divisor for the port.
  */
 unsigned int
 uart_get_divisor(struct uart_port *port, unsigned int baud)
@@ -1014,10 +1014,10 @@ static int uart_set_info_user(struct tty_struct *tty, struct uart_state *state,
 }
 
 /**
- *	uart_get_lsr_info	-	get line status register info
- *	@tty: tty associated with the UART
- *	@state: UART being queried
- *	@value: returned modem value
+ * uart_get_lsr_info() - get line status register info
+ * @tty: tty associated with the UART
+ * @state: UART being queried
+ * @value: returned modem value
  */
 static int uart_get_lsr_info(struct tty_struct *tty,
 			struct uart_state *state, unsigned int __user *value)
@@ -1900,11 +1900,11 @@ static int uart_proc_show(struct seq_file *m, void *v)
 
 #if defined(CONFIG_SERIAL_CORE_CONSOLE) || defined(CONFIG_CONSOLE_POLL)
 /**
- *	uart_console_write - write a console message to a serial port
- *	@port: the port to write the message
- *	@s: array of characters
- *	@count: number of characters in string to write
- *	@putchar: function to write character to port
+ * uart_console_write() - write a console message to a serial port
+ * @port: the port to write the message
+ * @s: array of characters
+ * @count: number of characters in string to write
+ * @putchar: function to write character to port
  */
 void uart_console_write(struct uart_port *port, const char *s,
 			unsigned int count,
@@ -1943,22 +1943,22 @@ uart_get_console(struct uart_port *ports, int nr, struct console *co)
 }
 
 /**
- *	uart_parse_earlycon - Parse earlycon options
- *	@p:	  ptr to 2nd field (ie., just beyond '<name>,')
- *	@iotype:  ptr for decoded iotype (out)
- *	@addr:    ptr for decoded mapbase/iobase (out)
- *	@options: ptr for <options> field; NULL if not present (out)
+ * uart_parse_earlycon() - Parse earlycon options
+ * @p: ptr to 2nd field (ie., just beyond '<name>,')
+ * @iotype: ptr for decoded iotype (out)
+ * @addr: ptr for decoded mapbase/iobase (out)
+ * @options: ptr for <options> field; NULL if not present (out)
  *
- *	Decodes earlycon kernel command line parameters of the form
- *	   earlycon=<name>,io|mmio|mmio16|mmio32|mmio32be|mmio32native,<addr>,<options>
- *	   console=<name>,io|mmio|mmio16|mmio32|mmio32be|mmio32native,<addr>,<options>
+ * Decodes earlycon kernel command line parameters of the form
+ *    earlycon=<name>,io|mmio|mmio16|mmio32|mmio32be|mmio32native,<addr>,<options>
+ *    console=<name>,io|mmio|mmio16|mmio32|mmio32be|mmio32native,<addr>,<options>
  *
- *	The optional form
- *	   earlycon=<name>,0x<addr>,<options>
- *	   console=<name>,0x<addr>,<options>
- *	is also accepted; the returned @iotype will be UPIO_MEM.
+ * The optional form
+ *    earlycon=<name>,0x<addr>,<options>
+ *    console=<name>,0x<addr>,<options>
+ * is also accepted; the returned @iotype will be UPIO_MEM.
  *
- *	Returns 0 on success or -EINVAL on failure
+ * Returns 0 on success or -EINVAL on failure
  */
 int uart_parse_earlycon(char *p, unsigned char *iotype, resource_size_t *addr,
 			char **options)
@@ -2003,16 +2003,16 @@ int uart_parse_earlycon(char *p, unsigned char *iotype, resource_size_t *addr,
 EXPORT_SYMBOL_GPL(uart_parse_earlycon);
 
 /**
- *	uart_parse_options - Parse serial port baud/parity/bits/flow control.
- *	@options: pointer to option string
- *	@baud: pointer to an 'int' variable for the baud rate.
- *	@parity: pointer to an 'int' variable for the parity.
- *	@bits: pointer to an 'int' variable for the number of data bits.
- *	@flow: pointer to an 'int' variable for the flow control character.
+ * uart_parse_options() - Parse serial port baud/parity/bits/flow control.
+ * @options: pointer to option string
+ * @baud: pointer to an 'int' variable for the baud rate.
+ * @parity: pointer to an 'int' variable for the parity.
+ * @bits: pointer to an 'int' variable for the number of data bits.
+ * @flow: pointer to an 'int' variable for the flow control character.
  *
- *	uart_parse_options decodes a string containing the serial console
- *	options.  The format of the string is <baud><parity><bits><flow>,
- *	eg: 115200n8r
+ * uart_parse_options decodes a string containing the serial console
+ * options.  The format of the string is <baud><parity><bits><flow>,
+ * eg: 115200n8r
  */
 void
 uart_parse_options(const char *options, int *baud, int *parity,
@@ -2033,13 +2033,13 @@ uart_parse_options(const char *options, int *baud, int *parity,
 EXPORT_SYMBOL_GPL(uart_parse_options);
 
 /**
- *	uart_set_options - setup the serial console parameters
- *	@port: pointer to the serial ports uart_port structure
- *	@co: console pointer
- *	@baud: baud rate
- *	@parity: parity character - 'n' (none), 'o' (odd), 'e' (even)
- *	@bits: number of data bits
- *	@flow: flow control character - 'r' (rts)
+ * uart_set_options() - setup the serial console parameters
+ * @port: pointer to the serial ports uart_port structure
+ * @co: console pointer
+ * @baud: baud rate
+ * @parity: parity character - 'n' (none), 'o' (odd), 'e' (even)
+ * @bits: number of data bits
+ * @flow: flow control character - 'r' (rts)
  */
 int
 uart_set_options(struct uart_port *port, struct console *co,
@@ -2101,7 +2101,7 @@ EXPORT_SYMBOL_GPL(uart_set_options);
 #endif /* CONFIG_SERIAL_CORE_CONSOLE */
 
 /**
- * uart_change_pm - set power state of the port
+ * uart_change_pm() - set power state of the port
  *
  * @state: port descriptor
  * @pm_state: new state
@@ -2489,17 +2489,17 @@ static const struct tty_port_operations uart_port_ops = {
 };
 
 /**
- *	uart_register_driver - register a driver with the uart core layer
- *	@drv: low level driver structure
+ * uart_register_driver() - register a driver with the uart core layer
+ * @drv: low level driver structure
  *
- *	Register a uart driver with the core driver.  We in turn register
- *	with the tty layer, and initialise the core driver per-port state.
+ * Register a uart driver with the core driver.  We in turn register
+ * with the tty layer, and initialise the core driver per-port state.
  *
- *	We have a proc file in /proc/tty/driver which is named after the
- *	normal driver.
+ * We have a proc file in /proc/tty/driver which is named after the
+ * normal driver.
  *
- *	drv->port should be NULL, and the per-port structures should be
- *	registered using uart_add_one_port after this call has succeeded.
+ * drv->port should be NULL, and the per-port structures should be
+ * registered using uart_add_one_port after this call has succeeded.
  */
 int uart_register_driver(struct uart_driver *drv)
 {
@@ -2560,13 +2560,13 @@ int uart_register_driver(struct uart_driver *drv)
 }
 
 /**
- *	uart_unregister_driver - remove a driver from the uart core layer
- *	@drv: low level driver structure
+ * uart_unregister_driver() - remove a driver from the uart core layer
+ * @drv: low level driver structure
  *
- *	Remove all references to a driver from the core driver.  The low
- *	level driver must have removed all its ports via the
- *	uart_remove_one_port() if it registered them with uart_add_one_port().
- *	(ie, drv->port == NULL)
+ * Remove all references to a driver from the core driver.  The low
+ * level driver must have removed all its ports via the
+ * uart_remove_one_port() if it registered them with uart_add_one_port().
+ * (ie, drv->port == NULL)
  */
 void uart_unregister_driver(struct uart_driver *drv)
 {
@@ -2760,14 +2760,14 @@ static const struct attribute_group tty_dev_attr_group = {
 	};
 
 /**
- *	uart_add_one_port - attach a driver-defined port structure
- *	@drv: pointer to the uart low level driver structure for this port
- *	@uport: uart port structure to use for this port.
+ * uart_add_one_port() - attach a driver-defined port structure
+ * @drv: pointer to the uart low level driver structure for this port
+ * @uport: uart port structure to use for this port.
  *
- *	This allows the driver to register its own uart_port structure
- *	with the core driver.  The main purpose is to allow the low
- *	level uart drivers to expand uart_port, rather than having yet
- *	more levels of structures.
+ * This allows the driver to register its own uart_port structure
+ * with the core driver.  The main purpose is to allow the low
+ * level uart drivers to expand uart_port, rather than having yet
+ * more levels of structures.
  */
 int uart_add_one_port(struct uart_driver *drv, struct uart_port *uport)
 {
@@ -2863,13 +2863,13 @@ int uart_add_one_port(struct uart_driver *drv, struct uart_port *uport)
 }
 
 /**
- *	uart_remove_one_port - detach a driver defined port structure
- *	@drv: pointer to the uart low level driver structure for this port
- *	@uport: uart port structure for this port
+ * uart_remove_one_port() - detach a driver defined port structure
+ * @drv: pointer to the uart low level driver structure for this port
+ * @uport: uart port structure for this port
  *
- *	This unhooks (and hangs up) the specified port structure from the
- *	core driver.  No further calls will be made to the low-level code
- *	for this port.
+ * This unhooks (and hangs up) the specified port structure from the
+ * core driver.  No further calls will be made to the low-level code
+ * for this port.
  */
 int uart_remove_one_port(struct uart_driver *drv, struct uart_port *uport)
 {
@@ -2969,11 +2969,11 @@ int uart_match_port(struct uart_port *port1, struct uart_port *port2)
 EXPORT_SYMBOL(uart_match_port);
 
 /**
- *	uart_handle_dcd_change - handle a change of carrier detect state
- *	@uport: uart_port structure for the open port
- *	@status: new carrier detect status, nonzero if active
+ * uart_handle_dcd_change() - handle a change of carrier detect state
+ * @uport: uart_port structure for the open port
+ * @status: new carrier detect status, nonzero if active
  *
- *	Caller must hold uport->lock
+ * Caller must hold uport->lock
  */
 void uart_handle_dcd_change(struct uart_port *uport, unsigned int status)
 {
@@ -3004,11 +3004,11 @@ void uart_handle_dcd_change(struct uart_port *uport, unsigned int status)
 EXPORT_SYMBOL_GPL(uart_handle_dcd_change);
 
 /**
- *	uart_handle_cts_change - handle a change of clear-to-send state
- *	@uport: uart_port structure for the open port
- *	@status: new clear to send status, nonzero if active
+ * uart_handle_cts_change() - handle a change of clear-to-send state
+ * @uport: uart_port structure for the open port
+ * @status: new clear to send status, nonzero if active
  *
- *	Caller must hold uport->lock
+ * Caller must hold uport->lock
  */
 void uart_handle_cts_change(struct uart_port *uport, unsigned int status)
 {
@@ -3035,7 +3035,7 @@ void uart_handle_cts_change(struct uart_port *uport, unsigned int status)
 EXPORT_SYMBOL_GPL(uart_handle_cts_change);
 
 /**
- * uart_insert_char - push a char to the uart layer
+ * uart_insert_char() - push a char to the uart layer
  *
  * User is responsible to call tty_flip_buffer_push when they are done with
  * insertion.
diff --git a/drivers/tty/serial/serial_txx9.c b/drivers/tty/serial/serial_txx9.c
index 33c630d0f1b2..b6b17d5005f6 100644
--- a/drivers/tty/serial/serial_txx9.c
+++ b/drivers/tty/serial/serial_txx9.c
@@ -1004,15 +1004,15 @@ int __init early_serial_txx9_setup(struct uart_port *port)
 static DEFINE_MUTEX(serial_txx9_mutex);
 
 /**
- *	serial_txx9_register_port - register a serial port
- *	@port: serial port template
+ * serial_txx9_register_port() - register a serial port
+ * @port: serial port template
  *
- *	Configure the serial port specified by the request.
+ * Configure the serial port specified by the request.
  *
- *	The port is then probed and if necessary the IRQ is autodetected
- *	If this fails an error is returned.
+ * The port is then probed and if necessary the IRQ is autodetected
+ * If this fails an error is returned.
  *
- *	On success the port is ready to use and the line number is returned.
+ * On success the port is ready to use and the line number is returned.
  */
 static int serial_txx9_register_port(struct uart_port *port)
 {
@@ -1056,11 +1056,11 @@ static int serial_txx9_register_port(struct uart_port *port)
 }
 
 /**
- *	serial_txx9_unregister_port - remove a txx9 serial port at runtime
- *	@line: serial line number
+ * serial_txx9_unregister_port() - remove a txx9 serial port at runtime
+ * @line: serial line number
  *
- *	Remove one serial port.  This may not be called from interrupt
- *	context.  We hand the port back to the our control.
+ * Remove one serial port.  This may not be called from interrupt
+ * context.  We hand the port back to the our control.
  */
 static void serial_txx9_unregister_port(int line)
 {
diff --git a/drivers/tty/serial/sn_console.c b/drivers/tty/serial/sn_console.c
index 457a062fffd8..2c01168319db 100644
--- a/drivers/tty/serial/sn_console.c
+++ b/drivers/tty/serial/sn_console.c
@@ -141,7 +141,7 @@ static struct sn_sal_ops intr_ops = {
 /* routines for running the console in polling mode */
 
 /**
- * snt_poll_getc - Get a character from the console in polling mode
+ * snt_poll_getc() - Get a character from the console in polling mode
  *
  */
 static int snt_poll_getc(void)
@@ -153,7 +153,7 @@ static int snt_poll_getc(void)
 }
 
 /**
- * snt_poll_input_pending - Check if any input is waiting - polling mode.
+ * snt_poll_input_pending() - Check if any input is waiting - polling mode.
  *
  */
 static int snt_poll_input_pending(void)
@@ -167,7 +167,7 @@ static int snt_poll_input_pending(void)
 /* routines for an interrupt driven console (normal) */
 
 /**
- * snt_intr_getc - Get a character from the console, interrupt mode
+ * snt_intr_getc() - Get a character from the console, interrupt mode
  *
  */
 static int snt_intr_getc(void)
@@ -176,7 +176,7 @@ static int snt_intr_getc(void)
 }
 
 /**
- * snt_intr_input_pending - Check if input is pending, interrupt mode
+ * snt_intr_input_pending() - Check if input is pending, interrupt mode
  *
  */
 static int snt_intr_input_pending(void)
@@ -187,7 +187,7 @@ static int snt_intr_input_pending(void)
 /* these functions are polled and interrupt */
 
 /**
- * snt_hw_puts_raw - Send raw string to the console, polled or interrupt mode
+ * snt_hw_puts_raw() - Send raw string to the console, polled or interrupt mode
  * @s: String
  * @len: Length
  *
@@ -199,7 +199,7 @@ static int snt_hw_puts_raw(const char *s, int len)
 }
 
 /**
- * snt_hw_puts_buffered - Send string to console, polled or interrupt mode
+ * snt_hw_puts_buffered() - Send string to console, polled or interrupt mode
  * @s: String
  * @len: Length
  *
@@ -218,7 +218,7 @@ static int snt_hw_puts_buffered(const char *s, int len)
  */
 
 /**
- * snp_type - What type of console are we?
+ * snp_type() - What type of console are we?
  * @port: Port to operate with (we ignore since we only have one port)
  *
  */
@@ -228,7 +228,7 @@ static const char *snp_type(struct uart_port *port)
 }
 
 /**
- * snp_tx_empty - Is the transmitter empty?  We pretend we're always empty
+ * snp_tx_empty() - Is the transmitter empty?  We pretend we're always empty
  * @port: Port to operate on (we ignore since we only have one port)
  *
  */
@@ -238,7 +238,7 @@ static unsigned int snp_tx_empty(struct uart_port *port)
 }
 
 /**
- * snp_stop_tx - stop the transmitter - no-op for us
+ * snp_stop_tx() - stop the transmitter - no-op for us
  * @port: Port to operat eon - we ignore - no-op function
  *
  */
@@ -247,7 +247,7 @@ static void snp_stop_tx(struct uart_port *port)
 }
 
 /**
- * snp_release_port - Free i/o and resources for port - no-op for us
+ * snp_release_port() - Free i/o and resources for port - no-op for us
  * @port: Port to operate on - we ignore - no-op function
  *
  */
@@ -256,7 +256,7 @@ static void snp_release_port(struct uart_port *port)
 }
 
 /**
- * snp_shutdown - shut down the port - free irq and disable - no-op for us
+ * snp_shutdown() - shut down the port - free irq and disable - no-op for us
  * @port: Port to shut down - we ignore
  *
  */
@@ -265,7 +265,7 @@ static void snp_shutdown(struct uart_port *port)
 }
 
 /**
- * snp_set_mctrl - set control lines (dtr, rts, etc) - no-op for our console
+ * snp_set_mctrl() - set control lines (dtr, rts, etc) - no-op for our console
  * @port: Port to operate on - we ignore
  * @mctrl: Lines to set/unset - we ignore
  *
@@ -275,7 +275,7 @@ static void snp_set_mctrl(struct uart_port *port, unsigned int mctrl)
 }
 
 /**
- * snp_get_mctrl - get contorl line info, we just return a static value
+ * snp_get_mctrl() - get contorl line info, we just return a static value
  * @port: port to operate on - we only have one port so we ignore this
  *
  */
@@ -285,7 +285,7 @@ static unsigned int snp_get_mctrl(struct uart_port *port)
 }
 
 /**
- * snp_stop_rx - Stop the receiver - we ignor ethis
+ * snp_stop_rx() - Stop the receiver - we ignor ethis
  * @port: Port to operate on - we ignore
  *
  */
@@ -294,7 +294,7 @@ static void snp_stop_rx(struct uart_port *port)
 }
 
 /**
- * snp_start_tx - Start transmitter
+ * snp_start_tx() - Start transmitter
  * @port: Port to operate on
  *
  */
@@ -317,7 +317,7 @@ static void snp_break_ctl(struct uart_port *port, int break_state)
 }
 
 /**
- * snp_startup - Start up the serial port - always return 0 (We're always on)
+ * snp_startup() - Start up the serial port - always return 0 (We're always on)
  * @port: Port to operate on
  *
  */
@@ -327,7 +327,7 @@ static int snp_startup(struct uart_port *port)
 }
 
 /**
- * snp_set_termios - set termios stuff - we ignore these
+ * snp_set_termios() - set termios stuff - we ignore these
  * @port: port to operate on
  * @termios: New settings
  * @termios: Old
@@ -340,7 +340,7 @@ snp_set_termios(struct uart_port *port, struct ktermios *termios,
 }
 
 /**
- * snp_request_port - allocate resources for port - ignored by us
+ * snp_request_port() - allocate resources for port - ignored by us
  * @port: port to operate on
  *
  */
@@ -350,7 +350,7 @@ static int snp_request_port(struct uart_port *port)
 }
 
 /**
- * snp_config_port - allocate resources, set up - we ignore,  we're always on
+ * snp_config_port() - allocate resources, set up - we ignore,  we're always on
  * @port: Port to operate on
  * @flags: flags used for port setup
  *
@@ -385,7 +385,7 @@ static const struct uart_ops sn_console_ops = {
 #ifdef DEBUG
 
 /**
- * sn_debug_printf - close to hardware debugging printf
+ * sn_debug_printf() - close to hardware debugging printf
  * @fmt: printf format
  *
  * This is as "close to the metal" as we can get, used when the driver
@@ -417,7 +417,7 @@ static int sn_debug_printf(const char *fmt, ...)
  */
 
 /**
- * sn_receive_chars - Grab characters, pass them to tty layer
+ * sn_receive_chars() - Grab characters, pass them to tty layer
  * @port: Port to operate on
  * @flags: irq flags
  *
@@ -495,7 +495,7 @@ sn_receive_chars(struct sn_cons_port *port, unsigned long flags)
 }
 
 /**
- * sn_transmit_chars - grab characters from serial core, send off
+ * sn_transmit_chars() - grab characters from serial core, send off
  * @port: Port to operate on
  * @raw: Transmit raw or buffered
  *
@@ -578,7 +578,7 @@ static void sn_transmit_chars(struct sn_cons_port *port, int raw)
 }
 
 /**
- * sn_sal_interrupt - Handle console interrupts
+ * sn_sal_interrupt() - Handle console interrupts
  * @irq: irq #, useful for debug statements
  * @dev_id: our pointer to our port (sn_cons_port which contains the uart port)
  *
@@ -604,7 +604,7 @@ static irqreturn_t sn_sal_interrupt(int irq, void *dev_id)
 }
 
 /**
- * sn_sal_timer_poll - this function handles polled console mode
+ * sn_sal_timer_poll() - this function handles polled console mode
  * @data: A pointer to our sn_cons_port (which contains the uart port)
  *
  * data is the pointer that init_timer will store for us.  This function is
@@ -636,7 +636,7 @@ static void sn_sal_timer_poll(struct timer_list *t)
  */
 
 /**
- * sn_sal_switch_to_asynch - Switch to async mode (as opposed to synch)
+ * sn_sal_switch_to_asynch() - Switch to async mode (as opposed to synch)
  * @port: Our sn_cons_port (which contains the uart port)
  *
  * So this is used by sn_sal_serial_console_init (early on, before we're
@@ -685,7 +685,7 @@ static void __init sn_sal_switch_to_asynch(struct sn_cons_port *port)
 }
 
 /**
- * sn_sal_switch_to_interrupts - Switch to interrupt driven mode
+ * sn_sal_switch_to_interrupts() - Switch to interrupt driven mode
  * @port: Our sn_cons_port (which contains the uart port)
  *
  * In sn_sal_init, after we're registered with serial core and
@@ -752,7 +752,7 @@ static struct uart_driver sal_console_uart = {
 };
 
 /**
- * sn_sal_init - When the kernel loads us, get us rolling w/ serial core
+ * sn_sal_init() - When the kernel loads us, get us rolling w/ serial core
  *
  * Before this is called, we've been printing kernel messages in a special
  * early mode not making use of the serial core infrastructure.  When our
@@ -826,7 +826,7 @@ static int __init sn_sal_init(void)
 device_initcall(sn_sal_init);
 
 /**
- * puts_raw_fixed - sn_sal_console_write helper for adding \r's as required
+ * puts_raw_fixed() - sn_sal_console_write helper for adding \r's as required
  * @puts_raw : puts function to do the writing
  * @s: input string
  * @count: length
@@ -852,7 +852,7 @@ static void puts_raw_fixed(int (*puts_raw) (const char *s, int len),
 }
 
 /**
- * sn_sal_console_write - Print statements before serial core available
+ * sn_sal_console_write() - Print statements before serial core available
  * @console: Console to operate on - we ignore since we have just one
  * @s: String to send
  * @count: length
@@ -945,7 +945,7 @@ sn_sal_console_write(struct console *co, const char *s, unsigned count)
 
 
 /**
- * sn_sal_console_setup - Set up console for early printing
+ * sn_sal_console_setup() - Set up console for early printing
  * @co: Console to work with
  * @options: Options to set
  *
@@ -962,7 +962,7 @@ static int sn_sal_console_setup(struct console *co, char *options)
 }
 
 /**
- * sn_sal_console_write_early - simple early output routine
+ * sn_sal_console_write_early() - simple early output routine
  * @co - console struct
  * @s - string to print
  * @count - count
@@ -988,7 +988,7 @@ static struct console sal_console_early __initdata = {
 };
 
 /**
- * sn_serial_console_early_setup - Sets up early console output support
+ * sn_serial_console_early_setup() - Sets up early console output support
  *
  * Register a console early on...  This is for output before even
  * sn_sal_serial_cosnole_init is called.  This function is called from
@@ -1010,7 +1010,7 @@ int __init sn_serial_console_early_setup(void)
 }
 
 /**
- * sn_sal_serial_console_init - Early console output - set up for register
+ * sn_sal_serial_console_init() - Early console output - set up for register
  *
  * This function is called when regular console init happens.  Because we
  * support even earlier console output with sn_serial_console_early_setup
diff --git a/drivers/tty/serial/uartlite.c b/drivers/tty/serial/uartlite.c
index f0344adc86db..94a91748da40 100644
--- a/drivers/tty/serial/uartlite.c
+++ b/drivers/tty/serial/uartlite.c
@@ -603,7 +603,8 @@ static struct uart_driver ulite_uart_driver = {
  * Port assignment functions (mapping devices to uart_port structures)
  */
 
-/** ulite_assign: register a uartlite device with the driver
+/**
+ * ulite_assign() - register a uartlite device with the driver
  *
  * @dev: pointer to device structure
  * @id: requested id number.  Pass -1 for automatic port assignment
@@ -684,7 +685,8 @@ static int ulite_assign(struct device *dev, int id, u32 base, int irq,
 	return 0;
 }
 
-/** ulite_release: register a uartlite device with the driver
+/**
+ * ulite_release() - register a uartlite device with the driver
  *
  * @dev: pointer to device structure
  */
@@ -703,7 +705,7 @@ static int ulite_release(struct device *dev)
 }
 
 /**
- * ulite_suspend - Stop the device.
+ * ulite_suspend() - Stop the device.
  *
  * @dev: handle to the device structure.
  * Return: 0 always.
@@ -719,7 +721,7 @@ static int __maybe_unused ulite_suspend(struct device *dev)
 }
 
 /**
- * ulite_resume - Resume the device.
+ * ulite_resume() - Resume the device.
  *
  * @dev: handle to the device structure.
  * Return: 0 on success, errno otherwise.
diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c
index c3f6cce300aa..5ed85c49bbce 100644
--- a/drivers/tty/serial/xilinx_uartps.c
+++ b/drivers/tty/serial/xilinx_uartps.c
@@ -201,7 +201,7 @@ struct cdns_platform_data {
 		clk_rate_change_nb);
 
 /**
- * cdns_uart_handle_rx - Handle the received bytes along with Rx errors.
+ * cdns_uart_handle_rx() - Handle the received bytes along with Rx errors.
  * @dev_id: Id of the UART port
  * @isrstatus: The interrupt status register value as read
  * Return: None
@@ -297,7 +297,7 @@ static void cdns_uart_handle_rx(void *dev_id, unsigned int isrstatus)
 }
 
 /**
- * cdns_uart_handle_tx - Handle the bytes to be Txed.
+ * cdns_uart_handle_tx() - Handle the bytes to be Txed.
  * @dev_id: Id of the UART port
  * Return: None
  */
@@ -341,7 +341,7 @@ static void cdns_uart_handle_tx(void *dev_id)
 }
 
 /**
- * cdns_uart_isr - Interrupt handler
+ * cdns_uart_isr() - Interrupt handler
  * @irq: Irq number
  * @dev_id: Id of the port
  *
@@ -372,7 +372,7 @@ static irqreturn_t cdns_uart_isr(int irq, void *dev_id)
 }
 
 /**
- * cdns_uart_calc_baud_divs - Calculate baud rate divisors
+ * cdns_uart_calc_baud_divs() - Calculate baud rate divisors
  * @clk: UART module input clock
  * @baud: Desired baud rate
  * @rbdiv: BDIV value (return value)
@@ -434,7 +434,7 @@ static unsigned int cdns_uart_calc_baud_divs(unsigned int clk,
 }
 
 /**
- * cdns_uart_set_baud_rate - Calculate and set the baud rate
+ * cdns_uart_set_baud_rate() - Calculate and set the baud rate
  * @port: Handle to the uart port structure
  * @baud: Baud rate to set
  * Return: baud rate, requested baud when possible, or actual baud when there
@@ -468,7 +468,7 @@ static unsigned int cdns_uart_set_baud_rate(struct uart_port *port,
 
 #ifdef CONFIG_COMMON_CLK
 /**
- * cdns_uart_clk_notitifer_cb - Clock notifier callback
+ * cdns_uart_clk_notitifer_cb() - Clock notifier callback
  * @nb:		Notifier block
  * @event:	Notify event
  * @data:	Notifier data
@@ -563,7 +563,7 @@ static int cdns_uart_clk_notifier_cb(struct notifier_block *nb,
 #endif
 
 /**
- * cdns_uart_start_tx -  Start transmitting bytes
+ * cdns_uart_start_tx() -  Start transmitting bytes
  * @port: Handle to the uart port structure
  */
 static void cdns_uart_start_tx(struct uart_port *port)
@@ -593,7 +593,7 @@ static void cdns_uart_start_tx(struct uart_port *port)
 }
 
 /**
- * cdns_uart_stop_tx - Stop TX
+ * cdns_uart_stop_tx() - Stop TX
  * @port: Handle to the uart port structure
  */
 static void cdns_uart_stop_tx(struct uart_port *port)
@@ -607,7 +607,7 @@ static void cdns_uart_stop_tx(struct uart_port *port)
 }
 
 /**
- * cdns_uart_stop_rx - Stop RX
+ * cdns_uart_stop_rx() - Stop RX
  * @port: Handle to the uart port structure
  */
 static void cdns_uart_stop_rx(struct uart_port *port)
@@ -624,7 +624,7 @@ static void cdns_uart_stop_rx(struct uart_port *port)
 }
 
 /**
- * cdns_uart_tx_empty -  Check whether TX is empty
+ * cdns_uart_tx_empty() -  Check whether TX is empty
  * @port: Handle to the uart port structure
  *
  * Return: TIOCSER_TEMT on success, 0 otherwise
@@ -639,7 +639,7 @@ static unsigned int cdns_uart_tx_empty(struct uart_port *port)
 }
 
 /**
- * cdns_uart_break_ctl - Based on the input ctl we have to start or stop
+ * cdns_uart_break_ctl() - Based on the input ctl we have to start or stop
  *			transmitting char breaks
  * @port: Handle to the uart port structure
  * @ctl: Value based on which start or stop decision is taken
@@ -665,7 +665,7 @@ static void cdns_uart_break_ctl(struct uart_port *port, int ctl)
 }
 
 /**
- * cdns_uart_set_termios - termios operations, handling data length, parity,
+ * cdns_uart_set_termios() - termios operations, handling data length, parity,
  *				stop bits, flow control, baud rate
  * @port: Handle to the uart port structure
  * @termios: Handle to the input termios structure
@@ -796,7 +796,7 @@ static void cdns_uart_set_termios(struct uart_port *port,
 }
 
 /**
- * cdns_uart_startup - Called when an application opens a cdns_uart port
+ * cdns_uart_startup() - Called when an application opens a cdns_uart port
  * @port: Handle to the uart port structure
  *
  * Return: 0 on success, negative errno otherwise
@@ -879,7 +879,7 @@ static int cdns_uart_startup(struct uart_port *port)
 }
 
 /**
- * cdns_uart_shutdown - Called when an application closes a cdns_uart port
+ * cdns_uart_shutdown() - Called when an application closes a cdns_uart port
  * @port: Handle to the uart port structure
  */
 static void cdns_uart_shutdown(struct uart_port *port)
@@ -904,7 +904,7 @@ static void cdns_uart_shutdown(struct uart_port *port)
 }
 
 /**
- * cdns_uart_type - Set UART type to cdns_uart port
+ * cdns_uart_type() - Set UART type to cdns_uart port
  * @port: Handle to the uart port structure
  *
  * Return: string on success, NULL otherwise
@@ -915,7 +915,7 @@ static const char *cdns_uart_type(struct uart_port *port)
 }
 
 /**
- * cdns_uart_verify_port - Verify the port params
+ * cdns_uart_verify_port() - Verify the port params
  * @port: Handle to the uart port structure
  * @ser: Handle to the structure whose members are compared
  *
@@ -938,7 +938,7 @@ static int cdns_uart_verify_port(struct uart_port *port,
 }
 
 /**
- * cdns_uart_request_port - Claim the memory region attached to cdns_uart port,
+ * cdns_uart_request_port() - Claim the memory region attached to cdns_uart port,
  *				called when the driver adds a cdns_uart port via
  *				uart_add_one_port()
  * @port: Handle to the uart port structure
@@ -962,7 +962,7 @@ static int cdns_uart_request_port(struct uart_port *port)
 }
 
 /**
- * cdns_uart_release_port - Release UART port
+ * cdns_uart_release_port() - Release UART port
  * @port: Handle to the uart port structure
  *
  * Release the memory region attached to a cdns_uart port. Called when the
@@ -976,7 +976,7 @@ static void cdns_uart_release_port(struct uart_port *port)
 }
 
 /**
- * cdns_uart_config_port - Configure UART port
+ * cdns_uart_config_port() - Configure UART port
  * @port: Handle to the uart port structure
  * @flags: If any
  */
@@ -987,7 +987,7 @@ static void cdns_uart_config_port(struct uart_port *port, int flags)
 }
 
 /**
- * cdns_uart_get_mctrl - Get the modem control state
+ * cdns_uart_get_mctrl() - Get the modem control state
  * @port: Handle to the uart port structure
  *
  * Return: the modem control state
@@ -1101,7 +1101,7 @@ static const struct uart_ops cdns_uart_ops = {
 
 #ifdef CONFIG_SERIAL_XILINX_PS_UART_CONSOLE
 /**
- * cdns_uart_console_putchar - write the character to the FIFO buffer
+ * cdns_uart_console_putchar() - write the character to the FIFO buffer
  * @port: Handle to the uart port structure
  * @ch: Character to be written
  */
@@ -1165,7 +1165,7 @@ OF_EARLYCON_DECLARE(cdns, "xlnx,zynqmp-uart", cdns_early_console_setup);
 static struct uart_port *console_port;
 
 /**
- * cdns_uart_console_write - perform write operation
+ * cdns_uart_console_write() - perform write operation
  * @co: Console handle
  * @s: Pointer to character array
  * @count: No of characters
@@ -1212,7 +1212,7 @@ static void cdns_uart_console_write(struct console *co, const char *s,
 }
 
 /**
- * cdns_uart_console_setup - Initialize the uart to default config
+ * cdns_uart_console_setup() - Initialize the uart to default config
  * @co: Console handle
  * @options: Initial settings of uart
  *
@@ -1242,7 +1242,7 @@ static int cdns_uart_console_setup(struct console *co, char *options)
 
 #ifdef CONFIG_PM_SLEEP
 /**
- * cdns_uart_suspend - suspend event
+ * cdns_uart_suspend() - suspend event
  * @device: Pointer to the device structure
  *
  * Return: 0
@@ -1278,7 +1278,7 @@ static int cdns_uart_suspend(struct device *device)
 }
 
 /**
- * cdns_uart_resume - Resume after a previous suspend
+ * cdns_uart_resume() - Resume after a previous suspend
  * @device: Pointer to the device structure
  *
  * Return: 0
@@ -1454,7 +1454,7 @@ static int cdns_get_id(struct platform_device *pdev)
 }
 
 /**
- * cdns_uart_probe - Platform driver probe
+ * cdns_uart_probe() - Platform driver probe
  * @pdev: Pointer to the platform device structure
  *
  * Return: 0 on success, negative errno otherwise
@@ -1675,7 +1675,7 @@ static int cdns_uart_probe(struct platform_device *pdev)
 }
 
 /**
- * cdns_uart_remove - called when the platform driver is unregistered
+ * cdns_uart_remove() - called when the platform driver is unregistered
  * @pdev: Pointer to the platform device structure
  *
  * Return: 0 on success, negative errno otherwise
diff --git a/drivers/tty/tty_audit.c b/drivers/tty/tty_audit.c
index 50f567b6a66e..54574c8d677e 100644
--- a/drivers/tty/tty_audit.c
+++ b/drivers/tty/tty_audit.c
@@ -83,10 +83,10 @@ static void tty_audit_log(const char *description, dev_t dev,
 }
 
 /**
- *	tty_audit_buf_push	-	Push buffered data out
+ * tty_audit_buf_push() - Push buffered data out
  *
- *	Generate an audit message from the contents of @buf, which is owned by
- *	the current task.  @buf->mutex must be locked.
+ * Generate an audit message from the contents of @buf, which is owned by
+ * the current task.  @buf->mutex must be locked.
  */
 static void tty_audit_buf_push(struct tty_audit_buf *buf)
 {
@@ -101,13 +101,13 @@ static void tty_audit_buf_push(struct tty_audit_buf *buf)
 }
 
 /**
- *	tty_audit_exit	-	Handle a task exit
+ * tty_audit_exit() - Handle a task exit
  *
- *	Make sure all buffered data is written out and deallocate the buffer.
- *	Only needs to be called if current->signal->tty_audit_buf != %NULL.
+ * Make sure all buffered data is written out and deallocate the buffer.
+ * Only needs to be called if current->signal->tty_audit_buf != %NULL.
  *
- *	The process is single-threaded at this point; no other threads share
- *	current->signal.
+ * The process is single-threaded at this point; no other threads share
+ * current->signal.
  */
 void tty_audit_exit(void)
 {
@@ -122,9 +122,9 @@ void tty_audit_exit(void)
 }
 
 /**
- *	tty_audit_fork	-	Copy TTY audit state for a new task
+ * tty_audit_fork() - Copy TTY audit state for a new task
  *
- *	Set up TTY audit state in @sig from current.  @sig needs no locking.
+ * Set up TTY audit state in @sig from current.  @sig needs no locking.
  */
 void tty_audit_fork(struct signal_struct *sig)
 {
@@ -132,7 +132,7 @@ void tty_audit_fork(struct signal_struct *sig)
 }
 
 /**
- *	tty_audit_tiocsti	-	Log TIOCSTI
+ * tty_audit_tiocsti() - Log TIOCSTI
  */
 void tty_audit_tiocsti(struct tty_struct *tty, char ch)
 {
@@ -147,9 +147,9 @@ void tty_audit_tiocsti(struct tty_struct *tty, char ch)
 }
 
 /**
- *	tty_audit_push	-	Flush current's pending audit data
+ * tty_audit_push() - Flush current's pending audit data
  *
- *	Returns 0 if success, -EPERM if tty audit is disabled
+ * Returns 0 if success, -EPERM if tty audit is disabled
  */
 int tty_audit_push(void)
 {
@@ -168,11 +168,11 @@ int tty_audit_push(void)
 }
 
 /**
- *	tty_audit_buf_get	-	Get an audit buffer.
+ * tty_audit_buf_get() - Get an audit buffer.
  *
- *	Get an audit buffer, allocate it if necessary.  Return %NULL
- *	if out of memory or ERR_PTR(-ESRCH) if tty_audit_exit() has already
- *	occurred.  Otherwise, return a new reference to the buffer.
+ * Get an audit buffer, allocate it if necessary.  Return %NULL
+ * if out of memory or ERR_PTR(-ESRCH) if tty_audit_exit() has already
+ * occurred.  Otherwise, return a new reference to the buffer.
  */
 static struct tty_audit_buf *tty_audit_buf_get(void)
 {
@@ -195,9 +195,9 @@ static struct tty_audit_buf *tty_audit_buf_get(void)
 }
 
 /**
- *	tty_audit_add_data	-	Add data for TTY auditing.
+ * tty_audit_add_data() - Add data for TTY auditing.
  *
- *	Audit @data of @size from @tty, if necessary.
+ * Audit @data of @size from @tty, if necessary.
  */
 void tty_audit_add_data(struct tty_struct *tty, const void *data, size_t size)
 {
diff --git a/drivers/tty/tty_baudrate.c b/drivers/tty/tty_baudrate.c
index ceee34760c62..a3c4969d4265 100644
--- a/drivers/tty/tty_baudrate.c
+++ b/drivers/tty/tty_baudrate.c
@@ -47,15 +47,15 @@ static const tcflag_t baud_bits[] = {
 static int n_baud_table = ARRAY_SIZE(baud_table);
 
 /**
- *	tty_termios_baud_rate
- *	@termios: termios structure
+ * tty_termios_baud_rate()
+ * @termios: termios structure
  *
- *	Convert termios baud rate data into a speed. This should be called
- *	with the termios lock held if this termios is a terminal termios
- *	structure. May change the termios data. Device drivers can call this
- *	function but should use ->c_[io]speed directly as they are updated.
+ * Convert termios baud rate data into a speed. This should be called
+ * with the termios lock held if this termios is a terminal termios
+ * structure. May change the termios data. Device drivers can call this
+ * function but should use ->c_[io]speed directly as they are updated.
  *
- *	Locking: none
+ * Locking: none
  */
 
 speed_t tty_termios_baud_rate(struct ktermios *termios)
@@ -82,15 +82,15 @@ speed_t tty_termios_baud_rate(struct ktermios *termios)
 EXPORT_SYMBOL(tty_termios_baud_rate);
 
 /**
- *	tty_termios_input_baud_rate
- *	@termios: termios structure
+ * tty_termios_input_baud_rate()
+ * @termios: termios structure
  *
- *	Convert termios baud rate data into a speed. This should be called
- *	with the termios lock held if this termios is a terminal termios
- *	structure. May change the termios data. Device drivers can call this
- *	function but should use ->c_[io]speed directly as they are updated.
+ * Convert termios baud rate data into a speed. This should be called
+ * with the termios lock held if this termios is a terminal termios
+ * structure. May change the termios data. Device drivers can call this
+ * function but should use ->c_[io]speed directly as they are updated.
  *
- *	Locking: none
+ * Locking: none
  */
 
 speed_t tty_termios_input_baud_rate(struct ktermios *termios)
@@ -121,25 +121,25 @@ speed_t tty_termios_input_baud_rate(struct ktermios *termios)
 EXPORT_SYMBOL(tty_termios_input_baud_rate);
 
 /**
- *	tty_termios_encode_baud_rate
- *	@termios: ktermios structure holding user requested state
- *	@ispeed: input speed
- *	@ospeed: output speed
+ * tty_termios_encode_baud_rate()
+ * @termios: ktermios structure holding user requested state
+ * @ispeed: input speed
+ * @ospeed: output speed
  *
- *	Encode the speeds set into the passed termios structure. This is
- *	used as a library helper for drivers so that they can report back
- *	the actual speed selected when it differs from the speed requested
+ * Encode the speeds set into the passed termios structure. This is
+ * used as a library helper for drivers so that they can report back
+ * the actual speed selected when it differs from the speed requested
  *
- *	For maximal back compatibility with legacy SYS5/POSIX *nix behaviour
- *	we need to carefully set the bits when the user does not get the
- *	desired speed. We allow small margins and preserve as much of possible
- *	of the input intent to keep compatibility.
+ * For maximal back compatibility with legacy SYS5/POSIX *nix behaviour
+ * we need to carefully set the bits when the user does not get the
+ * desired speed. We allow small margins and preserve as much of possible
+ * of the input intent to keep compatibility.
  *
- *	Locking: Caller should hold termios lock. This is already held
- *	when calling this function from the driver termios handler.
+ * Locking: Caller should hold termios lock. This is already held
+ * when calling this function from the driver termios handler.
  *
- *	The ifdefs deal with platforms whose owners have yet to update them
- *	and will all go away once this is done.
+ * The ifdefs deal with platforms whose owners have yet to update them
+ * and will all go away once this is done.
  */
 
 void tty_termios_encode_baud_rate(struct ktermios *termios,
@@ -225,13 +225,13 @@ void tty_termios_encode_baud_rate(struct ktermios *termios,
 EXPORT_SYMBOL_GPL(tty_termios_encode_baud_rate);
 
 /**
- *	tty_encode_baud_rate		-	set baud rate of the tty
- *	@ibaud: input baud rate
- *	@obad: output baud rate
+ * tty_encode_baud_rate() - set baud rate of the tty
+ * @ibaud: input baud rate
+ * @obad: output baud rate
  *
- *	Update the current termios data for the tty with the new speed
- *	settings. The caller must hold the termios_rwsem for the tty in
- *	question.
+ * Update the current termios data for the tty with the new speed
+ * settings. The caller must hold the termios_rwsem for the tty in
+ * question.
  */
 
 void tty_encode_baud_rate(struct tty_struct *tty, speed_t ibaud, speed_t obaud)
diff --git a/drivers/tty/tty_buffer.c b/drivers/tty/tty_buffer.c
index 77070c2d1240..d50dbe06896b 100644
--- a/drivers/tty/tty_buffer.c
+++ b/drivers/tty/tty_buffer.c
@@ -39,18 +39,18 @@
 #define TTY_BUFFER_PAGE	(((PAGE_SIZE - sizeof(struct tty_buffer)) / 2) & ~0xFF)
 
 /**
- *	tty_buffer_lock_exclusive	-	gain exclusive access to buffer
- *	tty_buffer_unlock_exclusive	-	release exclusive access
+ * tty_buffer_lock_exclusive() - gain exclusive access to buffer
+ * tty_buffer_unlock_exclusive() - release exclusive access
  *
- *	@port - tty_port owning the flip buffer
+ * @port - tty_port owning the flip buffer
  *
- *	Guarantees safe use of the line discipline's receive_buf() method by
- *	excluding the buffer work and any pending flush from using the flip
- *	buffer. Data can continue to be added concurrently to the flip buffer
- *	from the driver side.
+ * Guarantees safe use of the line discipline's receive_buf() method by
+ * excluding the buffer work and any pending flush from using the flip
+ * buffer. Data can continue to be added concurrently to the flip buffer
+ * from the driver side.
  *
- *	On release, the buffer work is restarted if there is data in the
- *	flip buffer
+ * On release, the buffer work is restarted if there is data in the
+ * flip buffer
  */
 
 void tty_buffer_lock_exclusive(struct tty_port *port)
@@ -77,15 +77,15 @@ void tty_buffer_unlock_exclusive(struct tty_port *port)
 EXPORT_SYMBOL_GPL(tty_buffer_unlock_exclusive);
 
 /**
- *	tty_buffer_space_avail	-	return unused buffer space
- *	@port - tty_port owning the flip buffer
+ * tty_buffer_space_avail() - return unused buffer space
+ * @port - tty_port owning the flip buffer
  *
- *	Returns the # of bytes which can be written by the driver without
- *	reaching the buffer limit.
+ * Returns the # of bytes which can be written by the driver without
+ * reaching the buffer limit.
  *
- *	Note: this does not guarantee that memory is available to write
- *	the returned # of bytes (use tty_prepare_flip_string_xxx() to
- *	pre-allocate if memory guarantee is required).
+ * Note: this does not guarantee that memory is available to write
+ * the returned # of bytes (use tty_prepare_flip_string_xxx() to
+ * pre-allocate if memory guarantee is required).
  */
 
 int tty_buffer_space_avail(struct tty_port *port)
@@ -106,11 +106,11 @@ static void tty_buffer_reset(struct tty_buffer *p, size_t size)
 }
 
 /**
- *	tty_buffer_free_all		-	free buffers used by a tty
- *	@tty: tty to free from
+ * tty_buffer_free_all() - free buffers used by a tty
+ * @tty: tty to free from
  *
- *	Remove all the buffers pending on a tty whether queued with data
- *	or in the free ring. Must be called when the tty is no longer in use
+ * Remove all the buffers pending on a tty whether queued with data
+ * or in the free ring. Must be called when the tty is no longer in use
  */
 
 void tty_buffer_free_all(struct tty_port *port)
@@ -141,15 +141,15 @@ void tty_buffer_free_all(struct tty_port *port)
 }
 
 /**
- *	tty_buffer_alloc	-	allocate a tty buffer
- *	@tty: tty device
- *	@size: desired size (characters)
+ * tty_buffer_alloc() - allocate a tty buffer
+ * @tty: tty device
+ * @size: desired size (characters)
  *
- *	Allocate a new tty buffer to hold the desired number of characters.
- *	We round our buffers off in 256 character chunks to get better
- *	allocation behaviour.
- *	Return NULL if out of memory or the allocation would exceed the
- *	per device queue
+ * Allocate a new tty buffer to hold the desired number of characters.
+ * We round our buffers off in 256 character chunks to get better
+ * allocation behaviour.
+ * Return NULL if out of memory or the allocation would exceed the
+ * per device queue
  */
 
 static struct tty_buffer *tty_buffer_alloc(struct tty_port *port, size_t size)
@@ -183,12 +183,12 @@ static struct tty_buffer *tty_buffer_alloc(struct tty_port *port, size_t size)
 }
 
 /**
- *	tty_buffer_free		-	free a tty buffer
- *	@tty: tty owning the buffer
- *	@b: the buffer to free
+ * tty_buffer_free() - free a tty buffer
+ * @tty: tty owning the buffer
+ * @b: the buffer to free
  *
- *	Free a tty buffer, or add it to the free list according to our
- *	internal strategy
+ * Free a tty buffer, or add it to the free list according to our
+ * internal strategy
  */
 
 static void tty_buffer_free(struct tty_port *port, struct tty_buffer *b)
@@ -205,15 +205,15 @@ static void tty_buffer_free(struct tty_port *port, struct tty_buffer *b)
 }
 
 /**
- *	tty_buffer_flush		-	flush full tty buffers
- *	@tty: tty to flush
- *	@ld:  optional ldisc ptr (must be referenced)
+ * tty_buffer_flush() - flush full tty buffers
+ * @tty: tty to flush
+ * @ld: optional ldisc ptr (must be referenced)
  *
- *	flush all the buffers containing receive data. If ld != NULL,
- *	flush the ldisc input buffer.
+ * flush all the buffers containing receive data. If ld != NULL,
+ * flush the ldisc input buffer.
  *
- *	Locking: takes buffer lock to ensure single-threaded flip buffer
- *		 'consumer'
+ * Locking: takes buffer lock to ensure single-threaded flip buffer
+ *          'consumer'
  */
 
 void tty_buffer_flush(struct tty_struct *tty, struct tty_ldisc *ld)
@@ -242,17 +242,17 @@ void tty_buffer_flush(struct tty_struct *tty, struct tty_ldisc *ld)
 }
 
 /**
- *	tty_buffer_request_room		-	grow tty buffer if needed
- *	@tty: tty structure
- *	@size: size desired
- *	@flags: buffer flags if new buffer allocated (default = 0)
+ * tty_buffer_request_room() - grow tty buffer if needed
+ * @tty: tty structure
+ * @size: size desired
+ * @flags: buffer flags if new buffer allocated (default = 0)
  *
- *	Make at least size bytes of linear space available for the tty
- *	buffer. If we fail return the size we managed to find.
+ * Make at least size bytes of linear space available for the tty
+ * buffer. If we fail return the size we managed to find.
  *
- *	Will change over to a new buffer if the current buffer is encoded as
- *	TTY_NORMAL (so has no flags buffer) and the new buffer requires
- *	a flags buffer.
+ * Will change over to a new buffer if the current buffer is encoded as
+ * TTY_NORMAL (so has no flags buffer) and the new buffer requires
+ * a flags buffer.
  */
 static int __tty_buffer_request_room(struct tty_port *port, size_t size,
 				     int flags)
@@ -298,14 +298,14 @@ int tty_buffer_request_room(struct tty_port *port, size_t size)
 EXPORT_SYMBOL_GPL(tty_buffer_request_room);
 
 /**
- *	tty_insert_flip_string_fixed_flag - Add characters to the tty buffer
- *	@port: tty port
- *	@chars: characters
- *	@flag: flag value for each character
- *	@size: size
+ * tty_insert_flip_string_fixed_flag() - Add characters to the tty buffer
+ * @port: tty port
+ * @chars: characters
+ * @flag: flag value for each character
+ * @size: size
  *
- *	Queue a series of bytes to the tty buffering. All the characters
- *	passed are marked with the supplied flag. Returns the number added.
+ * Queue a series of bytes to the tty buffering. All the characters
+ * passed are marked with the supplied flag. Returns the number added.
  */
 
 int tty_insert_flip_string_fixed_flag(struct tty_port *port,
@@ -333,15 +333,15 @@ int tty_insert_flip_string_fixed_flag(struct tty_port *port,
 EXPORT_SYMBOL(tty_insert_flip_string_fixed_flag);
 
 /**
- *	tty_insert_flip_string_flags	-	Add characters to the tty buffer
- *	@port: tty port
- *	@chars: characters
- *	@flags: flag bytes
- *	@size: size
+ * tty_insert_flip_string_flags() - Add characters to the tty buffer
+ * @port: tty port
+ * @chars: characters
+ * @flags: flag bytes
+ * @size: size
  *
- *	Queue a series of bytes to the tty buffering. For each character
- *	the flags array indicates the status of the character. Returns the
- *	number added.
+ * Queue a series of bytes to the tty buffering. For each character
+ * the flags array indicates the status of the character. Returns the
+ * number added.
  */
 
 int tty_insert_flip_string_flags(struct tty_port *port,
@@ -368,13 +368,13 @@ int tty_insert_flip_string_flags(struct tty_port *port,
 EXPORT_SYMBOL(tty_insert_flip_string_flags);
 
 /**
- *	__tty_insert_flip_char   -	Add one character to the tty buffer
- *	@port: tty port
- *	@ch: character
- *	@flag: flag byte
+ * __tty_insert_flip_char() - Add one character to the tty buffer
+ * @port: tty port
+ * @ch: character
+ * @flag: flag byte
  *
- *	Queue a single byte to the tty buffering, with an optional flag.
- *	This is the slow path of tty_insert_flip_char.
+ * Queue a single byte to the tty buffering, with an optional flag.
+ * This is the slow path of tty_insert_flip_char.
  */
 int __tty_insert_flip_char(struct tty_port *port, unsigned char ch, char flag)
 {
@@ -394,12 +394,12 @@ int __tty_insert_flip_char(struct tty_port *port, unsigned char ch, char flag)
 EXPORT_SYMBOL(__tty_insert_flip_char);
 
 /**
- *	tty_schedule_flip	-	push characters to ldisc
- *	@port: tty port to push from
+ * tty_schedule_flip() - push characters to ldisc
+ * @port: tty port to push from
  *
- *	Takes any pending buffers and transfers their ownership to the
- *	ldisc side of the queue. It then schedules those characters for
- *	processing by the line discipline.
+ * Takes any pending buffers and transfers their ownership to the
+ * ldisc side of the queue. It then schedules those characters for
+ * processing by the line discipline.
  */
 
 void tty_schedule_flip(struct tty_port *port)
@@ -415,16 +415,16 @@ void tty_schedule_flip(struct tty_port *port)
 EXPORT_SYMBOL(tty_schedule_flip);
 
 /**
- *	tty_prepare_flip_string		-	make room for characters
- *	@port: tty port
- *	@chars: return pointer for character write area
- *	@size: desired size
+ * tty_prepare_flip_string() - make room for characters
+ * @port: tty port
+ * @chars: return pointer for character write area
+ * @size: desired size
  *
- *	Prepare a block of space in the buffer for data. Returns the length
- *	available and buffer pointer to the space which is now allocated and
- *	accounted for as ready for normal characters. This is used for drivers
- *	that need their own block copy routines into the buffer. There is no
- *	guarantee the buffer is a DMA target!
+ * Prepare a block of space in the buffer for data. Returns the length
+ * available and buffer pointer to the space which is now allocated and
+ * accounted for as ready for normal characters. This is used for drivers
+ * that need their own block copy routines into the buffer. There is no
+ * guarantee the buffer is a DMA target!
  */
 
 int tty_prepare_flip_string(struct tty_port *port, unsigned char **chars,
@@ -443,16 +443,16 @@ int tty_prepare_flip_string(struct tty_port *port, unsigned char **chars,
 EXPORT_SYMBOL_GPL(tty_prepare_flip_string);
 
 /**
- *	tty_ldisc_receive_buf		-	forward data to line discipline
- *	@ld:	line discipline to process input
- *	@p:	char buffer
- *	@f:	TTY_* flags buffer
- *	@count:	number of bytes to process
+ * tty_ldisc_receive_buf() - forward data to line discipline
+ * @ld: line discipline to process input
+ * @p: char buffer
+ * @f: TTY_* flags buffer
+ * @count: number of bytes to process
  *
- *	Callers other than flush_to_ldisc() need to exclude the kworker
- *	from concurrent use of the line discipline, see paste_selection().
+ * Callers other than flush_to_ldisc() need to exclude the kworker
+ * from concurrent use of the line discipline, see paste_selection().
  *
- *	Returns the number of bytes processed
+ * Returns the number of bytes processed
  */
 int tty_ldisc_receive_buf(struct tty_ldisc *ld, const unsigned char *p,
 			  char *f, int count)
@@ -485,16 +485,16 @@ receive_buf(struct tty_port *port, struct tty_buffer *head, int count)
 }
 
 /**
- *	flush_to_ldisc
- *	@work: tty structure passed from work queue.
+ * flush_to_ldisc()
+ * @work: tty structure passed from work queue.
  *
- *	This routine is called out of the software interrupt to flush data
- *	from the buffer chain to the line discipline.
+ * This routine is called out of the software interrupt to flush data
+ * from the buffer chain to the line discipline.
  *
- *	The receive_buf method is single threaded for each tty instance.
+ * The receive_buf method is single threaded for each tty instance.
  *
- *	Locking: takes buffer lock to ensure single-threaded flip buffer
- *		 'consumer'
+ * Locking: takes buffer lock to ensure single-threaded flip buffer
+ *          'consumer'
  */
 
 static void flush_to_ldisc(struct work_struct *work)
@@ -541,14 +541,14 @@ static void flush_to_ldisc(struct work_struct *work)
 }
 
 /**
- *	tty_flip_buffer_push	-	terminal
- *	@port: tty port to push
+ * tty_flip_buffer_push() - terminal
+ * @port: tty port to push
  *
- *	Queue a push of the terminal flip buffers to the line discipline.
- *	Can be called from IRQ/atomic context.
+ * Queue a push of the terminal flip buffers to the line discipline.
+ * Can be called from IRQ/atomic context.
  *
- *	In the event of the queue being busy for flipping the work will be
- *	held off and retried later.
+ * In the event of the queue being busy for flipping the work will be
+ * held off and retried later.
  */
 
 void tty_flip_buffer_push(struct tty_port *port)
@@ -558,11 +558,11 @@ void tty_flip_buffer_push(struct tty_port *port)
 EXPORT_SYMBOL(tty_flip_buffer_push);
 
 /**
- *	tty_buffer_init		-	prepare a tty buffer structure
- *	@tty: tty to initialise
+ * tty_buffer_init() - prepare a tty buffer structure
+ * @tty: tty to initialise
  *
- *	Set up the initial state of the buffer management for a tty device.
- *	Must be called before the other tty buffer functions are used.
+ * Set up the initial state of the buffer management for a tty device.
+ * Must be called before the other tty buffer functions are used.
  */
 
 void tty_buffer_init(struct tty_port *port)
@@ -581,11 +581,11 @@ void tty_buffer_init(struct tty_port *port)
 }
 
 /**
- *	tty_buffer_set_limit	-	change the tty buffer memory limit
- *	@port: tty port to change
+ * tty_buffer_set_limit() - change the tty buffer memory limit
+ * @port: tty port to change
  *
- *	Change the tty buffer memory limit.
- *	Must be called before the other tty buffer functions are used.
+ * Change the tty buffer memory limit.
+ * Must be called before the other tty buffer functions are used.
  */
 
 int tty_buffer_set_limit(struct tty_port *port, int limit)
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index 6e47e9a5e86d..695d80c7a030 100644
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
@@ -158,12 +158,12 @@ static int tty_fasync(int fd, struct file *filp, int on);
 static void release_tty(struct tty_struct *tty, int idx);
 
 /**
- *	free_tty_struct		-	free a disused tty
- *	@tty: tty struct to free
+ * free_tty_struct() - free a disused tty
+ * @tty: tty struct to free
  *
- *	Free the write buffers, tty queue and tty memory itself.
+ * Free the write buffers, tty queue and tty memory itself.
  *
- *	Locking: none. Must be called after tty is definitely unused
+ * Locking: none. Must be called after tty is definitely unused
  */
 
 static void free_tty_struct(struct tty_struct *tty)
@@ -207,7 +207,7 @@ void tty_add_file(struct tty_struct *tty, struct file *file)
 }
 
 /**
- * tty_free_file - free file->private_data
+ * tty_free_file() - free file->private_data
  *
  * This shall be used only for fail path handling when tty_add_file was not
  * called yet.
@@ -233,13 +233,13 @@ static void tty_del_file(struct file *file)
 }
 
 /**
- *	tty_name	-	return tty naming
- *	@tty: tty structure
+ * tty_name() - return tty naming
+ * @tty: tty structure
  *
- *	Convert a tty structure into a name. The name reflects the kernel
- *	naming policy and if udev is in use may not reflect user space
+ * Convert a tty structure into a name. The name reflects the kernel
+ * naming policy and if udev is in use may not reflect user space
  *
- *	Locking: none
+ * Locking: none
  */
 
 const char *tty_name(const struct tty_struct *tty)
@@ -304,14 +304,14 @@ static int check_tty_count(struct tty_struct *tty, const char *routine)
 }
 
 /**
- *	get_tty_driver		-	find device of a tty
- *	@dev_t: device identifier
- *	@index: returns the index of the tty
+ * get_tty_driver() - find device of a tty
+ * @dev_t: device identifier
+ * @index: returns the index of the tty
  *
- *	This routine returns a tty driver structure, given a device number
- *	and also passes back the index number.
+ * This routine returns a tty driver structure, given a device number
+ * and also passes back the index number.
  *
- *	Locking: caller must hold tty_mutex
+ * Locking: caller must hold tty_mutex
  */
 
 static struct tty_driver *get_tty_driver(dev_t device, int *index)
@@ -329,17 +329,17 @@ static struct tty_driver *get_tty_driver(dev_t device, int *index)
 }
 
 /**
- *	tty_dev_name_to_number	-	return dev_t for device name
- *	@name: user space name of device under /dev
- *	@number: pointer to dev_t that this function will populate
+ * tty_dev_name_to_number() - return dev_t for device name
+ * @name: user space name of device under /dev
+ * @number: pointer to dev_t that this function will populate
  *
- *	This function converts device names like ttyS0 or ttyUSB1 into dev_t
- *	like (4, 64) or (188, 1). If no corresponding driver is registered then
- *	the function returns -ENODEV.
+ * This function converts device names like ttyS0 or ttyUSB1 into dev_t
+ * like (4, 64) or (188, 1). If no corresponding driver is registered then
+ * the function returns -ENODEV.
  *
- *	Locking: this acquires tty_mutex to protect the tty_drivers list from
- *		being modified while we are traversing it, and makes sure to
- *		release it before exiting.
+ * Locking: this acquires tty_mutex to protect the tty_drivers list from
+ *          being modified while we are traversing it, and makes sure to
+ *          release it before exiting.
  */
 int tty_dev_name_to_number(const char *name, dev_t *number)
 {
@@ -381,13 +381,13 @@ EXPORT_SYMBOL_GPL(tty_dev_name_to_number);
 #ifdef CONFIG_CONSOLE_POLL
 
 /**
- *	tty_find_polling_driver	-	find device of a polled tty
- *	@name: name string to match
- *	@line: pointer to resulting tty line nr
+ * tty_find_polling_driver() - find device of a polled tty
+ * @name: name string to match
+ * @line: pointer to resulting tty line nr
  *
- *	This routine returns a tty driver structure, given a name
- *	and the condition that the tty driver is capable of polled
- *	operation.
+ * This routine returns a tty driver structure, given a name
+ * and the condition that the tty driver is capable of polled
+ * operation.
  */
 struct tty_driver *tty_find_polling_driver(char *name, int *line)
 {
@@ -513,12 +513,12 @@ static DEFINE_SPINLOCK(redirect_lock);
 static struct file *redirect;
 
 /**
- *	tty_wakeup	-	request more data
- *	@tty: terminal
+ * tty_wakeup() - request more data
+ * @tty: terminal
  *
- *	Internal and external helper for wakeups of tty. This function
- *	informs the line discipline if present that the driver is ready
- *	to receive more output data.
+ * Internal and external helper for wakeups of tty. This function
+ * informs the line discipline if present that the driver is ready
+ * to receive more output data.
  */
 
 void tty_wakeup(struct tty_struct *tty)
@@ -539,26 +539,26 @@ void tty_wakeup(struct tty_struct *tty)
 EXPORT_SYMBOL_GPL(tty_wakeup);
 
 /**
- *	__tty_hangup		-	actual handler for hangup events
- *	@work: tty device
- *
- *	This can be called by a "kworker" kernel thread.  That is process
- *	synchronous but doesn't hold any locks, so we need to make sure we
- *	have the appropriate locks for what we're doing.
- *
- *	The hangup event clears any pending redirections onto the hung up
- *	device. It ensures future writes will error and it does the needed
- *	line discipline hangup and signal delivery. The tty object itself
- *	remains intact.
- *
- *	Locking:
- *		BTM
- *		  redirect lock for undoing redirection
- *		  file list lock for manipulating list of ttys
- *		  tty_ldiscs_lock from called functions
- *		  termios_rwsem resetting termios data
- *		  tasklist_lock to walk task list for hangup event
- *		    ->siglock to protect ->signal/->sighand
+ * __tty_hangup() - actual handler for hangup events
+ * @work: tty device
+ *
+ * This can be called by a "kworker" kernel thread.  That is process
+ * synchronous but doesn't hold any locks, so we need to make sure we
+ * have the appropriate locks for what we're doing.
+ *
+ * The hangup event clears any pending redirections onto the hung up
+ * device. It ensures future writes will error and it does the needed
+ * line discipline hangup and signal delivery. The tty object itself
+ * remains intact.
+ *
+ * Locking:
+ *         BTM
+ *           redirect lock for undoing redirection
+ *           file list lock for manipulating list of ttys
+ *           tty_ldiscs_lock from called functions
+ *           termios_rwsem resetting termios data
+ *           tasklist_lock to walk task list for hangup event
+ *           ->siglock to protect ->signal/->sighand
  */
 static void __tty_hangup(struct tty_struct *tty, int exit_session)
 {
@@ -664,11 +664,11 @@ static void do_tty_hangup(struct work_struct *work)
 }
 
 /**
- *	tty_hangup		-	trigger a hangup event
- *	@tty: tty to hangup
+ * tty_hangup() - trigger a hangup event
+ * @tty: tty to hangup
  *
- *	A carrier loss (virtual or otherwise) has occurred on this like
- *	schedule a hangup sequence to run after this event.
+ * A carrier loss (virtual or otherwise) has occurred on this like
+ * schedule a hangup sequence to run after this event.
  */
 
 void tty_hangup(struct tty_struct *tty)
@@ -680,12 +680,12 @@ void tty_hangup(struct tty_struct *tty)
 EXPORT_SYMBOL(tty_hangup);
 
 /**
- *	tty_vhangup		-	process vhangup
- *	@tty: tty to hangup
+ * tty_vhangup() - process vhangup
+ * @tty: tty to hangup
  *
- *	The user has asked via system call for the terminal to be hung up.
- *	We do this synchronously so that when the syscall returns the process
- *	is complete. That guarantee is necessary for security reasons.
+ * The user has asked via system call for the terminal to be hung up.
+ * We do this synchronously so that when the syscall returns the process
+ * is complete. That guarantee is necessary for security reasons.
  */
 
 void tty_vhangup(struct tty_struct *tty)
@@ -698,9 +698,9 @@ EXPORT_SYMBOL(tty_vhangup);
 
 
 /**
- *	tty_vhangup_self	-	process vhangup for own ctty
+ * tty_vhangup_self() - process vhangup for own ctty
  *
- *	Perform a vhangup on the current controlling tty
+ * Perform a vhangup on the current controlling tty
  */
 
 void tty_vhangup_self(void)
@@ -715,14 +715,14 @@ void tty_vhangup_self(void)
 }
 
 /**
- *	tty_vhangup_session		-	hangup session leader exit
- *	@tty: tty to hangup
+ * tty_vhangup_session() - hangup session leader exit
+ * @tty: tty to hangup
  *
- *	The session leader is exiting and hanging up its controlling terminal.
- *	Every process in the foreground process group is signalled SIGHUP.
+ * The session leader is exiting and hanging up its controlling terminal.
+ * Every process in the foreground process group is signalled SIGHUP.
  *
- *	We do this synchronously so that when the syscall returns the process
- *	is complete. That guarantee is necessary for security reasons.
+ * We do this synchronously so that when the syscall returns the process
+ * is complete. That guarantee is necessary for security reasons.
  */
 
 void tty_vhangup_session(struct tty_struct *tty)
@@ -732,11 +732,11 @@ void tty_vhangup_session(struct tty_struct *tty)
 }
 
 /**
- *	tty_hung_up_p		-	was tty hung up
- *	@filp: file pointer of tty
+ * tty_hung_up_p() - was tty hung up
+ * @filp: file pointer of tty
  *
- *	Return true if the tty has been subject to a vhangup or a carrier
- *	loss
+ * Return true if the tty has been subject to a vhangup or a carrier
+ * loss
  */
 
 int tty_hung_up_p(struct file *filp)
@@ -747,20 +747,20 @@ int tty_hung_up_p(struct file *filp)
 EXPORT_SYMBOL(tty_hung_up_p);
 
 /**
- *	stop_tty	-	propagate flow control
- *	@tty: tty to stop
+ * stop_tty() - propagate flow control
+ * @tty: tty to stop
  *
- *	Perform flow control to the driver. May be called
- *	on an already stopped device and will not re-call the driver
- *	method.
+ * Perform flow control to the driver. May be called
+ * on an already stopped device and will not re-call the driver
+ * method.
  *
- *	This functionality is used by both the line disciplines for
- *	halting incoming flow and by the driver. It may therefore be
- *	called from any context, may be under the tty atomic_write_lock
- *	but not always.
+ * This functionality is used by both the line disciplines for
+ * halting incoming flow and by the driver. It may therefore be
+ * called from any context, may be under the tty atomic_write_lock
+ * but not always.
  *
- *	Locking:
- *		flow_lock
+ * Locking:
+ *         flow_lock
  */
 
 void __stop_tty(struct tty_struct *tty)
@@ -783,15 +783,15 @@ void stop_tty(struct tty_struct *tty)
 EXPORT_SYMBOL(stop_tty);
 
 /**
- *	start_tty	-	propagate flow control
- *	@tty: tty to start
+ * start_tty() - propagate flow control
+ * @tty: tty to start
  *
- *	Start a tty that has been stopped if at all possible. If this
- *	tty was previous stopped and is now being started, the driver
- *	start method is invoked and the line discipline woken.
+ * Start a tty that has been stopped if at all possible. If this
+ * tty was previous stopped and is now being started, the driver
+ * start method is invoked and the line discipline woken.
  *
- *	Locking:
- *		flow_lock
+ * Locking:
+ *         flow_lock
  */
 
 void __start_tty(struct tty_struct *tty)
@@ -829,18 +829,18 @@ static void tty_update_time(struct timespec64 *time)
 }
 
 /**
- *	tty_read	-	read method for tty device files
- *	@file: pointer to tty file
- *	@buf: user buffer
- *	@count: size of user buffer
- *	@ppos: unused
+ * tty_read() - read method for tty device files
+ * @file: pointer to tty file
+ * @buf: user buffer
+ * @count: size of user buffer
+ * @ppos: unused
  *
- *	Perform the read system call function on this terminal device. Checks
- *	for hung up devices before calling the line discipline method.
+ * Perform the read system call function on this terminal device. Checks
+ * for hung up devices before calling the line discipline method.
  *
- *	Locking:
- *		Locks the line discipline internally while needed. Multiple
- *	read calls may be outstanding in parallel.
+ * Locking:
+ *         Locks the line discipline internally while needed. Multiple
+ * read calls may be outstanding in parallel.
  */
 
 static ssize_t tty_read(struct file *file, char __user *buf, size_t count,
@@ -978,7 +978,7 @@ static inline ssize_t do_tty_write(
 }
 
 /**
- * tty_write_message - write a message to a certain tty, not just the console.
+ * tty_write_message() - write a message to a certain tty, not just the console.
  * @tty: the destination tty_struct
  * @msg: the message to write
  *
@@ -1004,19 +1004,19 @@ void tty_write_message(struct tty_struct *tty, char *msg)
 
 
 /**
- *	tty_write		-	write method for tty device file
- *	@file: tty file pointer
- *	@buf: user data to write
- *	@count: bytes to write
- *	@ppos: unused
+ * tty_write() - write method for tty device file
+ * @file: tty file pointer
+ * @buf: user data to write
+ * @count: bytes to write
+ * @ppos: unused
  *
- *	Write data to a tty device via the line discipline.
+ * Write data to a tty device via the line discipline.
  *
- *	Locking:
- *		Locks the line discipline as required
- *		Writes to the tty driver are serialized by the atomic_write_lock
- *	and are then processed in chunks to the device. The line discipline
- *	write method will not be invoked in parallel for each device.
+ * Locking:
+ *         Locks the line discipline as required
+ *         Writes to the tty driver are serialized by the atomic_write_lock
+ * and are then processed in chunks to the device. The line discipline
+ * write method will not be invoked in parallel for each device.
  */
 
 static ssize_t tty_write(struct file *file, const char __user *buf,
@@ -1064,11 +1064,11 @@ ssize_t redirected_tty_write(struct file *file, const char __user *buf,
 }
 
 /**
- *	tty_send_xchar	-	send priority character
+ * tty_send_xchar() - send priority character
  *
- *	Send a high priority character to the tty even if stopped
+ * Send a high priority character to the tty even if stopped
  *
- *	Locking: none for xchar method, write ordering for write method.
+ * Locking: none for xchar method, write ordering for write method.
  */
 
 int tty_send_xchar(struct tty_struct *tty, char ch)
@@ -1099,15 +1099,15 @@ int tty_send_xchar(struct tty_struct *tty, char ch)
 static char ptychar[] = "pqrstuvwxyzabcde";
 
 /**
- *	pty_line_name	-	generate name for a pty
- *	@driver: the tty driver in use
- *	@index: the minor number
- *	@p: output buffer of at least 6 bytes
+ * pty_line_name() - generate name for a pty
+ * @driver: the tty driver in use
+ * @index: the minor number
+ * @p: output buffer of at least 6 bytes
  *
- *	Generate a name from a driver reference and write it to the output
- *	buffer.
+ * Generate a name from a driver reference and write it to the output
+ * buffer.
  *
- *	Locking: None
+ * Locking: None
  */
 static void pty_line_name(struct tty_driver *driver, int index, char *p)
 {
@@ -1119,15 +1119,15 @@ static void pty_line_name(struct tty_driver *driver, int index, char *p)
 }
 
 /**
- *	tty_line_name	-	generate name for a tty
- *	@driver: the tty driver in use
- *	@index: the minor number
- *	@p: output buffer of at least 7 bytes
+ * tty_line_name() - generate name for a tty
+ * @driver: the tty driver in use
+ * @index: the minor number
+ * @p: output buffer of at least 7 bytes
  *
- *	Generate a name from a driver reference and write it to the output
- *	buffer.
+ * Generate a name from a driver reference and write it to the output
+ * buffer.
  *
- *	Locking: None
+ * Locking: None
  */
 static ssize_t tty_line_name(struct tty_driver *driver, int index, char *p)
 {
@@ -1139,14 +1139,14 @@ static ssize_t tty_line_name(struct tty_driver *driver, int index, char *p)
 }
 
 /**
- *	tty_driver_lookup_tty() - find an existing tty, if any
- *	@driver: the driver for the tty
- *	@idx:	 the minor number
+ * tty_driver_lookup_tty() - find an existing tty, if any
+ * @driver: the driver for the tty
+ * @idx: the minor number
  *
- *	Return the tty, if found. If not found, return NULL or ERR_PTR() if the
- *	driver lookup() method returns an error.
+ * Return the tty, if found. If not found, return NULL or ERR_PTR() if the
+ * driver lookup() method returns an error.
  *
- *	Locking: tty_mutex must be held. If the tty is found, bump the tty kref.
+ * Locking: tty_mutex must be held. If the tty is found, bump the tty kref.
  */
 static struct tty_struct *tty_driver_lookup_tty(struct tty_driver *driver,
 		struct file *file, int idx)
@@ -1167,11 +1167,11 @@ static struct tty_struct *tty_driver_lookup_tty(struct tty_driver *driver,
 }
 
 /**
- *	tty_init_termios	-  helper for termios setup
- *	@tty: the tty to set up
+ * tty_init_termios() - helper for termios setup
+ * @tty: the tty to set up
  *
- *	Initialise the termios structures for this tty. Thus runs under
- *	the tty_mutex currently so we can be relaxed about ordering.
+ * Initialise the termios structures for this tty. Thus runs under
+ * the tty_mutex currently so we can be relaxed about ordering.
  */
 
 void tty_init_termios(struct tty_struct *tty)
@@ -1207,16 +1207,16 @@ int tty_standard_install(struct tty_driver *driver, struct tty_struct *tty)
 EXPORT_SYMBOL_GPL(tty_standard_install);
 
 /**
- *	tty_driver_install_tty() - install a tty entry in the driver
- *	@driver: the driver for the tty
- *	@tty: the tty
+ * tty_driver_install_tty() - install a tty entry in the driver
+ * @driver: the driver for the tty
+ * @tty: the tty
  *
- *	Install a tty object into the driver tables. The tty->index field
- *	will be set by the time this is called. This method is responsible
- *	for ensuring any need additional structures are allocated and
- *	configured.
+ * Install a tty object into the driver tables. The tty->index field
+ * will be set by the time this is called. This method is responsible
+ * for ensuring any need additional structures are allocated and
+ * configured.
  *
- *	Locking: tty_mutex for now
+ * Locking: tty_mutex for now
  */
 static int tty_driver_install_tty(struct tty_driver *driver,
 						struct tty_struct *tty)
@@ -1226,14 +1226,14 @@ static int tty_driver_install_tty(struct tty_driver *driver,
 }
 
 /**
- *	tty_driver_remove_tty() - remove a tty from the driver tables
- *	@driver: the driver for the tty
- *	@idx:	 the minor number
+ * tty_driver_remove_tty() - remove a tty from the driver tables
+ * @driver: the driver for the tty
+ * @idx: the minor number
  *
- *	Remvoe a tty object from the driver tables. The tty->index field
- *	will be set by the time this is called.
+ * Remvoe a tty object from the driver tables. The tty->index field
+ * will be set by the time this is called.
  *
- *	Locking: tty_mutex for now
+ * Locking: tty_mutex for now
  */
 static void tty_driver_remove_tty(struct tty_driver *driver, struct tty_struct *tty)
 {
@@ -1247,10 +1247,10 @@ static void tty_driver_remove_tty(struct tty_driver *driver, struct tty_struct *
  *	tty_reopen()	- fast re-open of an open tty
  *	@tty	- the tty to open
  *
- *	Return 0 on success, -errno on error.
- *	Re-opens on master ptys are not allowed and return -EIO.
+ * Return 0 on success, -errno on error.
+ * Re-opens on master ptys are not allowed and return -EIO.
  *
- *	Locking: Caller must hold tty_lock
+ * Locking: Caller must hold tty_lock
  */
 static int tty_reopen(struct tty_struct *tty)
 {
@@ -1280,22 +1280,22 @@ static int tty_reopen(struct tty_struct *tty)
 }
 
 /**
- *	tty_init_dev		-	initialise a tty device
- *	@driver: tty driver we are opening a device on
- *	@idx: device index
- *	@ret_tty: returned tty structure
+ * tty_init_dev() - initialise a tty device
+ * @driver: tty driver we are opening a device on
+ * @idx: device index
+ * @ret_tty: returned tty structure
  *
- *	Prepare a tty device. This may not be a "new" clean device but
- *	could also be an active device. The pty drivers require special
- *	handling because of this.
+ * Prepare a tty device. This may not be a "new" clean device but
+ * could also be an active device. The pty drivers require special
+ * handling because of this.
  *
- *	Locking:
- *		The function is called under the tty_mutex, which
- *	protects us from the tty struct or driver itself going away.
+ * Locking:
+ *         The function is called under the tty_mutex, which
+ * protects us from the tty struct or driver itself going away.
  *
- *	On exit the tty device has the line discipline attached and
- *	a reference count of 1. If a pair was created for pty/tty use
- *	and the other was a pty master then it too has a reference count of 1.
+ * On exit the tty device has the line discipline attached and
+ * a reference count of 1. If a pair was created for pty/tty use
+ * and the other was a pty master then it too has a reference count of 1.
  *
  * WSH 06/09/97: Rewritten to remove races and properly clean up after a
  * failed open.  The new code protects the open with a mutex, so it's
@@ -1393,10 +1393,10 @@ static void tty_free_termios(struct tty_struct *tty)
 }
 
 /**
- *	tty_flush_works		-	flush all works of a tty/pty pair
- *	@tty: tty device to flush works for (or either end of a pty pair)
+ * tty_flush_works() - flush all works of a tty/pty pair
+ * @tty: tty device to flush works for (or either end of a pty pair)
  *
- *	Sync flush all works belonging to @tty (and the 'other' tty).
+ * Sync flush all works belonging to @tty (and the 'other' tty).
  */
 static void tty_flush_works(struct tty_struct *tty)
 {
@@ -1409,19 +1409,19 @@ static void tty_flush_works(struct tty_struct *tty)
 }
 
 /**
- *	release_one_tty		-	release tty structure memory
- *	@kref: kref of tty we are obliterating
+ * release_one_tty() - release tty structure memory
+ * @kref: kref of tty we are obliterating
  *
- *	Releases memory associated with a tty structure, and clears out the
- *	driver table slots. This function is called when a device is no longer
- *	in use. It also gets called when setup of a device fails.
+ * Releases memory associated with a tty structure, and clears out the
+ * driver table slots. This function is called when a device is no longer
+ * in use. It also gets called when setup of a device fails.
  *
- *	Locking:
- *		takes the file list lock internally when working on the list
- *	of ttys that the driver keeps.
+ * Locking:
+ *         takes the file list lock internally when working on the list
+ * of ttys that the driver keeps.
  *
- *	This method gets called from a work queue so that the driver private
- *	cleanup ops can sleep (needed for USB at least)
+ * This method gets called from a work queue so that the driver private
+ * cleanup ops can sleep (needed for USB at least)
  */
 static void release_one_tty(struct work_struct *work)
 {
@@ -1457,11 +1457,11 @@ static void queue_release_one_tty(struct kref *kref)
 }
 
 /**
- *	tty_kref_put		-	release a tty kref
- *	@tty: tty device
+ * tty_kref_put() - release a tty kref
+ * @tty: tty device
  *
- *	Release a reference to a tty device and if need be let the kref
- *	layer destruct the object for us
+ * Release a reference to a tty device and if need be let the kref
+ * layer destruct the object for us
  */
 
 void tty_kref_put(struct tty_struct *tty)
@@ -1472,15 +1472,15 @@ void tty_kref_put(struct tty_struct *tty)
 EXPORT_SYMBOL(tty_kref_put);
 
 /**
- *	release_tty		-	release tty structure memory
+ * release_tty() - release tty structure memory
  *
- *	Release both @tty and a possible linked partner (think pty pair),
- *	and decrement the refcount of the backing module.
+ * Release both @tty and a possible linked partner (think pty pair),
+ * and decrement the refcount of the backing module.
  *
- *	Locking:
- *		tty_mutex
- *		takes the file list lock internally when working on the list
- *	of ttys that the driver keeps.
+ * Locking:
+ *         tty_mutex
+ *         takes the file list lock internally when working on the list
+ * of ttys that the driver keeps.
  *
  */
 static void release_tty(struct tty_struct *tty, int idx)
@@ -1504,13 +1504,13 @@ static void release_tty(struct tty_struct *tty, int idx)
 }
 
 /**
- *	tty_release_checks - check a tty before real release
- *	@tty: tty to check
- *	@o_tty: link of @tty (if any)
- *	@idx: index of the tty
+ * tty_release_checks() - check a tty before real release
+ * @tty: tty to check
+ * @o_tty: link of @tty (if any)
+ * @idx: index of the tty
  *
- *	Performs some paranoid checking before true release of the @tty.
- *	This is a no-op unless TTY_PARANOIA_CHECK is defined.
+ * Performs some paranoid checking before true release of the @tty.
+ * This is a no-op unless TTY_PARANOIA_CHECK is defined.
  */
 static int tty_release_checks(struct tty_struct *tty, int idx)
 {
@@ -1547,12 +1547,12 @@ static int tty_release_checks(struct tty_struct *tty, int idx)
 }
 
 /**
- *      tty_kclose      -       closes tty opened by tty_kopen
- *      @tty: tty device
+ * tty_kclose() - closes tty opened by tty_kopen
+ * @tty: tty device
  *
- *      Performs the final steps to release and free a tty device. It is the
- *      same as tty_release_struct except that it also resets TTY_PORT_KOPENED
- *      flag on tty->port.
+ * Performs the final steps to release and free a tty device. It is the
+ * same as tty_release_struct except that it also resets TTY_PORT_KOPENED
+ * flag on tty->port.
  */
 void tty_kclose(struct tty_struct *tty)
 {
@@ -1579,12 +1579,12 @@ void tty_kclose(struct tty_struct *tty)
 EXPORT_SYMBOL_GPL(tty_kclose);
 
 /**
- *	tty_release_struct	-	release a tty struct
- *	@tty: tty device
- *	@idx: index of the tty
+ * tty_release_struct() - release a tty struct
+ * @tty: tty device
+ * @idx: index of the tty
  *
- *	Performs the final steps to release and free a tty device. It is
- *	roughly the reverse of tty_init_dev.
+ * Performs the final steps to release and free a tty device. It is
+ * roughly the reverse of tty_init_dev.
  */
 void tty_release_struct(struct tty_struct *tty, int idx)
 {
@@ -1610,15 +1610,15 @@ void tty_release_struct(struct tty_struct *tty, int idx)
 EXPORT_SYMBOL_GPL(tty_release_struct);
 
 /**
- *	tty_release		-	vfs callback for close
- *	@inode: inode of tty
- *	@filp: file pointer for handle to tty
+ * tty_release() - vfs callback for close
+ * @inode: inode of tty
+ * @filp: file pointer for handle to tty
  *
- *	Called the last time each file handle is closed that references
- *	this tty. There may however be several such references.
+ * Called the last time each file handle is closed that references
+ * this tty. There may however be several such references.
  *
- *	Locking:
- *		Takes bkl. See tty_release_dev
+ * Locking:
+ *         Takes bkl. See tty_release_dev
  *
  * Even releasing the tty structures is a tricky business.. We have
  * to be very careful that the structures are all released at the
@@ -1769,15 +1769,15 @@ int tty_release(struct inode *inode, struct file *filp)
 }
 
 /**
- *	tty_open_current_tty - get locked tty of current task
- *	@device: device number
- *	@filp: file pointer to tty
- *	@return: locked tty of the current task iff @device is /dev/tty
+ * tty_open_current_tty() - get locked tty of current task
+ * @device: device number
+ * @filp: file pointer to tty
+ * @return: locked tty of the current task iff @device is /dev/tty
  *
- *	Performs a re-open of the current task's controlling tty.
+ * Performs a re-open of the current task's controlling tty.
  *
- *	We cannot return driver and index like for the other nodes because
- *	devpts will not work then. It expects inodes to be from devpts FS.
+ * We cannot return driver and index like for the other nodes because
+ * devpts will not work then. It expects inodes to be from devpts FS.
  */
 static struct tty_struct *tty_open_current_tty(dev_t device, struct file *filp)
 {
@@ -1805,16 +1805,16 @@ static struct tty_struct *tty_open_current_tty(dev_t device, struct file *filp)
 }
 
 /**
- *	tty_lookup_driver - lookup a tty driver for a given device file
- *	@device: device number
- *	@filp: file pointer to tty
- *	@index: index for the device in the @return driver
- *	@return: driver for this inode (with increased refcount)
+ * tty_lookup_driver() - lookup a tty driver for a given device file
+ * @device: device number
+ * @filp: file pointer to tty
+ * @index: index for the device in the @return driver
+ * @return: driver for this inode (with increased refcount)
  *
  *	If @return is not erroneous, the caller is responsible to decrement the
  *	refcount by tty_driver_kref_put.
  *
- *	Locking: tty_mutex protects get_tty_driver
+ * Locking: tty_mutex protects get_tty_driver
  */
 static struct tty_driver *tty_lookup_driver(dev_t device, struct file *filp,
 		int *index)
@@ -1852,19 +1852,19 @@ static struct tty_driver *tty_lookup_driver(dev_t device, struct file *filp,
 }
 
 /**
- *	tty_kopen	-	open a tty device for kernel
- *	@device: dev_t of device to open
+ * tty_kopen() - open a tty device for kernel
+ * @device: dev_t of device to open
  *
- *	Opens tty exclusively for kernel. Performs the driver lookup,
- *	makes sure it's not already opened and performs the first-time
- *	tty initialization.
+ * Opens tty exclusively for kernel. Performs the driver lookup,
+ * makes sure it's not already opened and performs the first-time
+ * tty initialization.
  *
- *	Returns the locked initialized &tty_struct
+ * Returns the locked initialized &tty_struct
  *
- *	Claims the global tty_mutex to serialize:
- *	  - concurrent first-time tty initialization
- *	  - concurrent tty driver removal w/ lookup
- *	  - concurrent tty removal from driver table
+ * Claims the global tty_mutex to serialize:
+ *   - concurrent first-time tty initialization
+ *   - concurrent tty driver removal w/ lookup
+ *   - concurrent tty removal from driver table
  */
 struct tty_struct *tty_kopen(dev_t device)
 {
@@ -1902,20 +1902,20 @@ struct tty_struct *tty_kopen(dev_t device)
 EXPORT_SYMBOL_GPL(tty_kopen);
 
 /**
- *	tty_open_by_driver	-	open a tty device
- *	@device: dev_t of device to open
- *	@inode: inode of device file
- *	@filp: file pointer to tty
+ * tty_open_by_driver() - open a tty device
+ * @device: dev_t of device to open
+ * @inode: inode of device file
+ * @filp: file pointer to tty
  *
- *	Performs the driver lookup, checks for a reopen, or otherwise
- *	performs the first-time tty initialization.
+ * Performs the driver lookup, checks for a reopen, or otherwise
+ * performs the first-time tty initialization.
  *
- *	Returns the locked initialized or re-opened &tty_struct
+ * Returns the locked initialized or re-opened &tty_struct
  *
- *	Claims the global tty_mutex to serialize:
- *	  - concurrent first-time tty initialization
- *	  - concurrent tty driver removal w/ lookup
- *	  - concurrent tty removal from driver table
+ * Claims the global tty_mutex to serialize:
+ *   - concurrent first-time tty initialization
+ *   - concurrent tty driver removal w/ lookup
+ *   - concurrent tty removal from driver table
  */
 static struct tty_struct *tty_open_by_driver(dev_t device, struct inode *inode,
 					     struct file *filp)
@@ -1970,27 +1970,27 @@ static struct tty_struct *tty_open_by_driver(dev_t device, struct inode *inode,
 }
 
 /**
- *	tty_open		-	open a tty device
- *	@inode: inode of device file
- *	@filp: file pointer to tty
+ * tty_open() - open a tty device
+ * @inode: inode of device file
+ * @filp: file pointer to tty
  *
- *	tty_open and tty_release keep up the tty count that contains the
- *	number of opens done on a tty. We cannot use the inode-count, as
- *	different inodes might point to the same tty.
+ * tty_open and tty_release keep up the tty count that contains the
+ * number of opens done on a tty. We cannot use the inode-count, as
+ * different inodes might point to the same tty.
  *
- *	Open-counting is needed for pty masters, as well as for keeping
- *	track of serial lines: DTR is dropped when the last close happens.
- *	(This is not done solely through tty->count, now.  - Ted 1/27/92)
+ * Open-counting is needed for pty masters, as well as for keeping
+ * track of serial lines: DTR is dropped when the last close happens.
+ * (This is not done solely through tty->count, now.  - Ted 1/27/92)
  *
- *	The termios state of a pty is reset on first open so that
- *	settings don't persist across reuse.
+ * The termios state of a pty is reset on first open so that
+ * settings don't persist across reuse.
  *
- *	Locking: tty_mutex protects tty, tty_lookup_driver and tty_init_dev.
- *		 tty->count should protect the rest.
- *		 ->siglock protects ->signal/->sighand
+ * Locking: tty_mutex protects tty, tty_lookup_driver and tty_init_dev.
+ *          tty->count should protect the rest.
+ *          ->siglock protects ->signal/->sighand
  *
- *	Note: the tty_unlock/lock cases without a ref are only safe due to
- *	tty_mutex
+ * Note: the tty_unlock/lock cases without a ref are only safe due to
+ * tty_mutex
  */
 
 static int tty_open(struct inode *inode, struct file *filp)
@@ -2066,15 +2066,15 @@ static int tty_open(struct inode *inode, struct file *filp)
 
 
 /**
- *	tty_poll	-	check tty status
- *	@filp: file being polled
- *	@wait: poll wait structures to update
+ * tty_poll() - check tty status
+ * @filp: file being polled
+ * @wait: poll wait structures to update
  *
- *	Call the line discipline polling method to obtain the poll
- *	status of the device.
+ * Call the line discipline polling method to obtain the poll
+ * status of the device.
  *
- *	Locking: locks called line discipline but ldisc poll method
- *	may be re-entered freely by other callers.
+ * Locking: locks called line discipline but ldisc poll method
+ * may be re-entered freely by other callers.
  */
 
 static __poll_t tty_poll(struct file *filp, poll_table *wait)
@@ -2144,20 +2144,20 @@ static int tty_fasync(int fd, struct file *filp, int on)
 }
 
 /**
- *	tiocsti			-	fake input character
- *	@tty: tty to fake input into
- *	@p: pointer to character
+ * tiocsti() - fake input character
+ * @tty: tty to fake input into
+ * @p: pointer to character
  *
- *	Fake input to a tty device. Does the necessary locking and
- *	input management.
+ * Fake input to a tty device. Does the necessary locking and
+ * input management.
  *
- *	FIXME: does not honour flow control ??
+ * FIXME: does not honour flow control ??
  *
- *	Locking:
- *		Called functions take tty_ldiscs_lock
- *		current->signal->tty check is safe without locks
+ * Locking:
+ *         Called functions take tty_ldiscs_lock
+ *         current->signal->tty check is safe without locks
  *
- *	FIXME: may race normal receive processing
+ * FIXME: may race normal receive processing
  */
 
 static int tiocsti(struct tty_struct *tty, char __user *p)
@@ -2179,14 +2179,14 @@ static int tiocsti(struct tty_struct *tty, char __user *p)
 }
 
 /**
- *	tiocgwinsz		-	implement window query ioctl
- *	@tty; tty
- *	@arg: user buffer for result
+ * tiocgwinsz() - implement window query ioctl
+ * @tty; tty
+ * @arg: user buffer for result
  *
- *	Copies the kernel idea of the window size into the user buffer.
+ * Copies the kernel idea of the window size into the user buffer.
  *
- *	Locking: tty->winsize_mutex is taken to ensure the winsize data
- *		is consistent.
+ * Locking: tty->winsize_mutex is taken to ensure the winsize data
+ *          is consistent.
  */
 
 static int tiocgwinsz(struct tty_struct *tty, struct winsize __user *arg)
@@ -2201,13 +2201,13 @@ static int tiocgwinsz(struct tty_struct *tty, struct winsize __user *arg)
 }
 
 /**
- *	tty_do_resize		-	resize event
- *	@tty: tty being resized
- *	@rows: rows (character)
- *	@cols: cols (character)
+ * tty_do_resize() - resize event
+ * @tty: tty being resized
+ * @rows: rows (character)
+ * @cols: cols (character)
  *
- *	Update the termios variables and send the necessary signals to
- *	peform a terminal resize correctly
+ * Update the termios variables and send the necessary signals to
+ * peform a terminal resize correctly
  */
 
 int tty_do_resize(struct tty_struct *tty, struct winsize *ws)
@@ -2233,18 +2233,18 @@ int tty_do_resize(struct tty_struct *tty, struct winsize *ws)
 EXPORT_SYMBOL(tty_do_resize);
 
 /**
- *	tiocswinsz		-	implement window size set ioctl
- *	@tty; tty side of tty
- *	@arg: user buffer for result
+ * tiocswinsz() - implement window size set ioctl
+ * @tty; tty side of tty
+ * @arg: user buffer for result
  *
- *	Copies the user idea of the window size to the kernel. Traditionally
- *	this is just advisory information but for the Linux console it
- *	actually has driver level meaning and triggers a VC resize.
+ * Copies the user idea of the window size to the kernel. Traditionally
+ * this is just advisory information but for the Linux console it
+ * actually has driver level meaning and triggers a VC resize.
  *
- *	Locking:
- *		Driver dependent. The default do_resize method takes the
- *	tty termios mutex and ctrl_lock. The console takes its own lock
- *	then calls into the default method.
+ * Locking:
+ *         Driver dependent. The default do_resize method takes the
+ * tty termios mutex and ctrl_lock. The console takes its own lock
+ * then calls into the default method.
  */
 
 static int tiocswinsz(struct tty_struct *tty, struct winsize __user *arg)
@@ -2260,12 +2260,12 @@ static int tiocswinsz(struct tty_struct *tty, struct winsize __user *arg)
 }
 
 /**
- *	tioccons	-	allow admin to move logical console
- *	@file: the file to become console
+ * tioccons() - allow admin to move logical console
+ * @file: the file to become console
  *
- *	Allow the administrator to move the redirected console device
+ * Allow the administrator to move the redirected console device
  *
- *	Locking: uses redirect_lock to guard the redirect information
+ * Locking: uses redirect_lock to guard the redirect information
  */
 
 static int tioccons(struct file *file)
@@ -2293,15 +2293,15 @@ static int tioccons(struct file *file)
 }
 
 /**
- *	fionbio		-	non blocking ioctl
- *	@file: file to set blocking value
- *	@p: user parameter
+ * fionbio() - non blocking ioctl
+ * @file: file to set blocking value
+ * @p: user parameter
  *
- *	Historical tty interfaces had a blocking control ioctl before
- *	the generic functionality existed. This piece of history is preserved
- *	in the expected tty API of posix OS's.
+ * Historical tty interfaces had a blocking control ioctl before
+ * the generic functionality existed. This piece of history is preserved
+ * in the expected tty API of posix OS's.
  *
- *	Locking: none, the open file handle ensures it won't go away.
+ * Locking: none, the open file handle ensures it won't go away.
  */
 
 static int fionbio(struct file *file, int __user *p)
@@ -2321,13 +2321,13 @@ static int fionbio(struct file *file, int __user *p)
 }
 
 /**
- *	tiocsetd	-	set line discipline
- *	@tty: tty device
- *	@p: pointer to user data
+ * tiocsetd() - set line discipline
+ * @tty: tty device
+ * @p: pointer to user data
  *
- *	Set the line discipline according to user request.
+ * Set the line discipline according to user request.
  *
- *	Locking: see tty_set_ldisc, this function is just a helper
+ * Locking: see tty_set_ldisc, this function is just a helper
  */
 
 static int tiocsetd(struct tty_struct *tty, int __user *p)
@@ -2344,14 +2344,14 @@ static int tiocsetd(struct tty_struct *tty, int __user *p)
 }
 
 /**
- *	tiocgetd	-	get line discipline
- *	@tty: tty device
- *	@p: pointer to user data
+ * tiocgetd() - get line discipline
+ * @tty: tty device
+ * @p: pointer to user data
  *
- *	Retrieves the line discipline id directly from the ldisc.
+ * Retrieves the line discipline id directly from the ldisc.
  *
- *	Locking: waits for ldisc reference (in case the line discipline
- *		is changing or the tty is being hungup)
+ * Locking: waits for ldisc reference (in case the line discipline
+ *          is changing or the tty is being hungup)
  */
 
 static int tiocgetd(struct tty_struct *tty, int __user *p)
@@ -2368,15 +2368,15 @@ static int tiocgetd(struct tty_struct *tty, int __user *p)
 }
 
 /**
- *	send_break	-	performed time break
- *	@tty: device to break on
- *	@duration: timeout in mS
+ * send_break() - performed time break
+ * @tty: device to break on
+ * @duration: timeout in mS
  *
- *	Perform a timed break on hardware that lacks its own driver level
- *	timed break functionality.
+ * Perform a timed break on hardware that lacks its own driver level
+ * timed break functionality.
  *
- *	Locking:
- *		atomic_write_lock serializes
+ * Locking:
+ *         atomic_write_lock serializes
  *
  */
 
@@ -2408,15 +2408,15 @@ static int send_break(struct tty_struct *tty, unsigned int duration)
 }
 
 /**
- *	tty_tiocmget		-	get modem status
- *	@tty: tty device
- *	@file: user file pointer
- *	@p: pointer to result
+ * tty_tiocmget() - get modem status
+ * @tty: tty device
+ * @file: user file pointer
+ * @p: pointer to result
  *
- *	Obtain the modem status bits from the tty driver if the feature
- *	is supported. Return -EINVAL if it is not available.
+ * Obtain the modem status bits from the tty driver if the feature
+ * is supported. Return -EINVAL if it is not available.
  *
- *	Locking: none (up to the driver)
+ * Locking: none (up to the driver)
  */
 
 static int tty_tiocmget(struct tty_struct *tty, int __user *p)
@@ -2433,15 +2433,15 @@ static int tty_tiocmget(struct tty_struct *tty, int __user *p)
 }
 
 /**
- *	tty_tiocmset		-	set modem status
- *	@tty: tty device
- *	@cmd: command - clear bits, set bits or set all
- *	@p: pointer to desired bits
+ * tty_tiocmset() - set modem status
+ * @tty: tty device
+ * @cmd: command - clear bits, set bits or set all
+ * @p: pointer to desired bits
  *
- *	Set the modem status bits from the tty driver if the feature
- *	is supported. Return -EINVAL if it is not available.
+ * Set the modem status bits from the tty driver if the feature
+ * is supported. Return -EINVAL if it is not available.
  *
- *	Locking: none (up to the driver)
+ * Locking: none (up to the driver)
  */
 
 static int tty_tiocmset(struct tty_struct *tty, unsigned int cmd,
@@ -2555,7 +2555,7 @@ long tty_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 	}
 
 	/*
-	 *	Now do the stuff.
+	 * Now do the stuff.
 	 */
 	switch (cmd) {
 	case TIOCSTI:
@@ -2804,11 +2804,11 @@ static struct device *tty_get_device(struct tty_struct *tty)
 
 
 /**
- *	alloc_tty_struct
+ * alloc_tty_struct()
  *
- *	This subroutine allocates and initializes a tty structure.
+ * This subroutine allocates and initializes a tty structure.
  *
- *	Locking: none - tty in question is not exposed at this point
+ * Locking: none - tty in question is not exposed at this point
  */
 
 struct tty_struct *alloc_tty_struct(struct tty_driver *driver, int idx)
@@ -2852,15 +2852,15 @@ struct tty_struct *alloc_tty_struct(struct tty_driver *driver, int idx)
 }
 
 /**
- *	tty_put_char	-	write one character to a tty
- *	@tty: tty
- *	@ch: character
+ * tty_put_char() - write one character to a tty
+ * @tty: tty
+ * @ch: character
  *
- *	Write one byte to the tty using the provided put_char method
- *	if present. Returns the number of characters successfully output.
+ * Write one byte to the tty using the provided put_char method
+ * if present. Returns the number of characters successfully output.
  *
- *	Note: the specific put_char operation in the driver layer may go
- *	away soon. Don't call it directly, use this method
+ * Note: the specific put_char operation in the driver layer may go
+ * away soon. Don't call it directly, use this method
  */
 
 int tty_put_char(struct tty_struct *tty, unsigned char ch)
@@ -2891,22 +2891,22 @@ static int tty_cdev_add(struct tty_driver *driver, dev_t dev,
 }
 
 /**
- *	tty_register_device - register a tty device
- *	@driver: the tty driver that describes the tty device
- *	@index: the index in the tty driver for this tty device
- *	@device: a struct device that is associated with this tty device.
- *		This field is optional, if there is no known struct device
- *		for this tty device it can be set to NULL safely.
+ * tty_register_device() - register a tty device
+ * @driver: the tty driver that describes the tty device
+ * @index: the index in the tty driver for this tty device
+ * @device: a struct device that is associated with this tty device.
+ *          This field is optional, if there is no known struct device
+ *          for this tty device it can be set to NULL safely.
  *
- *	Returns a pointer to the struct device for this tty device
- *	(or ERR_PTR(-EFOO) on error).
+ * Returns a pointer to the struct device for this tty device
+ * (or ERR_PTR(-EFOO) on error).
  *
- *	This call is required to be made to register an individual tty device
- *	if the tty driver's flags have the TTY_DRIVER_DYNAMIC_DEV bit set.  If
- *	that bit is not set, this function should not be called by a tty
- *	driver.
+ * This call is required to be made to register an individual tty device
+ * if the tty driver's flags have the TTY_DRIVER_DYNAMIC_DEV bit set.  If
+ * that bit is not set, this function should not be called by a tty
+ * driver.
  *
- *	Locking: ??
+ * Locking: ??
  */
 
 struct device *tty_register_device(struct tty_driver *driver, unsigned index,
@@ -2923,24 +2923,24 @@ static void tty_device_create_release(struct device *dev)
 }
 
 /**
- *	tty_register_device_attr - register a tty device
- *	@driver: the tty driver that describes the tty device
- *	@index: the index in the tty driver for this tty device
- *	@device: a struct device that is associated with this tty device.
- *		This field is optional, if there is no known struct device
- *		for this tty device it can be set to NULL safely.
- *	@drvdata: Driver data to be set to device.
- *	@attr_grp: Attribute group to be set on device.
+ * tty_register_device_attr() - register a tty device
+ * @driver: the tty driver that describes the tty device
+ * @index: the index in the tty driver for this tty device
+ * @device: a struct device that is associated with this tty device.
+ *          This field is optional, if there is no known struct device
+ *          for this tty device it can be set to NULL safely.
+ * @drvdata: Driver data to be set to device.
+ * @attr_grp: Attribute group to be set on device.
  *
- *	Returns a pointer to the struct device for this tty device
- *	(or ERR_PTR(-EFOO) on error).
+ * Returns a pointer to the struct device for this tty device
+ * (or ERR_PTR(-EFOO) on error).
  *
- *	This call is required to be made to register an individual tty device
- *	if the tty driver's flags have the TTY_DRIVER_DYNAMIC_DEV bit set.  If
- *	that bit is not set, this function should not be called by a tty
- *	driver.
+ * This call is required to be made to register an individual tty device
+ * if the tty driver's flags have the TTY_DRIVER_DYNAMIC_DEV bit set.  If
+ * that bit is not set, this function should not be called by a tty
+ * driver.
  *
- *	Locking: ??
+ * Locking: ??
  */
 struct device *tty_register_device_attr(struct tty_driver *driver,
 				   unsigned index, struct device *device,
@@ -3013,14 +3013,14 @@ struct device *tty_register_device_attr(struct tty_driver *driver,
 EXPORT_SYMBOL_GPL(tty_register_device_attr);
 
 /**
- *	tty_unregister_device - unregister a tty device
- *	@driver: the tty driver that describes the tty device
- *	@index: the index in the tty driver for this tty device
+ * tty_unregister_device() - unregister a tty device
+ * @driver: the tty driver that describes the tty device
+ * @index: the index in the tty driver for this tty device
  *
- *	If a tty device is registered with a call to tty_register_device() then
- *	this function must be called when the tty device is gone.
+ * If a tty device is registered with a call to tty_register_device() then
+ * this function must be called when the tty device is gone.
  *
- *	Locking: ??
+ * Locking: ??
  */
 
 void tty_unregister_device(struct tty_driver *driver, unsigned index)
@@ -3035,7 +3035,7 @@ void tty_unregister_device(struct tty_driver *driver, unsigned index)
 EXPORT_SYMBOL(tty_unregister_device);
 
 /**
- * __tty_alloc_driver -- allocate tty driver
+ * __tty_alloc_driver() -- allocate tty driver
  * @lines: count of lines this driver can handle at most
  * @owner: module which is responsible for this driver
  * @flags: some of TTY_DRIVER_* flags, will be set in driver->flags
diff --git a/drivers/tty/tty_ioctl.c b/drivers/tty/tty_ioctl.c
index 56426611050d..cb72dc6085d8 100644
--- a/drivers/tty/tty_ioctl.c
+++ b/drivers/tty/tty_ioctl.c
@@ -45,12 +45,12 @@
 
 
 /**
- *	tty_chars_in_buffer	-	characters pending
- *	@tty: terminal
+ * tty_chars_in_buffer() - characters pending
+ * @tty: terminal
  *
- *	Return the number of bytes of data in the device private
- *	output queue. If no private method is supplied there is assumed
- *	to be no queue on the device.
+ * Return the number of bytes of data in the device private
+ * output queue. If no private method is supplied there is assumed
+ * to be no queue on the device.
  */
 
 int tty_chars_in_buffer(struct tty_struct *tty)
@@ -63,14 +63,14 @@ int tty_chars_in_buffer(struct tty_struct *tty)
 EXPORT_SYMBOL(tty_chars_in_buffer);
 
 /**
- *	tty_write_room		-	write queue space
- *	@tty: terminal
+ * tty_write_room() - write queue space
+ * @tty: terminal
  *
- *	Return the number of bytes that can be queued to this device
- *	at the present time. The result should be treated as a guarantee
- *	and the driver cannot offer a value it later shrinks by more than
- *	the number of bytes written. If no method is provided 2K is always
- *	returned and data may be lost as there will be no flow control.
+ * Return the number of bytes that can be queued to this device
+ * at the present time. The result should be treated as a guarantee
+ * and the driver cannot offer a value it later shrinks by more than
+ * the number of bytes written. If no method is provided 2K is always
+ * returned and data may be lost as there will be no flow control.
  */
 
 int tty_write_room(struct tty_struct *tty)
@@ -82,12 +82,12 @@ int tty_write_room(struct tty_struct *tty)
 EXPORT_SYMBOL(tty_write_room);
 
 /**
- *	tty_driver_flush_buffer	-	discard internal buffer
- *	@tty: terminal
+ * tty_driver_flush_buffer() - discard internal buffer
+ * @tty: terminal
  *
- *	Discard the internal output buffer for this device. If no method
- *	is provided then either the buffer cannot be hardware flushed or
- *	there is no buffer driver side.
+ * Discard the internal output buffer for this device. If no method
+ * is provided then either the buffer cannot be hardware flushed or
+ * there is no buffer driver side.
  */
 void tty_driver_flush_buffer(struct tty_struct *tty)
 {
@@ -97,13 +97,13 @@ void tty_driver_flush_buffer(struct tty_struct *tty)
 EXPORT_SYMBOL(tty_driver_flush_buffer);
 
 /**
- *	tty_throttle		-	flow control
- *	@tty: terminal
+ * tty_throttle() - flow control
+ * @tty: terminal
  *
- *	Indicate that a tty should stop transmitting data down the stack.
- *	Takes the termios rwsem to protect against parallel throttle/unthrottle
- *	and also to ensure the driver can consistently reference its own
- *	termios data at this point when implementing software flow control.
+ * Indicate that a tty should stop transmitting data down the stack.
+ * Takes the termios rwsem to protect against parallel throttle/unthrottle
+ * and also to ensure the driver can consistently reference its own
+ * termios data at this point when implementing software flow control.
  */
 
 void tty_throttle(struct tty_struct *tty)
@@ -119,16 +119,16 @@ void tty_throttle(struct tty_struct *tty)
 EXPORT_SYMBOL(tty_throttle);
 
 /**
- *	tty_unthrottle		-	flow control
- *	@tty: terminal
+ * tty_unthrottle() - flow control
+ * @tty: terminal
  *
- *	Indicate that a tty may continue transmitting data down the stack.
- *	Takes the termios rwsem to protect against parallel throttle/unthrottle
- *	and also to ensure the driver can consistently reference its own
- *	termios data at this point when implementing software flow control.
+ * Indicate that a tty may continue transmitting data down the stack.
+ * Takes the termios rwsem to protect against parallel throttle/unthrottle
+ * and also to ensure the driver can consistently reference its own
+ * termios data at this point when implementing software flow control.
  *
- *	Drivers should however remember that the stack can issue a throttle,
- *	then change flow control method, then unthrottle.
+ * Drivers should however remember that the stack can issue a throttle,
+ * then change flow control method, then unthrottle.
  */
 
 void tty_unthrottle(struct tty_struct *tty)
@@ -143,15 +143,15 @@ void tty_unthrottle(struct tty_struct *tty)
 EXPORT_SYMBOL(tty_unthrottle);
 
 /**
- *	tty_throttle_safe	-	flow control
- *	@tty: terminal
+ * tty_throttle_safe() - flow control
+ * @tty: terminal
  *
- *	Similar to tty_throttle() but will only attempt throttle
- *	if tty->flow_change is TTY_THROTTLE_SAFE. Prevents an accidental
- *	throttle due to race conditions when throttling is conditional
- *	on factors evaluated prior to throttling.
+ * Similar to tty_throttle() but will only attempt throttle
+ * if tty->flow_change is TTY_THROTTLE_SAFE. Prevents an accidental
+ * throttle due to race conditions when throttling is conditional
+ * on factors evaluated prior to throttling.
  *
- *	Returns 0 if tty is throttled (or was already throttled)
+ * Returns 0 if tty is throttled (or was already throttled)
  */
 
 int tty_throttle_safe(struct tty_struct *tty)
@@ -174,15 +174,15 @@ int tty_throttle_safe(struct tty_struct *tty)
 }
 
 /**
- *	tty_unthrottle_safe	-	flow control
- *	@tty: terminal
+ * tty_unthrottle_safe() - flow control
+ * @tty: terminal
  *
- *	Similar to tty_unthrottle() but will only attempt unthrottle
- *	if tty->flow_change is TTY_UNTHROTTLE_SAFE. Prevents an accidental
- *	unthrottle due to race conditions when unthrottling is conditional
- *	on factors evaluated prior to unthrottling.
+ * Similar to tty_unthrottle() but will only attempt unthrottle
+ * if tty->flow_change is TTY_UNTHROTTLE_SAFE. Prevents an accidental
+ * unthrottle due to race conditions when unthrottling is conditional
+ * on factors evaluated prior to unthrottling.
  *
- *	Returns 0 if tty is unthrottled (or was already unthrottled)
+ * Returns 0 if tty is unthrottled (or was already unthrottled)
  */
 
 int tty_unthrottle_safe(struct tty_struct *tty)
@@ -205,14 +205,14 @@ int tty_unthrottle_safe(struct tty_struct *tty)
 }
 
 /**
- *	tty_wait_until_sent	-	wait for I/O to finish
- *	@tty: tty we are waiting for
- *	@timeout: how long we will wait
+ * tty_wait_until_sent() - wait for I/O to finish
+ * @tty: tty we are waiting for
+ * @timeout: how long we will wait
  *
- *	Wait for characters pending in a tty driver to hit the wire, or
- *	for a timeout to occur (eg due to flow control)
+ * Wait for characters pending in a tty driver to hit the wire, or
+ * for a timeout to occur (eg due to flow control)
  *
- *	Locking: none
+ * Locking: none
  */
 
 void tty_wait_until_sent(struct tty_struct *tty, long timeout)
@@ -260,14 +260,14 @@ static void unset_locked_termios(struct tty_struct *tty, struct ktermios *old)
 }
 
 /**
- *	tty_termios_copy_hw	-	copy hardware settings
- *	@new: New termios
- *	@old: Old termios
+ * tty_termios_copy_hw() - copy hardware settings
+ * @new: New termios
+ * @old: Old termios
  *
- *	Propagate the hardware specific terminal setting bits from
- *	the old termios structure to the new one. This is used in cases
- *	where the hardware does not support reconfiguration or as a helper
- *	in some cases where only minimal reconfiguration is supported
+ * Propagate the hardware specific terminal setting bits from
+ * the old termios structure to the new one. This is used in cases
+ * where the hardware does not support reconfiguration or as a helper
+ * in some cases where only minimal reconfiguration is supported
  */
 
 void tty_termios_copy_hw(struct ktermios *new, struct ktermios *old)
@@ -282,12 +282,12 @@ void tty_termios_copy_hw(struct ktermios *new, struct ktermios *old)
 EXPORT_SYMBOL(tty_termios_copy_hw);
 
 /**
- *	tty_termios_hw_change	-	check for setting change
- *	@a: termios
- *	@b: termios to compare
+ * tty_termios_hw_change() - check for setting change
+ * @a: termios
+ * @b: termios to compare
  *
- *	Check if any of the bits that affect a dumb device have changed
- *	between the two termios structures, or a speed change is needed.
+ * Check if any of the bits that affect a dumb device have changed
+ * between the two termios structures, or a speed change is needed.
  */
 
 int tty_termios_hw_change(const struct ktermios *a, const struct ktermios *b)
@@ -301,14 +301,14 @@ int tty_termios_hw_change(const struct ktermios *a, const struct ktermios *b)
 EXPORT_SYMBOL(tty_termios_hw_change);
 
 /**
- *	tty_set_termios		-	update termios values
- *	@tty: tty to update
- *	@new_termios: desired new value
+ * tty_set_termios() - update termios values
+ * @tty: tty to update
+ * @new_termios: desired new value
  *
- *	Perform updates to the termios values set on this terminal.
- *	A master pty's termios should never be set.
+ * Perform updates to the termios values set on this terminal.
+ * A master pty's termios should never be set.
  *
- *	Locking: termios_rwsem
+ * Locking: termios_rwsem
  */
 
 int tty_set_termios(struct tty_struct *tty, struct ktermios *new_termios)
@@ -319,7 +319,7 @@ int tty_set_termios(struct tty_struct *tty, struct ktermios *new_termios)
 	WARN_ON(tty->driver->type == TTY_DRIVER_TYPE_PTY &&
 		tty->driver->subtype == PTY_TYPE_MASTER);
 	/*
-	 *	Perform the actual termios internal changes under lock.
+	 * Perform the actual termios internal changes under lock.
 	 */
 
 
@@ -347,16 +347,16 @@ int tty_set_termios(struct tty_struct *tty, struct ktermios *new_termios)
 EXPORT_SYMBOL_GPL(tty_set_termios);
 
 /**
- *	set_termios		-	set termios values for a tty
- *	@tty: terminal device
- *	@arg: user data
- *	@opt: option information
+ * set_termios() - set termios values for a tty
+ * @tty: terminal device
+ * @arg: user data
+ * @opt: option information
  *
- *	Helper function to prepare termios data and run necessary other
- *	functions before using tty_set_termios to do the actual changes.
+ * Helper function to prepare termios data and run necessary other
+ * functions before using tty_set_termios to do the actual changes.
  *
- *	Locking:
- *		Called functions take ldisc and termios_rwsem locks
+ * Locking:
+ *         Called functions take ldisc and termios_rwsem locks
  */
 
 static int set_termios(struct tty_struct *tty, void __user *arg, int opt)
@@ -447,13 +447,13 @@ static int get_termio(struct tty_struct *tty, struct termio __user *termio)
 #ifdef TCGETX
 
 /**
- *	set_termiox	-	set termiox fields if possible
- *	@tty: terminal
- *	@arg: termiox structure from user
- *	@opt: option flags for ioctl type
+ * set_termiox() - set termiox fields if possible
+ * @tty: terminal
+ * @arg: termiox structure from user
+ * @opt: option flags for ioctl type
  *
- *	Implement the device calling points for the SYS5 termiox ioctl
- *	interface in Linux
+ * Implement the device calling points for the SYS5 termiox ioctl
+ * interface in Linux
  */
 
 static int set_termiox(struct tty_struct *tty, void __user *arg, int opt)
@@ -554,14 +554,14 @@ static void set_sgflags(struct ktermios *termios, int flags)
 }
 
 /**
- *	set_sgttyb		-	set legacy terminal values
- *	@tty: tty structure
- *	@sgttyb: pointer to old style terminal structure
+ * set_sgttyb() - set legacy terminal values
+ * @tty: tty structure
+ * @sgttyb: pointer to old style terminal structure
  *
- *	Updates a terminal from the legacy BSD style terminal information
- *	structure.
+ * Updates a terminal from the legacy BSD style terminal information
+ * structure.
  *
- *	Locking: termios_rwsem
+ * Locking: termios_rwsem
  */
 
 static int set_sgttyb(struct tty_struct *tty, struct sgttyb __user *sgttyb)
@@ -667,12 +667,12 @@ static int set_ltchars(struct tty_struct *tty, struct ltchars __user *ltchars)
 #endif
 
 /**
- *	tty_change_softcar	-	carrier change ioctl helper
- *	@tty: tty to update
- *	@arg: enable/disable CLOCAL
+ * tty_change_softcar() - carrier change ioctl helper
+ * @tty: tty to update
+ * @arg: enable/disable CLOCAL
  *
- *	Perform a change to the CLOCAL state and call into the driver
- *	layer to make it visible. All done with the termios rwsem
+ * Perform a change to the CLOCAL state and call into the driver
+ * layer to make it visible. All done with the termios rwsem
  */
 
 static int tty_change_softcar(struct tty_struct *tty, int arg)
@@ -694,15 +694,15 @@ static int tty_change_softcar(struct tty_struct *tty, int arg)
 }
 
 /**
- *	tty_mode_ioctl		-	mode related ioctls
- *	@tty: tty for the ioctl
- *	@file: file pointer for the tty
- *	@cmd: command
- *	@arg: ioctl argument
+ * tty_mode_ioctl() - mode related ioctls
+ * @tty: tty for the ioctl
+ * @file: file pointer for the tty
+ * @cmd: command
+ * @arg: ioctl argument
  *
- *	Perform non line discipline specific mode control ioctls. This
- *	is designed to be called by line disciplines to ensure they provide
- *	consistent mode setting.
+ * Perform non line discipline specific mode control ioctls. This
+ * is designed to be called by line disciplines to ensure they provide
+ * consistent mode setting.
  */
 
 int tty_mode_ioctl(struct tty_struct *tty, struct file *file,
diff --git a/drivers/tty/tty_jobctrl.c b/drivers/tty/tty_jobctrl.c
index 6155cc7b3f56..3b5c822d360d 100644
--- a/drivers/tty/tty_jobctrl.c
+++ b/drivers/tty/tty_jobctrl.c
@@ -19,14 +19,14 @@ static int is_ignored(int sig)
 }
 
 /**
- *	tty_check_change	-	check for POSIX terminal changes
- *	@tty: tty to check
+ * tty_check_change() - check for POSIX terminal changes
+ * @tty: tty to check
  *
- *	If we try to write to, or set the state of, a terminal and we're
- *	not in the foreground, send a SIGTTOU.  If the signal is blocked or
- *	ignored, go ahead and perform the operation.  (POSIX 7.2)
+ * If we try to write to, or set the state of, a terminal and we're
+ * not in the foreground, send a SIGTTOU.  If the signal is blocked or
+ * ignored, go ahead and perform the operation.  (POSIX 7.2)
  *
- *	Locking: ctrl_lock
+ * Locking: ctrl_lock
  */
 int __tty_check_change(struct tty_struct *tty, int sig)
 {
@@ -82,14 +82,14 @@ void proc_clear_tty(struct task_struct *p)
 }
 
 /**
- * proc_set_tty -  set the controlling terminal
+ * proc_set_tty() - set the controlling terminal
  *
  * Only callable by the session leader and only if it does not already have
  * a controlling terminal.
  *
  * Caller must hold:  tty_lock()
- *		      a readlock on tasklist_lock
- *		      sighand lock
+ *                    a readlock on tasklist_lock
+ *                    sighand lock
  */
 static void __proc_set_tty(struct tty_struct *tty)
 {
@@ -177,16 +177,16 @@ void session_clear_tty(struct pid *session)
 }
 
 /**
- *	tty_signal_session_leader	- sends SIGHUP to session leader
- *	@tty		controlling tty
- *	@exit_session	if non-zero, signal all foreground group processes
+ * tty_signal_session_leader() - sends SIGHUP to session leader
+ * @tty controlling tty
+ * @exit_session if non-zero, signal all foreground group processes
  *
- *	Send SIGHUP and SIGCONT to the session leader and its process group.
- *	Optionally, signal all processes in the foreground process group.
+ * Send SIGHUP and SIGCONT to the session leader and its process group.
+ * Optionally, signal all processes in the foreground process group.
  *
- *	Returns the number of processes in the session with this tty
- *	as their controlling terminal. This value is used to drop
- *	tty references for those processes.
+ * Returns the number of processes in the session with this tty
+ * as their controlling terminal. This value is used to drop
+ * tty references for those processes.
  */
 int tty_signal_session_leader(struct tty_struct *tty, int exit_session)
 {
@@ -231,28 +231,28 @@ int tty_signal_session_leader(struct tty_struct *tty, int exit_session)
 }
 
 /**
- *	disassociate_ctty	-	disconnect controlling tty
- *	@on_exit: true if exiting so need to "hang up" the session
+ * disassociate_ctty() - disconnect controlling tty
+ * @on_exit: true if exiting so need to "hang up" the session
  *
- *	This function is typically called only by the session leader, when
- *	it wants to disassociate itself from its controlling tty.
+ * This function is typically called only by the session leader, when
+ * it wants to disassociate itself from its controlling tty.
  *
- *	It performs the following functions:
+ * It performs the following functions:
  *	(1)  Sends a SIGHUP and SIGCONT to the foreground process group
  *	(2)  Clears the tty from being controlling the session
  *	(3)  Clears the controlling tty for all processes in the
  *		session group.
  *
- *	The argument on_exit is set to 1 if called when a process is
- *	exiting; it is 0 if called by the ioctl TIOCNOTTY.
+ * The argument on_exit is set to 1 if called when a process is
+ * exiting; it is 0 if called by the ioctl TIOCNOTTY.
  *
- *	Locking:
- *		BTM is taken for hysterical raisons, and held when
- *		  called from no_tty().
- *		  tty_mutex is taken to protect tty
- *		  ->siglock is taken to protect ->signal/->sighand
- *		  tasklist_lock is taken to walk process list for sessions
- *		    ->siglock is taken to protect ->signal/->sighand
+ * Locking:
+ *	BTM is taken for hysterical raisons, and held when
+ *	  called from no_tty().
+ *	  tty_mutex is taken to protect tty
+ *	  ->siglock is taken to protect ->signal/->sighand
+ *	  tasklist_lock is taken to walk process list for sessions
+ *	    ->siglock is taken to protect ->signal/->sighand
  */
 void disassociate_ctty(int on_exit)
 {
@@ -315,7 +315,7 @@ void disassociate_ctty(int on_exit)
 
 /**
  *
- *	no_tty	- Ensure the current process does not have a controlling tty
+ * no_tty() - Ensure the current process does not have a controlling tty
  */
 void no_tty(void)
 {
@@ -328,17 +328,17 @@ void no_tty(void)
 }
 
 /**
- *	tiocsctty	-	set controlling tty
- *	@tty: tty structure
- *	@arg: user argument
+ * tiocsctty() - set controlling tty
+ * @tty: tty structure
+ * @arg: user argument
  *
- *	This ioctl is used to manage job control. It permits a session
- *	leader to set this tty as the controlling tty for the session.
+ * This ioctl is used to manage job control. It permits a session
+ * leader to set this tty as the controlling tty for the session.
  *
- *	Locking:
- *		Takes tty_lock() to serialize proc_set_tty() for this tty
- *		Takes tasklist_lock internally to walk sessions
- *		Takes ->siglock() when updating signal->tty
+ * Locking:
+ *         Takes tty_lock() to serialize proc_set_tty() for this tty
+ *         Takes tasklist_lock internally to walk sessions
+ *         Takes ->siglock() when updating signal->tty
  */
 static int tiocsctty(struct tty_struct *tty, struct file *file, int arg)
 {
@@ -389,11 +389,11 @@ static int tiocsctty(struct tty_struct *tty, struct file *file, int arg)
 }
 
 /**
- *	tty_get_pgrp	-	return a ref counted pgrp pid
- *	@tty: tty to read
+ * tty_get_pgrp() - return a ref counted pgrp pid
+ * @tty: tty to read
  *
- *	Returns a refcounted instance of the pid struct for the process
- *	group controlling the tty.
+ * Returns a refcounted instance of the pid struct for the process
+ * group controlling the tty.
  */
 struct pid *tty_get_pgrp(struct tty_struct *tty)
 {
@@ -430,15 +430,15 @@ static struct pid *session_of_pgrp(struct pid *pgrp)
 }
 
 /**
- *	tiocgpgrp		-	get process group
- *	@tty: tty passed by user
- *	@real_tty: tty side of the tty passed by the user if a pty else the tty
- *	@p: returned pid
+ * tiocgpgrp() - get process group
+ * @tty: tty passed by user
+ * @real_tty: tty side of the tty passed by the user if a pty else the tty
+ * @p: returned pid
  *
- *	Obtain the process group of the tty. If there is no process group
- *	return an error.
+ * Obtain the process group of the tty. If there is no process group
+ * return an error.
  *
- *	Locking: none. Reference to current->signal->tty is safe.
+ * Locking: none. Reference to current->signal->tty is safe.
  */
 static int tiocgpgrp(struct tty_struct *tty, struct tty_struct *real_tty, pid_t __user *p)
 {
@@ -457,15 +457,15 @@ static int tiocgpgrp(struct tty_struct *tty, struct tty_struct *real_tty, pid_t
 }
 
 /**
- *	tiocspgrp		-	attempt to set process group
- *	@tty: tty passed by user
- *	@real_tty: tty side device matching tty passed by user
- *	@p: pid pointer
+ * tiocspgrp() - attempt to set process group
+ * @tty: tty passed by user
+ * @real_tty: tty side device matching tty passed by user
+ * @p: pid pointer
  *
- *	Set the process group of the tty to the session passed. Only
- *	permitted where the tty session is our session.
+ * Set the process group of the tty to the session passed. Only
+ * permitted where the tty session is our session.
  *
- *	Locking: RCU, ctrl lock
+ * Locking: RCU, ctrl lock
  */
 static int tiocspgrp(struct tty_struct *tty, struct tty_struct *real_tty, pid_t __user *p)
 {
@@ -504,15 +504,15 @@ static int tiocspgrp(struct tty_struct *tty, struct tty_struct *real_tty, pid_t
 }
 
 /**
- *	tiocgsid		-	get session id
- *	@tty: tty passed by user
- *	@real_tty: tty side of the tty passed by the user if a pty else the tty
- *	@p: pointer to returned session id
+ * tiocgsid() - get session id
+ * @tty: tty passed by user
+ * @real_tty: tty side of the tty passed by the user if a pty else the tty
+ * @p: pointer to returned session id
  *
- *	Obtain the session id of the tty. If there is no session
- *	return an error.
+ * Obtain the session id of the tty. If there is no session
+ * return an error.
  *
- *	Locking: none. Reference to current->signal->tty is safe.
+ * Locking: none. Reference to current->signal->tty is safe.
  */
 static int tiocgsid(struct tty_struct *tty, struct tty_struct *real_tty, pid_t __user *p)
 {
diff --git a/drivers/tty/tty_ldisc.c b/drivers/tty/tty_ldisc.c
index fc4c97cae01e..d86c4c516f25 100644
--- a/drivers/tty/tty_ldisc.c
+++ b/drivers/tty/tty_ldisc.c
@@ -46,16 +46,16 @@ static DEFINE_RAW_SPINLOCK(tty_ldiscs_lock);
 static struct tty_ldisc_ops *tty_ldiscs[NR_LDISCS];
 
 /**
- *	tty_register_ldisc	-	install a line discipline
- *	@disc: ldisc number
- *	@new_ldisc: pointer to the ldisc object
+ * tty_register_ldisc() - install a line discipline
+ * @disc: ldisc number
+ * @new_ldisc: pointer to the ldisc object
  *
- *	Installs a new line discipline into the kernel. The discipline
- *	is set up as unreferenced and then made available to the kernel
- *	from this point onwards.
+ * Installs a new line discipline into the kernel. The discipline
+ * is set up as unreferenced and then made available to the kernel
+ * from this point onwards.
  *
- *	Locking:
- *		takes tty_ldiscs_lock to guard against ldisc races
+ * Locking:
+ *         takes tty_ldiscs_lock to guard against ldisc races
  */
 
 int tty_register_ldisc(int disc, struct tty_ldisc_ops *new_ldisc)
@@ -77,15 +77,15 @@ int tty_register_ldisc(int disc, struct tty_ldisc_ops *new_ldisc)
 EXPORT_SYMBOL(tty_register_ldisc);
 
 /**
- *	tty_unregister_ldisc	-	unload a line discipline
- *	@disc: ldisc number
- *	@new_ldisc: pointer to the ldisc object
+ * tty_unregister_ldisc() - unload a line discipline
+ * @disc: ldisc number
+ * @new_ldisc: pointer to the ldisc object
  *
- *	Remove a line discipline from the kernel providing it is not
- *	currently in use.
+ * Remove a line discipline from the kernel providing it is not
+ * currently in use.
  *
- *	Locking:
- *		takes tty_ldiscs_lock to guard against ldisc races
+ * Locking:
+ *         takes tty_ldiscs_lock to guard against ldisc races
  */
 
 int tty_unregister_ldisc(int disc)
@@ -137,23 +137,23 @@ static void put_ldops(struct tty_ldisc_ops *ldops)
 }
 
 /**
- *	tty_ldisc_get		-	take a reference to an ldisc
- *	@disc: ldisc number
+ * tty_ldisc_get() - take a reference to an ldisc
+ * @disc: ldisc number
  *
- *	Takes a reference to a line discipline. Deals with refcounts and
- *	module locking counts.
+ * Takes a reference to a line discipline. Deals with refcounts and
+ * module locking counts.
  *
- *	Returns: -EINVAL if the discipline index is not [N_TTY..NR_LDISCS] or
- *			 if the discipline is not registered
- *		 -EAGAIN if request_module() failed to load or register the
- *			 the discipline
- *		 -ENOMEM if allocation failure
+ * Returns: -EINVAL if the discipline index is not [N_TTY..NR_LDISCS] or
+ *                  if the discipline is not registeredn
+ *          -EAGAIN if request_module() failed to load or register the
+ *                  the discipline
+ *          -ENOMEM if allocation failure
  *
- *		 Otherwise, returns a pointer to the discipline and bumps the
- *		 ref count
+ *          Otherwise, returns a pointer to the discipline and bumps the
+ *          ref count
  *
- *	Locking:
- *		takes tty_ldiscs_lock to guard against ldisc races
+ * Locking:
+ *         takes tty_ldiscs_lock to guard against ldisc races
  */
 
 static struct tty_ldisc *tty_ldisc_get(struct tty_struct *tty, int disc)
@@ -188,9 +188,9 @@ static struct tty_ldisc *tty_ldisc_get(struct tty_struct *tty, int disc)
 }
 
 /**
- *	tty_ldisc_put		-	release the ldisc
+ * tty_ldisc_put() - release the ldisc
  *
- *	Complement of tty_ldisc_get().
+ * Complement of tty_ldisc_get().
  */
 static void tty_ldisc_put(struct tty_ldisc *ld)
 {
@@ -237,23 +237,23 @@ const struct seq_operations tty_ldiscs_seq_ops = {
 };
 
 /**
- *	tty_ldisc_ref_wait	-	wait for the tty ldisc
- *	@tty: tty device
+ * tty_ldisc_ref_wait() - wait for the tty ldisc
+ * @tty: tty device
  *
- *	Dereference the line discipline for the terminal and take a
- *	reference to it. If the line discipline is in flux then
- *	wait patiently until it changes.
+ * Dereference the line discipline for the terminal and take a
+ * reference to it. If the line discipline is in flux then
+ * wait patiently until it changes.
  *
- *	Returns: NULL if the tty has been hungup and not re-opened with
- *		 a new file descriptor, otherwise valid ldisc reference
+ * Returns: NULL if the tty has been hungup and not re-opened with
+ *          a new file descriptor, otherwise valid ldisc reference
  *
- *	Note: Must not be called from an IRQ/timer context. The caller
- *	must also be careful not to hold other locks that will deadlock
- *	against a discipline change, such as an existing ldisc reference
- *	(which we check for)
+ * Note: Must not be called from an IRQ/timer context. The caller
+ * must also be careful not to hold other locks that will deadlock
+ * against a discipline change, such as an existing ldisc reference
+ * (which we check for)
  *
- *	Note: a file_operations routine (read/poll/write) should use this
- *	function to wait for any ldisc lifetime events to finish.
+ * Note: a file_operations routine (read/poll/write) should use this
+ * function to wait for any ldisc lifetime events to finish.
  */
 
 struct tty_ldisc *tty_ldisc_ref_wait(struct tty_struct *tty)
@@ -269,12 +269,12 @@ struct tty_ldisc *tty_ldisc_ref_wait(struct tty_struct *tty)
 EXPORT_SYMBOL_GPL(tty_ldisc_ref_wait);
 
 /**
- *	tty_ldisc_ref		-	get the tty ldisc
- *	@tty: tty device
+ * tty_ldisc_ref() - get the tty ldisc
+ * @tty: tty device
  *
- *	Dereference the line discipline for the terminal and take a
- *	reference to it. If the line discipline is in flux then
- *	return NULL. Can be called from IRQ and timer functions.
+ * Dereference the line discipline for the terminal and take a
+ * reference to it. If the line discipline is in flux then
+ * return NULL. Can be called from IRQ and timer functions.
  */
 
 struct tty_ldisc *tty_ldisc_ref(struct tty_struct *tty)
@@ -291,11 +291,11 @@ struct tty_ldisc *tty_ldisc_ref(struct tty_struct *tty)
 EXPORT_SYMBOL_GPL(tty_ldisc_ref);
 
 /**
- *	tty_ldisc_deref		-	free a tty ldisc reference
- *	@ld: reference to free up
+ * tty_ldisc_deref() - free a tty ldisc reference
+ * @ld: reference to free up
  *
- *	Undoes the effect of tty_ldisc_ref or tty_ldisc_ref_wait. May
- *	be called in IRQ context.
+ * Undoes the effect of tty_ldisc_ref or tty_ldisc_ref_wait. May
+ * be called in IRQ context.
  */
 
 void tty_ldisc_deref(struct tty_ldisc *ld)
@@ -390,11 +390,11 @@ static void tty_ldisc_unlock_pair(struct tty_struct *tty,
 }
 
 /**
- *	tty_ldisc_flush	-	flush line discipline queue
- *	@tty: tty
+ * tty_ldisc_flush() - flush line discipline queue
+ * @tty: tty
  *
- *	Flush the line discipline queue (if any) and the tty flip buffers
- *	for this tty.
+ * Flush the line discipline queue (if any) and the tty flip buffers
+ * for this tty.
  */
 
 void tty_ldisc_flush(struct tty_struct *tty)
@@ -408,19 +408,19 @@ void tty_ldisc_flush(struct tty_struct *tty)
 EXPORT_SYMBOL_GPL(tty_ldisc_flush);
 
 /**
- *	tty_set_termios_ldisc		-	set ldisc field
- *	@tty: tty structure
- *	@disc: line discipline number
+ * tty_set_termios_ldisc() - set ldisc field
+ * @tty: tty structure
+ * @disc: line discipline number
  *
- *	This is probably overkill for real world processors but
- *	they are not on hot paths so a little discipline won't do
- *	any harm.
+ * This is probably overkill for real world processors but
+ * they are not on hot paths so a little discipline won't do
+ * any harm.
  *
- *	The line discipline-related tty_struct fields are reset to
- *	prevent the ldisc driver from re-using stale information for
- *	the new ldisc instance.
+ * The line discipline-related tty_struct fields are reset to
+ * prevent the ldisc driver from re-using stale information for
+ * the new ldisc instance.
  *
- *	Locking: takes termios_rwsem
+ * Locking: takes termios_rwsem
  */
 
 static void tty_set_termios_ldisc(struct tty_struct *tty, int disc)
@@ -434,14 +434,14 @@ static void tty_set_termios_ldisc(struct tty_struct *tty, int disc)
 }
 
 /**
- *	tty_ldisc_open		-	open a line discipline
- *	@tty: tty we are opening the ldisc on
- *	@ld: discipline to open
+ * tty_ldisc_open() - open a line discipline
+ * @tty: tty we are opening the ldisc on
+ * @ld: discipline to open
  *
- *	A helper opening method. Also a convenient debugging and check
- *	point.
+ * A helper opening method. Also a convenient debugging and check
+ * point.
  *
- *	Locking: always called with BTM already held.
+ * Locking: always called with BTM already held.
  */
 
 static int tty_ldisc_open(struct tty_struct *tty, struct tty_ldisc *ld)
@@ -461,12 +461,12 @@ static int tty_ldisc_open(struct tty_struct *tty, struct tty_ldisc *ld)
 }
 
 /**
- *	tty_ldisc_close		-	close a line discipline
- *	@tty: tty we are opening the ldisc on
- *	@ld: discipline to close
+ * tty_ldisc_close() - close a line discipline
+ * @tty: tty we are opening the ldisc on
+ * @ld: discipline to close
  *
- *	A helper close method. Also a convenient debugging and check
- *	point.
+ * A helper close method. Also a convenient debugging and check
+ * point.
  */
 
 static void tty_ldisc_close(struct tty_struct *tty, struct tty_ldisc *ld)
@@ -479,12 +479,12 @@ static void tty_ldisc_close(struct tty_struct *tty, struct tty_ldisc *ld)
 }
 
 /**
- *	tty_ldisc_failto	-	helper for ldisc failback
- *	@tty: tty to open the ldisc on
- *	@ld: ldisc we are trying to fail back to
+ * tty_ldisc_failto() - helper for ldisc failback
+ * @tty: tty to open the ldisc on
+ * @ld: ldisc we are trying to fail back to
  *
- *	Helper to try and recover a tty when switching back to the old
- *	ldisc fails and we need something attached.
+ * Helper to try and recover a tty when switching back to the old
+ * ldisc fails and we need something attached.
  */
 
 static int tty_ldisc_failto(struct tty_struct *tty, int ld)
@@ -502,12 +502,12 @@ static int tty_ldisc_failto(struct tty_struct *tty, int ld)
 }
 
 /**
- *	tty_ldisc_restore	-	helper for tty ldisc change
- *	@tty: tty to recover
- *	@old: previous ldisc
+ * tty_ldisc_restore() - helper for tty ldisc change
+ * @tty: tty to recover
+ * @old: previous ldisc
  *
- *	Restore the previous line discipline or N_TTY when a line discipline
- *	change fails due to an open error
+ * Restore the previous line discipline or N_TTY when a line discipline
+ * change fails due to an open error
  */
 
 static void tty_ldisc_restore(struct tty_struct *tty, struct tty_ldisc *old)
@@ -527,14 +527,14 @@ static void tty_ldisc_restore(struct tty_struct *tty, struct tty_ldisc *old)
 }
 
 /**
- *	tty_set_ldisc		-	set line discipline
- *	@tty: the terminal to set
- *	@ldisc: the line discipline
- *
- *	Set the discipline of a tty line. Must be called from a process
- *	context. The ldisc change logic has to protect itself against any
- *	overlapping ldisc change (including on the other end of pty pairs),
- *	the close of one side of a tty/pty pair, and eventually hangup.
+ * tty_set_ldisc() - set line discipline
+ * @tty: the terminal to set
+ * @ldisc: the line discipline
+ *
+ * Set the discipline of a tty line. Must be called from a process
+ * context. The ldisc change logic has to protect itself against any
+ * overlapping ldisc change (including on the other end of pty pairs),
+ * the close of one side of a tty/pty pair, and eventually hangup.
  */
 
 int tty_set_ldisc(struct tty_struct *tty, int disc)
@@ -608,10 +608,10 @@ int tty_set_ldisc(struct tty_struct *tty, int disc)
 EXPORT_SYMBOL_GPL(tty_set_ldisc);
 
 /**
- *	tty_ldisc_kill	-	teardown ldisc
- *	@tty: tty being released
+ * tty_ldisc_kill() - teardown ldisc
+ * @tty: tty being released
  *
- *	Perform final close of the ldisc and reset tty->ldisc
+ * Perform final close of the ldisc and reset tty->ldisc
  */
 static void tty_ldisc_kill(struct tty_struct *tty)
 {
@@ -627,10 +627,10 @@ static void tty_ldisc_kill(struct tty_struct *tty)
 }
 
 /**
- *	tty_reset_termios	-	reset terminal state
- *	@tty: tty to reset
+ * tty_reset_termios() - reset terminal state
+ * @tty: tty to reset
  *
- *	Restore a terminal to the driver default state.
+ * Restore a terminal to the driver default state.
  */
 
 static void tty_reset_termios(struct tty_struct *tty)
@@ -644,17 +644,17 @@ static void tty_reset_termios(struct tty_struct *tty)
 
 
 /**
- *	tty_ldisc_reinit	-	reinitialise the tty ldisc
- *	@tty: tty to reinit
- *	@disc: line discipline to reinitialize
+ * tty_ldisc_reinit() - reinitialise the tty ldisc
+ * @tty: tty to reinit
+ * @disc: line discipline to reinitialize
  *
- *	Completely reinitialize the line discipline state, by closing the
- *	current instance, if there is one, and opening a new instance. If
- *	an error occurs opening the new non-N_TTY instance, the instance
- *	is dropped and tty->ldisc reset to NULL. The caller can then retry
- *	with N_TTY instead.
+ * Completely reinitialize the line discipline state, by closing the
+ * current instance, if there is one, and opening a new instance. If
+ * an error occurs opening the new non-N_TTY instance, the instance
+ * is dropped and tty->ldisc reset to NULL. The caller can then retry
+ * with N_TTY instead.
  *
- *	Returns 0 if successful, otherwise error code < 0
+ * Returns 0 if successful, otherwise error code < 0
  */
 
 int tty_ldisc_reinit(struct tty_struct *tty, int disc)
@@ -685,18 +685,18 @@ int tty_ldisc_reinit(struct tty_struct *tty, int disc)
 }
 
 /**
- *	tty_ldisc_hangup		-	hangup ldisc reset
- *	@tty: tty being hung up
+ * tty_ldisc_hangup() - hangup ldisc reset
+ * @tty: tty being hung up
  *
- *	Some tty devices reset their termios when they receive a hangup
- *	event. In that situation we must also switch back to N_TTY properly
- *	before we reset the termios data.
+ * Some tty devices reset their termios when they receive a hangup
+ * event. In that situation we must also switch back to N_TTY properly
+ * before we reset the termios data.
  *
- *	Locking: We can take the ldisc mutex as the rest of the code is
- *	careful to allow for this.
+ * Locking: We can take the ldisc mutex as the rest of the code is
+ * careful to allow for this.
  *
- *	In the pty pair case this occurs in the close() path of the
- *	tty itself so we must be careful about locking rules.
+ * In the pty pair case this occurs in the close() path of the
+ * tty itself so we must be careful about locking rules.
  */
 
 void tty_ldisc_hangup(struct tty_struct *tty, bool reinit)
@@ -744,13 +744,13 @@ void tty_ldisc_hangup(struct tty_struct *tty, bool reinit)
 }
 
 /**
- *	tty_ldisc_setup			-	open line discipline
- *	@tty: tty being shut down
- *	@o_tty: pair tty for pty/tty pairs
+ * tty_ldisc_setup() - open line discipline
+ * @tty: tty being shut down
+ * @o_tty: pair tty for pty/tty pairs
  *
- *	Called during the initial open of a tty/pty pair in order to set up the
- *	line disciplines and bind them to the tty. This has no locking issues
- *	as the device isn't yet active.
+ * Called during the initial open of a tty/pty pair in order to set up the
+ * line disciplines and bind them to the tty. This has no locking issues
+ * as the device isn't yet active.
  */
 
 int tty_ldisc_setup(struct tty_struct *tty, struct tty_struct *o_tty)
@@ -770,11 +770,11 @@ int tty_ldisc_setup(struct tty_struct *tty, struct tty_struct *o_tty)
 }
 
 /**
- *	tty_ldisc_release		-	release line discipline
- *	@tty: tty being shut down (or one end of pty pair)
+ * tty_ldisc_release() - release line discipline
+ * @tty: tty being shut down (or one end of pty pair)
  *
- *	Called during the final close of a tty or a pty pair in order to shut
- *	down the line discpline layer. On exit, each tty's ldisc is NULL.
+ * Called during the final close of a tty or a pty pair in order to shut
+ * down the line discpline layer. On exit, each tty's ldisc is NULL.
  */
 
 void tty_ldisc_release(struct tty_struct *tty)
@@ -800,11 +800,11 @@ void tty_ldisc_release(struct tty_struct *tty)
 EXPORT_SYMBOL_GPL(tty_ldisc_release);
 
 /**
- *	tty_ldisc_init		-	ldisc setup for new tty
- *	@tty: tty being allocated
+ * tty_ldisc_init() - ldisc setup for new tty
+ * @tty: tty being allocated
  *
- *	Set up the line discipline objects for a newly allocated tty. Note that
- *	the tty structure is not completely set up when this call is made.
+ * Set up the line discipline objects for a newly allocated tty. Note that
+ * the tty structure is not completely set up when this call is made.
  */
 
 int tty_ldisc_init(struct tty_struct *tty)
@@ -817,10 +817,10 @@ int tty_ldisc_init(struct tty_struct *tty)
 }
 
 /**
- *	tty_ldisc_deinit	-	ldisc cleanup for new tty
- *	@tty: tty that was allocated recently
+ * tty_ldisc_deinit() - ldisc cleanup for new tty
+ * @tty: tty that was allocated recently
  *
- *	The tty structure must not becompletely set up (tty_ldisc_setup) when
+ * The tty structure must not becompletely set up (tty_ldisc_setup) when
  *      this call is made.
  */
 void tty_ldisc_deinit(struct tty_struct *tty)
diff --git a/drivers/tty/tty_port.c b/drivers/tty/tty_port.c
index cb6075096a5b..60927a52ec9c 100644
--- a/drivers/tty/tty_port.c
+++ b/drivers/tty/tty_port.c
@@ -74,7 +74,7 @@ void tty_port_init(struct tty_port *port)
 EXPORT_SYMBOL(tty_port_init);
 
 /**
- * tty_port_link_device - link tty and tty_port
+ * tty_port_link_device() - link tty and tty_port
  * @port: tty_port of the device
  * @driver: tty_driver for this device
  * @index: index of the tty
@@ -94,7 +94,7 @@ void tty_port_link_device(struct tty_port *port,
 EXPORT_SYMBOL_GPL(tty_port_link_device);
 
 /**
- * tty_port_register_device - register tty device
+ * tty_port_register_device() - register tty device
  * @port: tty_port of the device
  * @driver: tty_driver for this device
  * @index: index of the tty
@@ -113,7 +113,7 @@ struct device *tty_port_register_device(struct tty_port *port,
 EXPORT_SYMBOL_GPL(tty_port_register_device);
 
 /**
- * tty_port_register_device_attr - register tty device
+ * tty_port_register_device_attr() - register tty device
  * @port: tty_port of the device
  * @driver: tty_driver for this device
  * @index: index of the tty
@@ -137,7 +137,7 @@ struct device *tty_port_register_device_attr(struct tty_port *port,
 EXPORT_SYMBOL_GPL(tty_port_register_device_attr);
 
 /**
- * tty_port_register_device_attr_serdev - register tty or serdev device
+ * tty_port_register_device_attr_serdev() - register tty or serdev device
  * @port: tty_port of the device
  * @driver: tty_driver for this device
  * @index: index of the tty
@@ -169,7 +169,7 @@ struct device *tty_port_register_device_attr_serdev(struct tty_port *port,
 EXPORT_SYMBOL_GPL(tty_port_register_device_attr_serdev);
 
 /**
- * tty_port_register_device_serdev - register tty or serdev device
+ * tty_port_register_device_serdev() - register tty or serdev device
  * @port: tty_port of the device
  * @driver: tty_driver for this device
  * @index: index of the tty
@@ -188,7 +188,7 @@ struct device *tty_port_register_device_serdev(struct tty_port *port,
 EXPORT_SYMBOL_GPL(tty_port_register_device_serdev);
 
 /**
- * tty_port_unregister_device - deregister a tty or serdev device
+ * tty_port_unregister_device() - deregister a tty or serdev device
  * @port: tty_port of the device
  * @driver: tty_driver for this device
  * @index: index of the tty
@@ -235,7 +235,7 @@ void tty_port_free_xmit_buf(struct tty_port *port)
 EXPORT_SYMBOL(tty_port_free_xmit_buf);
 
 /**
- * tty_port_destroy -- destroy inited port
+ * tty_port_destroy() - destroy inited port
  * @port: tty port to be destroyed
  *
  * When a port was initialized using tty_port_init, one has to destroy the
@@ -273,11 +273,11 @@ void tty_port_put(struct tty_port *port)
 EXPORT_SYMBOL(tty_port_put);
 
 /**
- *	tty_port_tty_get	-	get a tty reference
- *	@port: tty port
+ * tty_port_tty_get() - get a tty reference
+ * @port: tty port
  *
- *	Return a refcount protected tty instance or NULL if the port is not
- *	associated with a tty (eg due to close or hangup)
+ * Return a refcount protected tty instance or NULL if the port is not
+ * associated with a tty (eg due to close or hangup)
  */
 struct tty_struct *tty_port_tty_get(struct tty_port *port)
 {
@@ -292,12 +292,12 @@ struct tty_struct *tty_port_tty_get(struct tty_port *port)
 EXPORT_SYMBOL(tty_port_tty_get);
 
 /**
- *	tty_port_tty_set	-	set the tty of a port
- *	@port: tty port
- *	@tty: the tty
+ * tty_port_tty_set() - set the tty of a port
+ * @port: tty port
+ * @tty: the tty
  *
- *	Associate the port and tty pair. Manages any internal refcounts.
- *	Pass NULL to deassociate a port
+ * Associate the port and tty pair. Manages any internal refcounts.
+ * Pass NULL to deassociate a port
  */
 void tty_port_tty_set(struct tty_port *port, struct tty_struct *tty)
 {
@@ -333,13 +333,13 @@ static void tty_port_shutdown(struct tty_port *port, struct tty_struct *tty)
 }
 
 /**
- *	tty_port_hangup		-	hangup helper
- *	@port: tty port
+ * tty_port_hangup() - hangup helper
+ * @port: tty port
  *
- *	Perform port level tty hangup flag and count changes. Drop the tty
- *	reference.
+ * Perform port level tty hangup flag and count changes. Drop the tty
+ * reference.
  *
- *	Caller holds tty lock.
+ * Caller holds tty lock.
  */
 void tty_port_hangup(struct tty_port *port)
 {
@@ -362,7 +362,7 @@ void tty_port_hangup(struct tty_port *port)
 EXPORT_SYMBOL(tty_port_hangup);
 
 /**
- * tty_port_tty_hangup - helper to hang up a tty
+ * tty_port_tty_hangup() - helper to hang up a tty
  *
  * @port: tty port
  * @check_clocal: hang only ttys with CLOCAL unset?
@@ -378,7 +378,7 @@ void tty_port_tty_hangup(struct tty_port *port, bool check_clocal)
 EXPORT_SYMBOL_GPL(tty_port_tty_hangup);
 
 /**
- * tty_port_tty_wakeup - helper to wake up a tty
+ * tty_port_tty_wakeup() - helper to wake up a tty
  *
  * @port: tty port
  */
@@ -389,12 +389,12 @@ void tty_port_tty_wakeup(struct tty_port *port)
 EXPORT_SYMBOL_GPL(tty_port_tty_wakeup);
 
 /**
- *	tty_port_carrier_raised	-	carrier raised check
- *	@port: tty port
+ * tty_port_carrier_raised() - carrier raised check
+ * @port: tty port
  *
- *	Wrapper for the carrier detect logic. For the moment this is used
- *	to hide some internal details. This will eventually become entirely
- *	internal to the tty port.
+ * Wrapper for the carrier detect logic. For the moment this is used
+ * to hide some internal details. This will eventually become entirely
+ * internal to the tty port.
  */
 int tty_port_carrier_raised(struct tty_port *port)
 {
@@ -405,12 +405,12 @@ int tty_port_carrier_raised(struct tty_port *port)
 EXPORT_SYMBOL(tty_port_carrier_raised);
 
 /**
- *	tty_port_raise_dtr_rts	-	Raise DTR/RTS
- *	@port: tty port
+ * tty_port_raise_dtr_rts() - Raise DTR/RTS
+ * @port: tty port
  *
- *	Wrapper for the DTR/RTS raise logic. For the moment this is used
- *	to hide some internal details. This will eventually become entirely
- *	internal to the tty port.
+ * Wrapper for the DTR/RTS raise logic. For the moment this is used
+ * to hide some internal details. This will eventually become entirely
+ * internal to the tty port.
  */
 void tty_port_raise_dtr_rts(struct tty_port *port)
 {
@@ -420,12 +420,12 @@ void tty_port_raise_dtr_rts(struct tty_port *port)
 EXPORT_SYMBOL(tty_port_raise_dtr_rts);
 
 /**
- *	tty_port_lower_dtr_rts	-	Lower DTR/RTS
- *	@port: tty port
+ * tty_port_lower_dtr_rts() - Lower DTR/RTS
+ * @port: tty port
  *
- *	Wrapper for the DTR/RTS raise logic. For the moment this is used
- *	to hide some internal details. This will eventually become entirely
- *	internal to the tty port.
+ * Wrapper for the DTR/RTS raise logic. For the moment this is used
+ * to hide some internal details. This will eventually become entirely
+ * internal to the tty port.
  */
 void tty_port_lower_dtr_rts(struct tty_port *port)
 {
@@ -435,28 +435,28 @@ void tty_port_lower_dtr_rts(struct tty_port *port)
 EXPORT_SYMBOL(tty_port_lower_dtr_rts);
 
 /**
- *	tty_port_block_til_ready	-	Waiting logic for tty open
- *	@port: the tty port being opened
- *	@tty: the tty device being bound
- *	@filp: the file pointer of the opener or NULL
+ * tty_port_block_til_ready() - Waiting logic for tty open
+ * @port: the tty port being opened
+ * @tty: the tty device being bound
+ * @filp: the file pointer of the opener or NULL
  *
- *	Implement the core POSIX/SuS tty behaviour when opening a tty device.
- *	Handles:
- *		- hangup (both before and during)
- *		- non blocking open
- *		- rts/dtr/dcd
- *		- signals
- *		- port flags and counts
+ * Implement the core POSIX/SuS tty behaviour when opening a tty device.
+ * Handles:
+ *  - hangup (both before and during)
+ *  - non blocking open
+ *  - rts/dtr/dcd
+ *  - signals
+ *  - port flags and counts
  *
- *	The passed tty_port must implement the carrier_raised method if it can
- *	do carrier detect and the dtr_rts method if it supports software
- *	management of these lines. Note that the dtr/rts raise is done each
- *	iteration as a hangup may have previously dropped them while we wait.
+ * The passed tty_port must implement the carrier_raised method if it can
+ * do carrier detect and the dtr_rts method if it supports software
+ * management of these lines. Note that the dtr/rts raise is done each
+ * iteration as a hangup may have previously dropped them while we wait.
  *
- *	Caller holds tty lock.
+ * Caller holds tty lock.
  *
- *      NB: May drop and reacquire tty lock when blocking, so tty and tty_port
- *      may have changed state (eg., may have been hung up).
+ * NB: May drop and reacquire tty lock when blocking, so tty and tty_port
+ * may have changed state (eg., may have been hung up).
  */
 int tty_port_block_til_ready(struct tty_port *port,
 				struct tty_struct *tty, struct file *filp)
@@ -623,7 +623,7 @@ void tty_port_close_end(struct tty_port *port, struct tty_struct *tty)
 EXPORT_SYMBOL(tty_port_close_end);
 
 /**
- * tty_port_close
+ * tty_port_close()
  *
  * Caller holds tty lock
  */
@@ -640,7 +640,7 @@ void tty_port_close(struct tty_port *port, struct tty_struct *tty,
 EXPORT_SYMBOL(tty_port_close);
 
 /**
- * tty_port_install - generic tty->ops->install handler
+ * tty_port_install() - generic tty->ops->install handler
  * @port: tty_port of the device
  * @driver: tty_driver for this device
  * @tty: tty to be installed
@@ -658,7 +658,7 @@ int tty_port_install(struct tty_port *port, struct tty_driver *driver,
 EXPORT_SYMBOL_GPL(tty_port_install);
 
 /**
- * tty_port_open
+ * tty_port_open()
  *
  * Caller holds tty lock.
  *
diff --git a/drivers/tty/vt/consolemap.c b/drivers/tty/vt/consolemap.c
index 71086e4abc9a..74f4ef98aa7d 100644
--- a/drivers/tty/vt/consolemap.c
+++ b/drivers/tty/vt/consolemap.c
@@ -646,15 +646,15 @@ int con_set_unimap(struct vc_data *vc, ushort ct, struct unipair __user *list)
 }
 
 /**
- *	con_set_default_unimap	-	set default unicode map
- *	@vc: the console we are updating
+ * con_set_default_unimap() - set default unicode map
+ * @vc: the console we are updating
  *
- *	Loads the unimap for the hardware font, as defined in uni_hash.tbl.
- *	The representation used was the most compact I could come up
- *	with.  This routine is executed at video setup, and when the
- *	PIO_FONTRESET ioctl is called.
+ * Loads the unimap for the hardware font, as defined in uni_hash.tbl.
+ * The representation used was the most compact I could come up
+ * with.  This routine is executed at video setup, and when the
+ * PIO_FONTRESET ioctl is called.
  *
- *	The caller must hold the console lock
+ * The caller must hold the console lock
  */
 int con_set_default_unimap(struct vc_data *vc)
 {
@@ -706,11 +706,11 @@ int con_set_default_unimap(struct vc_data *vc)
 EXPORT_SYMBOL(con_set_default_unimap);
 
 /**
- *	con_copy_unimap		-	copy unimap between two vts
- *	@dst_vc: target
- *	@src_vt: source
+ * con_copy_unimap() - copy unimap between two vts
+ * @dst_vc: target
+ * @src_vt: source
  *
- *	The caller must hold the console lock when invoking this method
+ * The caller must hold the console lock when invoking this method
  */
 int con_copy_unimap(struct vc_data *dst_vc, struct vc_data *src_vc)
 {
@@ -729,11 +729,11 @@ int con_copy_unimap(struct vc_data *dst_vc, struct vc_data *src_vc)
 EXPORT_SYMBOL(con_copy_unimap);
 
 /**
- *	con_get_unimap		-	get the unicode map
- *	@vc: the console to read from
+ * con_get_unimap() - get the unicode map
+ * @vc: the console to read from
  *
- *	Read the console unicode data for this console. Called from the ioctl
- *	handlers.
+ * Read the console unicode data for this console. Called from the ioctl
+ * handlers.
  */
 int con_get_unimap(struct vc_data *vc, ushort ct, ushort __user *uct, struct unipair __user *list)
 {
diff --git a/drivers/tty/vt/keyboard.c b/drivers/tty/vt/keyboard.c
index 4d044bc7122f..3c3eb14e1565 100644
--- a/drivers/tty/vt/keyboard.c
+++ b/drivers/tty/vt/keyboard.c
@@ -1134,11 +1134,11 @@ static inline unsigned char getleds(void)
 }
 
 /**
- *	vt_get_leds	-	helper for braille console
- *	@console: console to read
- *	@flag: flag we want to check
+ * vt_get_leds() - helper for braille console
+ * @console: console to read
+ * @flag: flag we want to check
  *
- *	Check the status of a keyboard led flag and report it back
+ * Check the status of a keyboard led flag and report it back
  */
 int vt_get_leds(int console, int flag)
 {
@@ -1155,12 +1155,12 @@ int vt_get_leds(int console, int flag)
 EXPORT_SYMBOL_GPL(vt_get_leds);
 
 /**
- *	vt_set_led_state	-	set LED state of a console
- *	@console: console to set
- *	@leds: LED bits
+ * vt_set_led_state() - set LED state of a console
+ * @console: console to set
+ * @leds: LED bits
  *
- *	Set the LEDs on a console. This is a wrapper for the VT layer
- *	so that we can keep kbd knowledge internal
+ * Set the LEDs on a console. This is a wrapper for the VT layer
+ * so that we can keep kbd knowledge internal
  */
 void vt_set_led_state(int console, int leds)
 {
@@ -1169,17 +1169,17 @@ void vt_set_led_state(int console, int leds)
 }
 
 /**
- *	vt_kbd_con_start	-	Keyboard side of console start
- *	@console: console
+ * vt_kbd_con_start() - Keyboard side of console start
+ * @console: console
  *
- *	Handle console start. This is a wrapper for the VT layer
- *	so that we can keep kbd knowledge internal
+ * Handle console start. This is a wrapper for the VT layer
+ * so that we can keep kbd knowledge internal
  *
- *	FIXME: We eventually need to hold the kbd lock here to protect
- *	the LED updating. We can't do it yet because fn_hold calls stop_tty
- *	and start_tty under the kbd_event_lock, while normal tty paths
- *	don't hold the lock. We probably need to split out an LED lock
- *	but not during an -rc release!
+ * FIXME: We eventually need to hold the kbd lock here to protect
+ * the LED updating. We can't do it yet because fn_hold calls stop_tty
+ * and start_tty under the kbd_event_lock, while normal tty paths
+ * don't hold the lock. We probably need to split out an LED lock
+ * but not during an -rc release!
  */
 void vt_kbd_con_start(int console)
 {
@@ -1192,11 +1192,11 @@ void vt_kbd_con_start(int console)
 }
 
 /**
- *	vt_kbd_con_stop		-	Keyboard side of console stop
- *	@console: console
+ * vt_kbd_con_stop() - Keyboard side of console stop
+ * @console: console
  *
- *	Handle console stop. This is a wrapper for the VT layer
- *	so that we can keep kbd knowledge internal
+ * Handle console stop. This is a wrapper for the VT layer
+ * so that we can keep kbd knowledge internal
  */
 void vt_kbd_con_stop(int console)
 {
@@ -1634,13 +1634,13 @@ int __init kbd_init(void)
 /* Ioctl support code */
 
 /**
- *	vt_do_diacrit		-	diacritical table updates
- *	@cmd: ioctl request
- *	@udp: pointer to user data for ioctl
- *	@perm: permissions check computed by caller
+ * vt_do_diacrit() - diacritical table updates
+ * @cmd: ioctl request
+ * @udp: pointer to user data for ioctl
+ * @perm: permissions check computed by caller
  *
- *	Update the diacritical tables atomically and safely. Lock them
- *	against simultaneous keypresses
+ * Update the diacritical tables atomically and safely. Lock them
+ * against simultaneous keypresses
  */
 int vt_do_diacrit(unsigned int cmd, void __user *udp, int perm)
 {
@@ -1784,12 +1784,12 @@ int vt_do_diacrit(unsigned int cmd, void __user *udp, int perm)
 }
 
 /**
- *	vt_do_kdskbmode		-	set keyboard mode ioctl
- *	@console: the console to use
- *	@arg: the requested mode
+ * vt_do_kdskbmode() - set keyboard mode ioctl
+ * @console: the console to use
+ * @arg: the requested mode
  *
- *	Update the keyboard mode bits while holding the correct locks.
- *	Return 0 for success or an error code.
+ * Update the keyboard mode bits while holding the correct locks.
+ * Return 0 for success or an error code.
  */
 int vt_do_kdskbmode(int console, unsigned int arg)
 {
@@ -1824,12 +1824,12 @@ int vt_do_kdskbmode(int console, unsigned int arg)
 }
 
 /**
- *	vt_do_kdskbmeta		-	set keyboard meta state
- *	@console: the console to use
- *	@arg: the requested meta state
+ * vt_do_kdskbmeta() - set keyboard meta state
+ * @console: the console to use
+ * @arg: the requested meta state
  *
- *	Update the keyboard meta bits while holding the correct locks.
- *	Return 0 for success or an error code.
+ * Update the keyboard meta bits while holding the correct locks.
+ * Return 0 for success or an error code.
  */
 int vt_do_kdskbmeta(int console, unsigned int arg)
 {
@@ -2158,10 +2158,10 @@ int vt_do_kdgkbmode(int console)
 }
 
 /**
- *	vt_do_kdgkbmeta		-	report meta status
- *	@console: console to report
+ * vt_do_kdgkbmeta() - report meta status
+ * @console: console to report
  *
- *	Report the meta flag status of this console
+ * Report the meta flag status of this console
  */
 int vt_do_kdgkbmeta(int console)
 {
@@ -2171,10 +2171,10 @@ int vt_do_kdgkbmeta(int console)
 }
 
 /**
- *	vt_reset_unicode	-	reset the unicode status
- *	@console: console being reset
+ * vt_reset_unicode() - reset the unicode status
+ * @console: console being reset
  *
- *	Restore the unicode console state to its default
+ * Restore the unicode console state to its default
  */
 void vt_reset_unicode(int console)
 {
@@ -2186,10 +2186,10 @@ void vt_reset_unicode(int console)
 }
 
 /**
- *	vt_get_shiftstate	-	shift bit state
+ * vt_get_shiftstate() - shift bit state
  *
- *	Report the shift bits from the keyboard state. We have to export
- *	this to support some oddities in the vt layer.
+ * Report the shift bits from the keyboard state. We have to export
+ * this to support some oddities in the vt layer.
  */
 int vt_get_shift_state(void)
 {
@@ -2198,11 +2198,11 @@ int vt_get_shift_state(void)
 }
 
 /**
- *	vt_reset_keyboard	-	reset keyboard state
- *	@console: console to reset
+ * vt_reset_keyboard() - reset keyboard state
+ * @console: console to reset
  *
- *	Reset the keyboard bits for a console as part of a general console
- *	reset event
+ * Reset the keyboard bits for a console as part of a general console
+ * reset event
  */
 void vt_reset_keyboard(int console)
 {
@@ -2226,12 +2226,12 @@ void vt_reset_keyboard(int console)
 }
 
 /**
- *	vt_get_kbd_mode_bit	-	read keyboard status bits
- *	@console: console to read from
- *	@bit: mode bit to read
+ * vt_get_kbd_mode_bit() - read keyboard status bits
+ * @console: console to read from
+ * @bit: mode bit to read
  *
- *	Report back a vt mode bit. We do this without locking so the
- *	caller must be sure that there are no synchronization needs
+ * Report back a vt mode bit. We do this without locking so the
+ * caller must be sure that there are no synchronization needs
  */
 
 int vt_get_kbd_mode_bit(int console, int bit)
@@ -2241,12 +2241,12 @@ int vt_get_kbd_mode_bit(int console, int bit)
 }
 
 /**
- *	vt_set_kbd_mode_bit	-	read keyboard status bits
- *	@console: console to read from
- *	@bit: mode bit to read
+ * vt_set_kbd_mode_bit() - read keyboard status bits
+ * @console: console to read from
+ * @bit: mode bit to read
  *
- *	Set a vt mode bit. We do this without locking so the
- *	caller must be sure that there are no synchronization needs
+ * Set a vt mode bit. We do this without locking so the
+ * caller must be sure that there are no synchronization needs
  */
 
 void vt_set_kbd_mode_bit(int console, int bit)
@@ -2260,12 +2260,12 @@ void vt_set_kbd_mode_bit(int console, int bit)
 }
 
 /**
- *	vt_clr_kbd_mode_bit	-	read keyboard status bits
- *	@console: console to read from
- *	@bit: mode bit to read
+ * vt_clr_kbd_mode_bit() - read keyboard status bits
+ * @console: console to read from
+ * @bit: mode bit to read
  *
- *	Report back a vt mode bit. We do this without locking so the
- *	caller must be sure that there are no synchronization needs
+ * Report back a vt mode bit. We do this without locking so the
+ * caller must be sure that there are no synchronization needs
  */
 
 void vt_clr_kbd_mode_bit(int console, int bit)
diff --git a/drivers/tty/vt/selection.c b/drivers/tty/vt/selection.c
index 75aa58ea79b6..473015beb0f2 100644
--- a/drivers/tty/vt/selection.c
+++ b/drivers/tty/vt/selection.c
@@ -67,10 +67,10 @@ sel_pos(int n)
 }
 
 /**
- *	clear_selection		-	remove current selection
+ * clear_selection() - remove current selection
  *
- *	Remove the current selection highlight, if any from the console
- *	holding the selection. The caller must hold the console lock.
+ * Remove the current selection highlight, if any from the console
+ * holding the selection. The caller must hold the console lock.
  */
 void clear_selection(void)
 {
@@ -98,11 +98,11 @@ static inline int inword(const u32 c)
 }
 
 /**
- *	set loadlut		-	load the LUT table
- *	@p: user table
+ * sel_loadlut() - load the LUT table
+ * @p: user table
  *
- *	Load the LUT table from user space. The caller must hold the console
- *	lock. Make a temporary copy so a partial update doesn't make a mess.
+ * Load the LUT table from user space. The caller must hold the console
+ * lock. Make a temporary copy so a partial update doesn't make a mess.
  */
 int sel_loadlut(char __user *p)
 {
@@ -154,14 +154,14 @@ static int store_utf8(u32 c, char *p)
 }
 
 /**
- *	set_selection		-	set the current selection.
- *	@sel: user selection info
- *	@tty: the console tty
+ * set_selection() - set the current selection.
+ * @sel: user selection info
+ * @tty: the console tty
  *
- *	Invoked by the ioctl handle for the vt layer.
+ * Invoked by the ioctl handle for the vt layer.
  *
- *	The entire selection process is managed under the console_lock. It's
- *	 a lot under the lock but its hardly a performance path
+ * The entire selection process is managed under the console_lock. It's
+ * a lot under the lock but its hardly a performance path
  */
 int set_selection(const struct tiocl_selection __user *sel, struct tty_struct *tty)
 {
diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
index 27f0f19a4c31..dae5a7a82aee 100644
--- a/drivers/tty/vt/vt.c
+++ b/drivers/tty/vt/vt.c
@@ -1129,19 +1129,19 @@ static inline int resize_screen(struct vc_data *vc, int width, int height,
 #define VC_RESIZE_MAXROW (32767)
 
 /**
- *	vc_do_resize	-	resizing method for the tty
- *	@tty: tty being resized
- *	@real_tty: real tty (different to tty if a pty/tty pair)
- *	@vc: virtual console private data
- *	@cols: columns
- *	@lines: lines
+ * vc_do_resize() - resizing method for the tty
+ * @tty: tty being resized
+ * @real_tty: real tty (different to tty if a pty/tty pair)
+ * @vc: virtual console private data
+ * @cols: columns
+ * @lines: lines
  *
- *	Resize a virtual console, clipping according to the actual constraints.
- *	If the caller passes a tty structure then update the termios winsize
- *	information and perform any necessary signal handling.
+ * Resize a virtual console, clipping according to the actual constraints.
+ * If the caller passes a tty structure then update the termios winsize
+ * information and perform any necessary signal handling.
  *
- *	Caller must hold the console semaphore. Takes the termios rwsem and
- *	ctrl_lock of the tty IFF a tty is passed.
+ * Caller must hold the console semaphore. Takes the termios rwsem and
+ * ctrl_lock of the tty IFF a tty is passed.
  */
 
 static int vc_do_resize(struct tty_struct *tty, struct vc_data *vc,
@@ -1279,15 +1279,15 @@ static int vc_do_resize(struct tty_struct *tty, struct vc_data *vc,
 }
 
 /**
- *	vc_resize		-	resize a VT
- *	@vc: virtual console
- *	@cols: columns
- *	@rows: rows
+ * vc_resize() - resize a VT
+ * @vc: virtual console
+ * @cols: columns
+ * @rows: rows
  *
- *	Resize a virtual console as seen from the console end of things. We
- *	use the common vc_do_resize methods to update the structures. The
- *	caller must hold the console sem to protect console internals and
- *	vc->port.tty
+ * Resize a virtual console as seen from the console end of things. We
+ * use the common vc_do_resize methods to update the structures. The
+ * caller must hold the console sem to protect console internals and
+ * vc->port.tty
  */
 
 int vc_resize(struct vc_data *vc, unsigned int cols, unsigned int rows)
@@ -1296,16 +1296,16 @@ int vc_resize(struct vc_data *vc, unsigned int cols, unsigned int rows)
 }
 
 /**
- *	vt_resize		-	resize a VT
- *	@tty: tty to resize
- *	@ws: winsize attributes
+ * vt_resize() - resize a VT
+ * @tty: tty to resize
+ * @ws: winsize attributes
  *
- *	Resize a virtual terminal. This is called by the tty layer as we
- *	register our own handler for resizing. The mutual helper does all
- *	the actual work.
+ * Resize a virtual terminal. This is called by the tty layer as we
+ * register our own handler for resizing. The mutual helper does all
+ * the actual work.
  *
- *	Takes the console sem and the called methods then take the tty
- *	termios_rwsem and the tty ctrl_lock in that order.
+ * Takes the console sem and the called methods then take the tty
+ * termios_rwsem and the tty ctrl_lock in that order.
  */
 static int vt_resize(struct tty_struct *tty, struct winsize *ws)
 {
@@ -2846,8 +2846,8 @@ struct tty_driver *console_driver;
 
 /**
  * vt_kmsg_redirect() - Sets/gets the kernel message console
- * @new:	The new virtual terminal number or -1 if the console should stay
- *		unchanged
+ * @new: The new virtual terminal number or -1 if the console should stay
+ *       unchanged
  *
  * By default, the kernel messages are always printed on the current virtual
  * console. However, the user may modify that default with the
@@ -3794,7 +3794,7 @@ static void vtconsole_deinit_device(struct con_driver *con)
 }
 
 /**
- * con_is_bound - checks if driver is bound to the console
+ * con_is_bound() - checks if driver is bound to the console
  * @csw: console driver
  *
  * RETURNS: zero if unbound, nonzero if bound
@@ -3818,7 +3818,7 @@ int con_is_bound(const struct consw *csw)
 EXPORT_SYMBOL(con_is_bound);
 
 /**
- * con_debug_enter - prepare the console for the kernel debugger
+ * con_debug_enter() - prepare the console for the kernel debugger
  * @sw: console driver
  *
  * Called when the console is taken over by the kernel debugger, this
@@ -3876,7 +3876,7 @@ int con_debug_enter(struct vc_data *vc)
 EXPORT_SYMBOL_GPL(con_debug_enter);
 
 /**
- * con_debug_leave - restore console state
+ * con_debug_leave() - restore console state
  * @sw: console driver
  *
  * Restore the console state to what it was before the kernel debugger
@@ -3974,7 +3974,7 @@ static int do_register_con_driver(const struct consw *csw, int first, int last)
 
 
 /**
- * do_unregister_con_driver - unregister console driver from console layer
+ * do_unregister_con_driver() - unregister console driver from console layer
  * @csw: console driver
  *
  * DESCRIPTION: All drivers that registers to the console layer must
diff --git a/drivers/tty/vt/vt_ioctl.c b/drivers/tty/vt/vt_ioctl.c
index 801f2f6e1302..0d1b232cb5fd 100644
--- a/drivers/tty/vt/vt_ioctl.c
+++ b/drivers/tty/vt/vt_ioctl.c
@@ -79,12 +79,12 @@ static DEFINE_SPINLOCK(vt_event_lock);
 static DECLARE_WAIT_QUEUE_HEAD(vt_event_waitqueue);
 
 /**
- *	vt_event_post
- *	@event: the event that occurred
- *	@old: old console
- *	@new: new console
+ * vt_event_post()
+ * @event: the event that occurred
+ * @old: old console
+ * @new: new console
  *
- *	Post an VT event to interested VT handlers
+ * Post an VT event to interested VT handlers
  */
 
 void vt_event_post(unsigned int event, unsigned int old, unsigned int new)
@@ -143,14 +143,13 @@ static void __vt_event_dequeue(struct vt_event_wait *vw)
 }
 
 /**
- *	vt_event_wait		-	wait for an event
- *	@vw: our event
+ * vt_event_wait() - wait for an event
+ * @vw: our event
  *
- *	Waits for an event to occur which completes our vt_event_wait
- *	structure. On return the structure has wv->done set to 1 for success
- *	or 0 if some event such as a signal ended the wait.
+ * Waits for an event to occur which completes our vt_event_wait
+ * structure. On return the structure has wv->done set to 1 for success
+ * or 0 if some event such as a signal ended the wait.
  */
-
 static void vt_event_wait(struct vt_event_wait *vw)
 {
 	__vt_event_queue(vw);
@@ -159,10 +158,10 @@ static void vt_event_wait(struct vt_event_wait *vw)
 }
 
 /**
- *	vt_event_wait_ioctl	-	event ioctl handler
- *	@arg: argument to ioctl
+ * vt_event_wait_ioctl() - event ioctl handler
+ * @arg: argument to ioctl
  *
- *	Implement the VT_WAITEVENT ioctl using the VT event interface
+ * Implement the VT_WAITEVENT ioctl using the VT event interface
  */
 
 static int vt_event_wait_ioctl(struct vt_event __user *event)
@@ -186,12 +185,12 @@ static int vt_event_wait_ioctl(struct vt_event __user *event)
 }
 
 /**
- *	vt_waitactive	-	active console wait
- *	@event: event code
- *	@n: new console
+ * vt_waitactive() - active console wait
+ * @event: event code
+ * @n: new console
  *
- *	Helper for event waits. Used to implement the legacy
- *	event waiting ioctls in terms of events
+ * Helper for event waits. Used to implement the legacy
+ * event waiting ioctls in terms of events
  */
 
 int vt_waitactive(int n)
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH v2 4/7] tty: Fix kernel-doc variable typos
  2018-10-18 22:37 [PATCH v2 0/7] drivers: tty: Fix kernel-docs comments Tobin C. Harding
                   ` (2 preceding siblings ...)
  2018-10-18 22:37 ` [PATCH v2 3/7] tty: Partially fix kernel-docs layout Tobin C. Harding
@ 2018-10-18 22:37 ` Tobin C. Harding
  2018-10-18 22:37 ` [PATCH v2 5/7] tty: Fix spacing between kernel-doc sections Tobin C. Harding
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 9+ messages in thread
From: Tobin C. Harding @ 2018-10-18 22:37 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Jiri Slaby
  Cc: Tobin C. Harding, Geert Uytterhoeven, linux-kernel

There are a few typos in the kernel-doc variables [descriptions].  Fix
these by using the correct variable name and adding a description.

Fix kernel-doc variable typos.

Signed-off-by: Tobin C. Harding <tobin@kernel.org>
---
 drivers/tty/serial/men_z135_uart.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/serial/men_z135_uart.c b/drivers/tty/serial/men_z135_uart.c
index ef89534dd760..784756139935 100644
--- a/drivers/tty/serial/men_z135_uart.c
+++ b/drivers/tty/serial/men_z135_uart.c
@@ -173,7 +173,7 @@ static void men_z135_reg_clr(struct men_z135_port *uart,
 
 /**
  * men_z135_handle_modem_status() - Handle change of modem status
- * @port: The UART port
+ * @uart: The UART port
  *
  * Handle change of modem status register. This is done by reading the "delta"
  * versions of DCD (Data Carrier Detect) and CTS (Clear To Send).
@@ -597,7 +597,7 @@ static void men_z135_stop_rx(struct uart_port *port)
 
 /**
  * men_z135_enable_ms() - Enable Modem Status
- * port:
+ * @port: The UART port
  *
  * Enable Modem Status IRQ.
  */
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH v2 5/7] tty: Fix spacing between kernel-doc sections
  2018-10-18 22:37 [PATCH v2 0/7] drivers: tty: Fix kernel-docs comments Tobin C. Harding
                   ` (3 preceding siblings ...)
  2018-10-18 22:37 ` [PATCH v2 4/7] tty: Fix kernel-doc variable typos Tobin C. Harding
@ 2018-10-18 22:37 ` Tobin C. Harding
  2018-10-18 22:37 ` [PATCH v2 6/7] tty: Remove newline after function kernel-doc Tobin C. Harding
  2018-10-18 22:37 ` [PATCH v2 7/7] tty: Fix section format Tobin C. Harding
  6 siblings, 0 replies; 9+ messages in thread
From: Tobin C. Harding @ 2018-10-18 22:37 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Jiri Slaby
  Cc: Tobin C. Harding, Geert Uytterhoeven, linux-kernel

There is a specified spacing for kernel-doc layout in
Documentation/doc-guide/kernel-doc.rst we should try to adhere to it as
much as possible.

Fix spacing between sections.

Signed-off-by: Tobin C. Harding <tobin@kernel.org>
---
 drivers/tty/n_hdlc.c              | 2 ++
 drivers/tty/serial/serial-tegra.c | 2 --
 drivers/tty/serial/uartlite.c     | 5 +----
 drivers/tty/tty_buffer.c          | 1 +
 drivers/tty/tty_port.c            | 2 --
 5 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/tty/n_hdlc.c b/drivers/tty/n_hdlc.c
index 4b7aaf9ee09c..5b0c776a43a2 100644
--- a/drivers/tty/n_hdlc.c
+++ b/drivers/tty/n_hdlc.c
@@ -794,6 +794,7 @@ static int n_hdlc_tty_ioctl(struct tty_struct *tty, struct file *file,
  *
  * Determine which operations (read/write) will not block and return info
  * to caller.
+ *
  * Returns a bit mask containing info on which ops will not block.
  */
 static __poll_t n_hdlc_tty_poll(struct tty_struct *tty, struct file *filp,
@@ -918,6 +919,7 @@ static void n_hdlc_buf_put(struct n_hdlc_buf_list *buf_list,
  *
  * Remove and return an HDLC buffer from the head of the specified HDLC buffer
  * list.
+ *
  * Returns a pointer to HDLC buffer if available, otherwise %NULL.
  */
 static struct n_hdlc_buf *n_hdlc_buf_get(struct n_hdlc_buf_list *buf_list)
diff --git a/drivers/tty/serial/serial-tegra.c b/drivers/tty/serial/serial-tegra.c
index 872f3b2ed196..cb240a899127 100644
--- a/drivers/tty/serial/serial-tegra.c
+++ b/drivers/tty/serial/serial-tegra.c
@@ -74,7 +74,6 @@
 
 /**
  * tegra_uart_chip_data: SOC specific data.
- *
  * @tx_fifo_full_status: Status flag available for checking tx fifo full.
  * @allow_txfifo_reset_fifo_mode: allow_tx fifo reset with fifo mode or not.
  *			Tegra30 does not allow this.
@@ -220,7 +219,6 @@ static void tegra_uart_break_ctl(struct uart_port *u, int break_ctl)
 
 /**
  * tegra_uart_wait_cycle_time() - Wait for N UART clock periods
- *
  * @tup:	Tegra serial port data structure.
  * @cycles:	Number of clock periods to wait.
  *
diff --git a/drivers/tty/serial/uartlite.c b/drivers/tty/serial/uartlite.c
index 94a91748da40..718d3bbd002d 100644
--- a/drivers/tty/serial/uartlite.c
+++ b/drivers/tty/serial/uartlite.c
@@ -605,7 +605,6 @@ static struct uart_driver ulite_uart_driver = {
 
 /**
  * ulite_assign() - register a uartlite device with the driver
- *
  * @dev: pointer to device structure
  * @id: requested id number.  Pass -1 for automatic port assignment
  * @base: base address of uartlite registers
@@ -687,7 +686,6 @@ static int ulite_assign(struct device *dev, int id, u32 base, int irq,
 
 /**
  * ulite_release() - register a uartlite device with the driver
- *
  * @dev: pointer to device structure
  */
 static int ulite_release(struct device *dev)
@@ -706,7 +704,6 @@ static int ulite_release(struct device *dev)
 
 /**
  * ulite_suspend() - Stop the device.
- *
  * @dev: handle to the device structure.
  * Return: 0 always.
  */
@@ -722,8 +719,8 @@ static int __maybe_unused ulite_suspend(struct device *dev)
 
 /**
  * ulite_resume() - Resume the device.
- *
  * @dev: handle to the device structure.
+ *
  * Return: 0 on success, errno otherwise.
  */
 static int __maybe_unused ulite_resume(struct device *dev)
diff --git a/drivers/tty/tty_buffer.c b/drivers/tty/tty_buffer.c
index d50dbe06896b..5f05500ee4d0 100644
--- a/drivers/tty/tty_buffer.c
+++ b/drivers/tty/tty_buffer.c
@@ -148,6 +148,7 @@ void tty_buffer_free_all(struct tty_port *port)
  * Allocate a new tty buffer to hold the desired number of characters.
  * We round our buffers off in 256 character chunks to get better
  * allocation behaviour.
+ *
  * Return NULL if out of memory or the allocation would exceed the
  * per device queue
  */
diff --git a/drivers/tty/tty_port.c b/drivers/tty/tty_port.c
index 60927a52ec9c..d4dfe29a6348 100644
--- a/drivers/tty/tty_port.c
+++ b/drivers/tty/tty_port.c
@@ -363,7 +363,6 @@ EXPORT_SYMBOL(tty_port_hangup);
 
 /**
  * tty_port_tty_hangup() - helper to hang up a tty
- *
  * @port: tty port
  * @check_clocal: hang only ttys with CLOCAL unset?
  */
@@ -379,7 +378,6 @@ EXPORT_SYMBOL_GPL(tty_port_tty_hangup);
 
 /**
  * tty_port_tty_wakeup() - helper to wake up a tty
- *
  * @port: tty port
  */
 void tty_port_tty_wakeup(struct tty_port *port)
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH v2 6/7] tty: Remove newline after function kernel-doc
  2018-10-18 22:37 [PATCH v2 0/7] drivers: tty: Fix kernel-docs comments Tobin C. Harding
                   ` (4 preceding siblings ...)
  2018-10-18 22:37 ` [PATCH v2 5/7] tty: Fix spacing between kernel-doc sections Tobin C. Harding
@ 2018-10-18 22:37 ` Tobin C. Harding
  2018-10-18 22:37 ` [PATCH v2 7/7] tty: Fix section format Tobin C. Harding
  6 siblings, 0 replies; 9+ messages in thread
From: Tobin C. Harding @ 2018-10-18 22:37 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Jiri Slaby
  Cc: Tobin C. Harding, Geert Uytterhoeven, linux-kernel

Currently there are many places were a newline is left between the
kernel-doc function comment and the function it is documenting.  There
should not be a newline here.

Remove newline after function kernel-doc.  This patch is whitespace
only.

Signed-off-by: Tobin C. Harding <tobin@kernel.org>
---

 drivers/tty/n_gsm.c                | 46 ------------------------------
 drivers/tty/n_tty.c                | 33 ---------------------
 drivers/tty/pty.c                  |  7 -----
 drivers/tty/serial/ifx6x60.c       |  5 ----
 drivers/tty/serial/ioc3_serial.c   |  5 ----
 drivers/tty/serial/ioc4_serial.c   |  3 --
 drivers/tty/serial/men_z135_uart.c |  1 -
 drivers/tty/serial/sn_console.c    |  1 -
 drivers/tty/tty_baudrate.c         |  4 ---
 drivers/tty/tty_buffer.c           | 14 ---------
 drivers/tty/tty_io.c               | 36 -----------------------
 drivers/tty/tty_ioctl.c            | 13 ---------
 drivers/tty/tty_ldisc.c            | 19 ------------
 drivers/tty/vt/vt_ioctl.c          |  3 --
 14 files changed, 190 deletions(-)

diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c
index e25944ee2766..c65a9afb7cc4 100644
--- a/drivers/tty/n_gsm.c
+++ b/drivers/tty/n_gsm.c
@@ -366,7 +366,6 @@ static const u8 gsm_fcs8[256] = {
  * Update the FCS to include c. Uses the algorithm in the specification
  * notes.
  */
-
 static inline u8 gsm_fcs_add(u8 fcs, u8 c)
 {
 	return gsm_fcs8[fcs ^ c];
@@ -381,7 +380,6 @@ static inline u8 gsm_fcs_add(u8 fcs, u8 c)
  * Update the FCS to include c. Uses the algorithm in the specification
  * notes.
  */
-
 static inline u8 gsm_fcs_add_block(u8 fcs, u8 *c, int len)
 {
 	while (len--)
@@ -397,7 +395,6 @@ static inline u8 gsm_fcs_add_block(u8 fcs, u8 *c, int len)
  * Processes one byte of an EA. Updates the passed variable
  * and returns 1 if the EA is now completely read
  */
-
 static int gsm_read_ea(unsigned int *val, u8 c)
 {
 	/* Add the next 7 bits into the value */
@@ -414,7 +411,6 @@ static int gsm_read_ea(unsigned int *val, u8 c)
  * Returns the correct GSM encoded modem status bits (6 bit field) for
  * the current status of the DLCI and attached tty object
  */
-
 static u8 gsm_encode_modem(const struct gsm_dlci *dlci)
 {
 	u8 modembits = 0;
@@ -444,7 +440,6 @@ static u8 gsm_encode_modem(const struct gsm_dlci *dlci)
  * Displays a packet in human readable format for debugging purposes. The
  * style is based on amateur radio LAP-B dump display.
  */
-
 static void gsm_print_packet(const char *hdr, int addr, int cr,
 					u8 control, const u8 *data, int dlen)
 {
@@ -525,7 +520,6 @@ static void gsm_print_packet(const char *hdr, int addr, int cr,
  * is doubling and the caller is responsible for handing out
  * suitable sized buffers.
  */
-
 static int gsm_stuff_frame(const u8 *input, u8 *output, int len)
 {
 	int olen = 0;
@@ -555,7 +549,6 @@ static int gsm_stuff_frame(const u8 *input, u8 *output, int len)
  *
  * FIXME: Lock versus data TX path
  */
-
 static void gsm_send(struct gsm_mux *gsm, int addr, int cr, int control)
 {
 	int len;
@@ -602,7 +595,6 @@ static void gsm_send(struct gsm_mux *gsm, int addr, int cr, int control)
  *
  * Format up and transmit a link level response frame.
  */
-
 static inline void gsm_response(struct gsm_mux *gsm, int addr, int control)
 {
 	gsm_send(gsm, addr, 0, control);
@@ -616,7 +608,6 @@ static inline void gsm_response(struct gsm_mux *gsm, int addr, int control)
  *
  * Format up and transmit a link level command frame.
  */
-
 static inline void gsm_command(struct gsm_mux *gsm, int addr, int control)
 {
 	gsm_send(gsm, addr, 1, control);
@@ -637,7 +628,6 @@ static inline void gsm_command(struct gsm_mux *gsm, int addr, int control)
  * at the front for header bytes but that is treated as an implementation
  * detail and not for the high level code to use
  */
-
 static struct gsm_msg *gsm_data_alloc(struct gsm_mux *gsm, u8 addr, int len,
 								u8 ctrl)
 {
@@ -664,7 +654,6 @@ static struct gsm_msg *gsm_data_alloc(struct gsm_mux *gsm, u8 addr, int len,
  *
  * FIXME: lock against link layer control transmissions
  */
-
 static void gsm_data_kick(struct gsm_mux *gsm)
 {
 	struct gsm_msg *msg, *nmsg;
@@ -715,7 +704,6 @@ static void gsm_data_kick(struct gsm_mux *gsm)
  * out of the mux tty if not already doing so. The Caller must hold
  * the gsm tx lock.
  */
-
 static void __gsm_data_queue(struct gsm_dlci *dlci, struct gsm_msg *msg)
 {
 	struct gsm_mux *gsm = dlci->gsm;
@@ -766,7 +754,6 @@ static void __gsm_data_queue(struct gsm_dlci *dlci, struct gsm_msg *msg)
  * out of the mux tty if not already doing so. Take the
  * the gsm tx lock and dlci lock.
  */
-
 static void gsm_data_queue(struct gsm_dlci *dlci, struct gsm_msg *msg)
 {
 	unsigned long flags;
@@ -786,7 +773,6 @@ static void gsm_data_queue(struct gsm_dlci *dlci, struct gsm_msg *msg)
  *
  * Caller must hold the tx_lock of the mux.
  */
-
 static int gsm_dlci_data_output(struct gsm_mux *gsm, struct gsm_dlci *dlci)
 {
 	struct gsm_msg *msg;
@@ -839,7 +825,6 @@ static int gsm_dlci_data_output(struct gsm_mux *gsm, struct gsm_dlci *dlci)
  *
  * Caller must hold the tx_lock of the mux.
  */
-
 static int gsm_dlci_data_output_framed(struct gsm_mux *gsm,
 						struct gsm_dlci *dlci)
 {
@@ -913,7 +898,6 @@ static int gsm_dlci_data_output_framed(struct gsm_mux *gsm,
  * FIXME: We should round robin between groups and in theory you can
  * renegotiate DLCI priorities with optional stuff. Needs optimising.
  */
-
 static void gsm_dlci_data_sweep(struct gsm_mux *gsm)
 {
 	int len;
@@ -950,7 +934,6 @@ static void gsm_dlci_data_sweep(struct gsm_mux *gsm)
  * a tty wakeup except when we filled the pipe so we need to fire off
  * new data ourselves in other cases.
  */
-
 static void gsm_dlci_data_kick(struct gsm_dlci *dlci)
 {
 	unsigned long flags;
@@ -987,7 +970,6 @@ static void gsm_dlci_data_kick(struct gsm_dlci *dlci)
  *
  * Encode up and queue a UI/UIH frame containing our response.
  */
-
 static void gsm_control_reply(struct gsm_mux *gsm, int cmd, u8 *data,
 					int dlen)
 {
@@ -1010,7 +992,6 @@ static void gsm_control_reply(struct gsm_mux *gsm, int cmd, u8 *data,
  * Used when a modem control message or line state inline in adaption
  * layer 2 is processed. Sort out the local modem state and throttles
  */
-
 static void gsm_process_modem(struct tty_struct *tty, struct gsm_dlci *dlci,
 							u32 modem, int clen)
 {
@@ -1072,7 +1053,6 @@ static void gsm_process_modem(struct tty_struct *tty, struct gsm_dlci *dlci,
  * to indicate break signals. Unpack it, convert to Linux representation
  * and if need be stuff a break message down the tty.
  */
-
 static void gsm_control_modem(struct gsm_mux *gsm, u8 *data, int clen)
 {
 	unsigned int addr = 0;
@@ -1133,7 +1113,6 @@ static void gsm_control_modem(struct gsm_mux *gsm, u8 *data, int clen)
  * it wishes to send us an error state from the virtual link. Stuff
  * this into the uplink tty if present
  */
-
 static void gsm_control_rls(struct gsm_mux *gsm, u8 *data, int clen)
 {
 	struct tty_port *port;
@@ -1187,7 +1166,6 @@ static void gsm_dlci_begin_close(struct gsm_dlci *dlci);
  * Processes the incoming request and queues a response frame or an
  * NSC response if not supported
  */
-
 static void gsm_control_message(struct gsm_mux *gsm, unsigned int command,
 							u8 *data, int clen)
 {
@@ -1259,7 +1237,6 @@ static void gsm_control_message(struct gsm_mux *gsm, unsigned int command,
  * is done by the caller, we just update the fields, flag it as done
  * and return
  */
-
 static void gsm_control_response(struct gsm_mux *gsm, unsigned int command,
 							u8 *data, int clen)
 {
@@ -1291,7 +1268,6 @@ static void gsm_control_response(struct gsm_mux *gsm, unsigned int command,
  *
  * Send out a pending control command (called under control lock)
  */
-
 static void gsm_control_transmit(struct gsm_mux *gsm, struct gsm_control *ctrl)
 {
 	struct gsm_msg *msg = gsm_data_alloc(gsm, 0, ctrl->len + 1, gsm->ftype);
@@ -1312,7 +1288,6 @@ static void gsm_control_transmit(struct gsm_mux *gsm, struct gsm_control *ctrl)
  * In that situation the timer may still occur in a small window but
  * gsm->pending_cmd will be NULL and we just let the timer expire.
  */
-
 static void gsm_control_retransmit(struct timer_list *t)
 {
 	struct gsm_mux *gsm = from_timer(gsm, t, t2_timer);
@@ -1347,7 +1322,6 @@ static void gsm_control_retransmit(struct timer_list *t)
  * active at a time. In theory more can be outstanding but the matching
  * gets really complicated so for now stick to one outstanding.
  */
-
 static struct gsm_control *gsm_control_send(struct gsm_mux *gsm,
 		unsigned int command, u8 *data, int clen)
 {
@@ -1389,7 +1363,6 @@ static struct gsm_control *gsm_control_send(struct gsm_mux *gsm,
  * resources and returns 0 for success, or an error if the remote
  * rejected or ignored the request.
  */
-
 static int gsm_control_wait(struct gsm_mux *gsm, struct gsm_control *control)
 {
 	int err;
@@ -1415,7 +1388,6 @@ static int gsm_control_wait(struct gsm_mux *gsm, struct gsm_control *control)
  * Perform processing when moving a DLCI into closed state. If there
  * is an attached tty this is hung up
  */
-
 static void gsm_dlci_close(struct gsm_dlci *dlci)
 {
 	del_timer(&dlci->t1);
@@ -1438,7 +1410,6 @@ static void gsm_dlci_close(struct gsm_dlci *dlci)
  *
  * Perform processing when moving a DLCI into open state.
  */
-
 static void gsm_dlci_open(struct gsm_dlci *dlci)
 {
 	/* Note that SABM UA .. SABM UA first UA lost can mean that we go
@@ -1465,7 +1436,6 @@ static void gsm_dlci_open(struct gsm_dlci *dlci)
  * fine. In that case we can just keep the control dlci open after the
  * DLCI_OPENING retries time out.
  */
-
 static void gsm_dlci_t1(struct timer_list *t)
 {
 	struct gsm_dlci *dlci = from_timer(dlci, t, t1);
@@ -1508,7 +1478,6 @@ static void gsm_dlci_t1(struct timer_list *t)
  * we will move into open state. Opening is done asynchronously with retry
  * running off timers and the responses.
  */
-
 static void gsm_dlci_begin_open(struct gsm_dlci *dlci)
 {
 	struct gsm_mux *gsm = dlci->gsm;
@@ -1530,7 +1499,6 @@ static void gsm_dlci_begin_open(struct gsm_dlci *dlci)
  * off timers. We may also receive a DM reply from the other end which
  * indicates the channel was already closed.
  */
-
 static void gsm_dlci_begin_close(struct gsm_dlci *dlci)
 {
 	struct gsm_mux *gsm = dlci->gsm;
@@ -1552,7 +1520,6 @@ static void gsm_dlci_begin_close(struct gsm_dlci *dlci)
  * other than the control channel. If the relevant virtual tty is
  * open we shovel the bits down it, if not we drop them.
  */
-
 static void gsm_dlci_data(struct gsm_dlci *dlci, u8 *data, int clen)
 {
 	/* krefs .. */
@@ -1602,7 +1569,6 @@ static void gsm_dlci_data(struct gsm_dlci *dlci, u8 *data, int clen)
  * control data bytes. The command EA contains a command/response bit
  * and we divide up the work accordingly.
  */
-
 static void gsm_dlci_command(struct gsm_dlci *dlci, u8 *data, int len)
 {
 	/* See what command is involved */
@@ -1640,7 +1606,6 @@ static void gsm_dlci_command(struct gsm_dlci *dlci, u8 *data, int len)
  *
  * FIXME: review locking races
  */
-
 static struct gsm_dlci *gsm_dlci_alloc(struct gsm_mux *gsm, int addr)
 {
 	struct gsm_dlci *dlci = kzalloc(sizeof(struct gsm_dlci), GFP_ATOMIC);
@@ -1741,7 +1706,6 @@ static void gsm_dlci_release(struct gsm_dlci *dlci)
  * been handled below us and the frame is unpacked into the structures.
  * The fcs holds the header FCS but any data FCS must be added here.
  */
-
 static void gsm_queue(struct gsm_mux *gsm)
 {
 	struct gsm_dlci *dlci;
@@ -2012,7 +1976,6 @@ static void gsm1_receive(struct gsm_mux *gsm, unsigned char c)
  *
  * FIXME: better diagnostics ?
  */
-
 static void gsm_error(struct gsm_mux *gsm,
 				unsigned char data, unsigned char flag)
 {
@@ -2055,7 +2018,6 @@ static int gsm_disconnect(struct gsm_mux *gsm)
  * protocols. Remove the mux from the mux table, stop all the timers
  * and then shut down each device hanging up the channels as we go.
  */
-
 static void gsm_cleanup_mux(struct gsm_mux *gsm)
 {
 	int i;
@@ -2101,7 +2063,6 @@ static void gsm_cleanup_mux(struct gsm_mux *gsm)
  * protocols. Add the mux to the mux table so it can be opened and
  * finally kick off connecting to DLCI 0 on the modem.
  */
-
 static int gsm_activate_mux(struct gsm_mux *gsm)
 {
 	struct gsm_dlci *dlci;
@@ -2220,7 +2181,6 @@ static struct gsm_mux *gsm_alloc_mux(void)
  * Write a block of data from the GSM mux to the data channel. This
  * will eventually be serialized from above but at the moment isn't.
  */
-
 static int gsmld_output(struct gsm_mux *gsm, u8 *data, int len)
 {
 	if (tty_write_room(gsm->tty) < len) {
@@ -2243,7 +2203,6 @@ static int gsmld_output(struct gsm_mux *gsm, u8 *data, int len)
  * modem. Currently called from the line discipline set up but
  * will need moving to an ioctl path.
  */
-
 static int gsmld_attach_gsm(struct tty_struct *tty, struct gsm_mux *gsm)
 {
 	int ret, i, base;
@@ -2340,7 +2299,6 @@ static void gsmld_flush_buffer(struct tty_struct *tty)
  * discipline change. The function will not be called while other
  * ldisc methods are in progress.
  */
-
 static void gsmld_close(struct tty_struct *tty)
 {
 	struct gsm_mux *gsm = tty->disc_data;
@@ -2361,7 +2319,6 @@ static void gsmld_close(struct tty_struct *tty)
  * other events will occur in parallel. No further open will occur
  * until a close.
  */
-
 static int gsmld_open(struct tty_struct *tty)
 {
 	struct gsm_mux *gsm;
@@ -2426,7 +2383,6 @@ static void gsmld_write_wakeup(struct tty_struct *tty)
  *
  * This code must be sure never to sleep through a hangup.
  */
-
 static ssize_t gsmld_read(struct tty_struct *tty, struct file *file,
 			 unsigned char __user *buf, size_t nr)
 {
@@ -2446,7 +2402,6 @@ static ssize_t gsmld_read(struct tty_struct *tty, struct file *file,
  * by userspace. Frames are either sent whole or not at all as this
  * avoids pain user side.
  */
-
 static ssize_t gsmld_write(struct tty_struct *tty, struct file *file,
 			   const unsigned char *buf, size_t nr)
 {
@@ -2470,7 +2425,6 @@ static ssize_t gsmld_write(struct tty_struct *tty, struct file *file,
  * This code must be sure never to sleep through a hangup.
  * Called without the kernel lock held - fine
  */
-
 static __poll_t gsmld_poll(struct tty_struct *tty, struct file *file,
 							poll_table *wait)
 {
diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c
index af0836f11459..3e2b59e99153 100644
--- a/drivers/tty/n_tty.c
+++ b/drivers/tty/n_tty.c
@@ -198,7 +198,6 @@ static int tty_copy_to_user(struct tty_struct *tty, void __user *to,
  * n_tty_read()/consumer path:
  *    holds non-exclusive termios_rwsem
  */
-
 static void n_tty_kick_worker(struct tty_struct *tty)
 {
 	struct n_tty_data *ldata = tty->disc_data;
@@ -239,7 +238,6 @@ static ssize_t chars_in_buffer(struct tty_struct *tty)
  * that attach themselves to the master and rely on ASYNC
  * IO must be woken up
  */
-
 static void n_tty_write_wakeup(struct tty_struct *tty)
 {
 	clear_bit(TTY_DO_WRITE_WAKEUP, &tty->flags);
@@ -311,7 +309,6 @@ static void n_tty_check_unthrottle(struct tty_struct *tty)
  * n_tty_receive_buf()/producer path:
  *     caller holds non-exclusive termios_rwsem
  */
-
 static inline void put_tty_queue(unsigned char c, struct n_tty_data *ldata)
 {
 	*read_buf_addr(ldata, ldata->read_head) = c;
@@ -328,7 +325,6 @@ static inline void put_tty_queue(unsigned char c, struct n_tty_data *ldata)
  * Locking: caller holds exclusive termios_rwsem
  *          (or locking is not required)
  */
-
 static void reset_buffer_flags(struct n_tty_data *ldata)
 {
 	ldata->read_head = ldata->canon_head = ldata->read_tail = 0;
@@ -365,7 +361,6 @@ static void n_tty_packet_mode_flush(struct tty_struct *tty)
  *
  * Locking: ctrl_lock, exclusive termios_rwsem
  */
-
 static void n_tty_flush_buffer(struct tty_struct *tty)
 {
 	down_write(&tty->termios_rwsem);
@@ -385,7 +380,6 @@ static void n_tty_flush_buffer(struct tty_struct *tty)
  * character. We use this to correctly compute the on screen size
  * of the character when printing
  */
-
 static inline int is_utf8_continuation(unsigned char c)
 {
 	return (c & 0xc0) == 0x80;
@@ -398,7 +392,6 @@ static inline int is_utf8_continuation(unsigned char c)
  * Returns true if the utf8 character 'c' is a multibyte continuation
  * character and the terminal is in unicode mode.
  */
-
 static inline int is_continuation(unsigned char c, struct tty_struct *tty)
 {
 	return I_IUTF8(tty) && is_utf8_continuation(c);
@@ -425,7 +418,6 @@ static inline int is_continuation(unsigned char c, struct tty_struct *tty)
  * Locking: should be called under the output_lock to protect
  *          the column state and space left in the buffer
  */
-
 static int do_output_char(unsigned char c, struct tty_struct *tty, int space)
 {
 	struct n_tty_data *ldata = tty->disc_data;
@@ -500,7 +492,6 @@ static int do_output_char(unsigned char c, struct tty_struct *tty, int space)
  *          (also, this is called from n_tty_write under the
  *          tty layer write lock)
  */
-
 static int process_output(unsigned char c, struct tty_struct *tty)
 {
 	struct n_tty_data *ldata = tty->disc_data;
@@ -536,7 +527,6 @@ static int process_output(unsigned char c, struct tty_struct *tty)
  *          (also, this is called from n_tty_write under the
  *          tty layer write lock)
  */
-
 static ssize_t process_output_block(struct tty_struct *tty,
 				    const unsigned char *buf, unsigned int nr)
 {
@@ -620,7 +610,6 @@ static ssize_t process_output_block(struct tty_struct *tty,
  *
  * Locking: callers must hold output_lock
  */
-
 static size_t __process_echoes(struct tty_struct *tty)
 {
 	struct n_tty_data *ldata = tty->disc_data;
@@ -835,7 +824,6 @@ static void flush_echoes(struct tty_struct *tty)
  *
  * Add a character or operation byte to the echo buffer.
  */
-
 static inline void add_echo_byte(unsigned char c, struct n_tty_data *ldata)
 {
 	*echo_buf_addr(ldata, ldata->echo_head) = c;
@@ -849,7 +837,6 @@ static inline void add_echo_byte(unsigned char c, struct n_tty_data *ldata)
  *
  * Add an operation to the echo buffer to move back one column.
  */
-
 static void echo_move_back_col(struct n_tty_data *ldata)
 {
 	add_echo_byte(ECHO_OP_START, ldata);
@@ -863,7 +850,6 @@ static void echo_move_back_col(struct n_tty_data *ldata)
  * Add an operation to the echo buffer to set the canon column
  * to the current column.
  */
-
 static void echo_set_canon_col(struct n_tty_data *ldata)
 {
 	add_echo_byte(ECHO_OP_START, ldata);
@@ -884,7 +870,6 @@ static void echo_set_canon_col(struct n_tty_data *ldata)
  * canon column (if applicable), to go back the correct number
  * of columns.
  */
-
 static void echo_erase_tab(unsigned int num_chars, int after_tab,
 			   struct n_tty_data *ldata)
 {
@@ -911,7 +896,6 @@ static void echo_erase_tab(unsigned int num_chars, int after_tab,
  *
  * This variant does not treat control characters specially.
  */
-
 static void echo_char_raw(unsigned char c, struct n_tty_data *ldata)
 {
 	if (c == ECHO_OP_START) {
@@ -933,7 +917,6 @@ static void echo_char_raw(unsigned char c, struct n_tty_data *ldata)
  * This variant tags control characters to be echoed as "^X"
  * (where X is the letter representing the control char).
  */
-
 static void echo_char(unsigned char c, struct tty_struct *tty)
 {
 	struct n_tty_data *ldata = tty->disc_data;
@@ -952,7 +935,6 @@ static void echo_char(unsigned char c, struct tty_struct *tty)
  * finish_erasing() - complete erase
  * @ldata: n_tty data
  */
-
 static inline void finish_erasing(struct n_tty_data *ldata)
 {
 	if (ldata->erasing) {
@@ -973,7 +955,6 @@ static inline void finish_erasing(struct n_tty_data *ldata)
  * n_tty_receive_buf()/producer path:
  *     caller holds non-exclusive termios_rwsem
  */
-
 static void eraser(unsigned char c, struct tty_struct *tty)
 {
 	struct n_tty_data *ldata = tty->disc_data;
@@ -1106,7 +1087,6 @@ static void eraser(unsigned char c, struct tty_struct *tty)
  *
  * Locking: ctrl_lock
  */
-
 static void __isig(int sig, struct tty_struct *tty)
 {
 	struct pid *tty_pgrp = tty_get_pgrp(tty);
@@ -1163,7 +1143,6 @@ static void isig(int sig, struct tty_struct *tty)
  *
  * Note: may get exclusive termios_rwsem if flushing input buffer
  */
-
 static void n_tty_receive_break(struct tty_struct *tty)
 {
 	struct n_tty_data *ldata = tty->disc_data;
@@ -1193,7 +1172,6 @@ static void n_tty_receive_break(struct tty_struct *tty)
  * need locking as num_overrun and overrun_time are function
  * private.
  */
-
 static void n_tty_receive_overrun(struct tty_struct *tty)
 {
 	struct n_tty_data *ldata = tty->disc_data;
@@ -1264,7 +1242,6 @@ n_tty_receive_signal_char(struct tty_struct *tty, int signal, unsigned char c)
  *
  * Returns 1 if LNEXT was received, else returns 0
  */
-
 static int
 n_tty_receive_char_special(struct tty_struct *tty, unsigned char c)
 {
@@ -1788,7 +1765,6 @@ static int n_tty_receive_buf2(struct tty_struct *tty, const unsigned char *cp,
  *
  * Locking: Caller holds tty->termios_rwsem
  */
-
 static void n_tty_set_termios(struct tty_struct *tty, struct ktermios *old)
 {
 	struct n_tty_data *ldata = tty->disc_data;
@@ -1882,7 +1858,6 @@ static void n_tty_set_termios(struct tty_struct *tty, struct ktermios *old)
  * discipline change. The function will not be called while other
  * ldisc methods are in progress.
  */
-
 static void n_tty_close(struct tty_struct *tty)
 {
 	struct n_tty_data *ldata = tty->disc_data;
@@ -1903,7 +1878,6 @@ static void n_tty_close(struct tty_struct *tty)
  * other events will occur in parallel. No further open will occur
  * until a close.
  */
-
 static int n_tty_open(struct tty_struct *tty)
 {
 	struct n_tty_data *ldata;
@@ -1956,7 +1930,6 @@ static inline int input_available_p(struct tty_struct *tty, int poll)
  *     caller holds non-exclusive termios_rwsem
  *     read_tail published
  */
-
 static int copy_from_read_buf(struct tty_struct *tty,
 				      unsigned char __user **b,
 				      size_t *nr)
@@ -2012,7 +1985,6 @@ static int copy_from_read_buf(struct tty_struct *tty,
  *     caller holds non-exclusive termios_rwsem
  *     read_tail published
  */
-
 static int canon_copy_from_read_buf(struct tty_struct *tty,
 				    unsigned char __user **b,
 				    size_t *nr)
@@ -2093,7 +2065,6 @@ extern ssize_t redirected_tty_write(struct file *, const char __user *,
  *          current->signal->tty check is safe
  *          ctrl_lock to safely reference tty->pgrp
  */
-
 static int job_control(struct tty_struct *tty, struct file *file)
 {
 	/* Job control check -- must be done at start and after
@@ -2126,7 +2097,6 @@ static int job_control(struct tty_struct *tty, struct file *file)
  *     claims non-exclusive termios_rwsem
  *     publishes read_tail
  */
-
 static ssize_t n_tty_read(struct tty_struct *tty, struct file *file,
 			 unsigned char __user *buf, size_t nr)
 {
@@ -2295,7 +2265,6 @@ static ssize_t n_tty_read(struct tty_struct *tty, struct file *file,
  *          (note that the process_output*() functions take this
  *          lock themselves)
  */
-
 static ssize_t n_tty_write(struct tty_struct *tty, struct file *file,
 			   const unsigned char *buf, size_t nr)
 {
@@ -2396,7 +2365,6 @@ static ssize_t n_tty_write(struct tty_struct *tty, struct file *file,
  * This code must be sure never to sleep through a hangup.
  * Called without the kernel lock held - fine
  */
-
 static __poll_t n_tty_poll(struct tty_struct *tty, struct file *file,
 							poll_table *wait)
 {
@@ -2487,7 +2455,6 @@ static struct tty_ldisc_ops n_tty_ops = {
  *
  * Enables a 'subclass' line discipline to 'inherit' N_TTY methods.
  */
-
 void n_tty_inherit_ops(struct tty_ldisc_ops *ops)
 {
 	*ops = n_tty_ops;
diff --git a/drivers/tty/pty.c b/drivers/tty/pty.c
index a8ec902fd9be..35cb13995c1c 100644
--- a/drivers/tty/pty.c
+++ b/drivers/tty/pty.c
@@ -106,7 +106,6 @@ static void pty_unthrottle(struct tty_struct *tty)
  * end of the link as if we were an IRQ handler receiving stuff for
  * the other side of the pty/tty pair.
  */
-
 static int pty_write(struct tty_struct *tty, const unsigned char *buf, int c)
 {
 	struct tty_struct *to = tty->link;
@@ -134,7 +133,6 @@ static int pty_write(struct tty_struct *tty, const unsigned char *buf, int c)
  * Report how many bytes the ldisc can send into the queue for
  * the other device.
  */
-
 static int pty_write_room(struct tty_struct *tty)
 {
 	if (tty->stopped)
@@ -149,7 +147,6 @@ static int pty_write_room(struct tty_struct *tty)
  * Report how much we have in the transmit queue. As everything is
  * instantly at the other end this is easy to implement.
  */
-
 static int pty_chars_in_buffer(struct tty_struct *tty)
 {
 	return 0;
@@ -298,7 +295,6 @@ static void pty_set_termios(struct tty_struct *tty,
  * Update the termios variables and send the necessary signals to
  * peform a terminal resize correctly
  */
-
 static int pty_resize(struct tty_struct *tty,  struct winsize *ws)
 {
 	struct pid *pgrp, *rpgrp;
@@ -694,7 +690,6 @@ static long pty_unix98_compat_ioctl(struct tty_struct *tty,
  * Look up a pty master device. Called under the tty_mutex for now.
  * This provides our locking.
  */
-
 static struct tty_struct *ptm_unix98_lookup(struct tty_driver *driver,
 		struct file *file, int idx)
 {
@@ -710,7 +705,6 @@ static struct tty_struct *ptm_unix98_lookup(struct tty_driver *driver,
  * Look up a pty master device. Called under the tty_mutex for now.
  * This provides our locking for the tty pointer.
  */
-
 static struct tty_struct *pts_unix98_lookup(struct tty_driver *driver,
 		struct file *file, int idx)
 {
@@ -797,7 +791,6 @@ static const struct tty_operations pty_unix98_ops = {
  *          protect the rest.
  *          allocated_ptys_lock handles the list of free pty numbers
  */
-
 static int ptmx_open(struct inode *inode, struct file *filp)
 {
 	struct pts_fs_info *fsi;
diff --git a/drivers/tty/serial/ifx6x60.c b/drivers/tty/serial/ifx6x60.c
index 3ddd320162c0..63c8b9f8c7b7 100644
--- a/drivers/tty/serial/ifx6x60.c
+++ b/drivers/tty/serial/ifx6x60.c
@@ -985,7 +985,6 @@ static int ifx_spi_reset(struct ifx_spi_device *ifx_dev)
  * -	Support for multiple devices
  * -	Split out MID specific GPIO handling eventually
  */
-
 static int ifx_spi_spi_probe(struct spi_device *spi)
 {
 	int ret;
@@ -1224,7 +1223,6 @@ static int ifx_spi_spi_probe(struct spi_device *spi)
  * FIXME: We should be shutting the device down here not in
  * the module unload path.
  */
-
 static int ifx_spi_spi_remove(struct spi_device *spi)
 {
 	struct ifx_spi_device *ifx_dev = spi_get_drvdata(spi);
@@ -1253,7 +1251,6 @@ static int ifx_spi_spi_remove(struct spi_device *spi)
  *
  * No action needs to be taken here
  */
-
 static void ifx_spi_spi_shutdown(struct spi_device *spi)
 {
 	struct ifx_spi_device *ifx_dev = spi_get_drvdata(spi);
@@ -1363,7 +1360,6 @@ static struct spi_driver ifx_spi_driver = {
  *
  * Unload the module.
  */
-
 static void __exit ifx_spi_exit(void)
 {
 	/* unregister */
@@ -1380,7 +1376,6 @@ static void __exit ifx_spi_exit(void)
  * We need to initialize upper-edge spi driver after the tty
  * driver because otherwise the spi probe will race
  */
-
 static int __init ifx_spi_init(void)
 {
 	int result;
diff --git a/drivers/tty/serial/ioc3_serial.c b/drivers/tty/serial/ioc3_serial.c
index f0f76ea6f8ea..08c2206f4378 100644
--- a/drivers/tty/serial/ioc3_serial.c
+++ b/drivers/tty/serial/ioc3_serial.c
@@ -1110,7 +1110,6 @@ static void ioc3_cb_post_ncs(struct uart_port *the_port, int ncs)
  * @buf: place to put the stuff we read
  * @len: how big 'buf' is
  */
-
 static inline int do_read(struct uart_port *the_port, char *buf, int len)
 {
 	int prod_ptr, cons_ptr, total;
@@ -1426,7 +1425,6 @@ static int receive_chars(struct uart_port *the_port)
  * @idd: driver data
  * @pending: interrupts to handle
  */
-
 static inline int
 ioc3uart_intr_one(struct ioc3_submodule *is,
 			struct ioc3_driver_data *idd,
@@ -1626,7 +1624,6 @@ ioc3uart_intr_one(struct ioc3_submodule *is,
  * @pending: interrupts to handle
  *
  */
-
 static int ioc3uart_intr(struct ioc3_submodule *is,
 			struct ioc3_driver_data *idd,
 			unsigned int pending)
@@ -1964,7 +1961,6 @@ static inline int ioc3_serial_core_attach( struct ioc3_submodule *is,
  * @is: submodule struct for this submodule
  * @idd: ioc3 driver data for this submodule
  */
-
 static int ioc3uart_remove(struct ioc3_submodule *is,
 			struct ioc3_driver_data *idd)
 {
@@ -2002,7 +1998,6 @@ static int ioc3uart_remove(struct ioc3_submodule *is,
  * @is: submodule struct for this submodule
  * @idd: ioc3 driver data for this card
  */
-
 static int
 ioc3uart_probe(struct ioc3_submodule *is, struct ioc3_driver_data *idd)
 {
diff --git a/drivers/tty/serial/ioc4_serial.c b/drivers/tty/serial/ioc4_serial.c
index 804002fae0ee..e2073a0e48d4 100644
--- a/drivers/tty/serial/ioc4_serial.c
+++ b/drivers/tty/serial/ioc4_serial.c
@@ -986,7 +986,6 @@ intr_connect(struct ioc4_soft *soft, int type,
  * @irq: irq value
  * @arg: handler arg
  */
-
 static irqreturn_t ioc4_intr(int irq, void *arg)
 {
 	struct ioc4_soft *soft;
@@ -2064,7 +2063,6 @@ static void ioc4_cb_post_ncs(struct uart_port *the_port, int ncs)
  * @buf: place to put the stuff we read
  * @len: how big 'buf' is
  */
-
 static inline int do_read(struct uart_port *the_port, unsigned char *buf,
 				int len)
 {
@@ -2637,7 +2635,6 @@ static struct uart_driver ioc4_uart_rs422 = {
  *
  * @idd: IOC4 master module data for this IOC4
  */
-
 static int ioc4_serial_remove_one(struct ioc4_driver_data *idd)
 {
 	int port_num, port_type;
diff --git a/drivers/tty/serial/men_z135_uart.c b/drivers/tty/serial/men_z135_uart.c
index 784756139935..59aee786820c 100644
--- a/drivers/tty/serial/men_z135_uart.c
+++ b/drivers/tty/serial/men_z135_uart.c
@@ -860,7 +860,6 @@ static int men_z135_probe(struct mcb_device *mdev,
 
 /**
  * men_z135_remove() - Remove a z135 instance from the system
- *
  * @mdev: The MCB device
  */
 static void men_z135_remove(struct mcb_device *mdev)
diff --git a/drivers/tty/serial/sn_console.c b/drivers/tty/serial/sn_console.c
index 2c01168319db..f78aabce3f0d 100644
--- a/drivers/tty/serial/sn_console.c
+++ b/drivers/tty/serial/sn_console.c
@@ -835,7 +835,6 @@ device_initcall(sn_sal_init);
  * ia64_sn_console_putb (what sal_puts_raw below actually does).
  *
  */
-
 static void puts_raw_fixed(int (*puts_raw) (const char *s, int len),
 			   const char *s, int count)
 {
diff --git a/drivers/tty/tty_baudrate.c b/drivers/tty/tty_baudrate.c
index a3c4969d4265..fac79ff29fb1 100644
--- a/drivers/tty/tty_baudrate.c
+++ b/drivers/tty/tty_baudrate.c
@@ -57,7 +57,6 @@ static int n_baud_table = ARRAY_SIZE(baud_table);
  *
  * Locking: none
  */
-
 speed_t tty_termios_baud_rate(struct ktermios *termios)
 {
 	unsigned int cbaud;
@@ -92,7 +91,6 @@ EXPORT_SYMBOL(tty_termios_baud_rate);
  *
  * Locking: none
  */
-
 speed_t tty_termios_input_baud_rate(struct ktermios *termios)
 {
 #ifdef IBSHIFT
@@ -141,7 +139,6 @@ EXPORT_SYMBOL(tty_termios_input_baud_rate);
  * The ifdefs deal with platforms whose owners have yet to update them
  * and will all go away once this is done.
  */
-
 void tty_termios_encode_baud_rate(struct ktermios *termios,
 				  speed_t ibaud, speed_t obaud)
 {
@@ -233,7 +230,6 @@ EXPORT_SYMBOL_GPL(tty_termios_encode_baud_rate);
  * settings. The caller must hold the termios_rwsem for the tty in
  * question.
  */
-
 void tty_encode_baud_rate(struct tty_struct *tty, speed_t ibaud, speed_t obaud)
 {
 	tty_termios_encode_baud_rate(&tty->termios, ibaud, obaud);
diff --git a/drivers/tty/tty_buffer.c b/drivers/tty/tty_buffer.c
index 5f05500ee4d0..447f235eeb0c 100644
--- a/drivers/tty/tty_buffer.c
+++ b/drivers/tty/tty_buffer.c
@@ -52,7 +52,6 @@
  * On release, the buffer work is restarted if there is data in the
  * flip buffer
  */
-
 void tty_buffer_lock_exclusive(struct tty_port *port)
 {
 	struct tty_bufhead *buf = &port->buf;
@@ -87,7 +86,6 @@ EXPORT_SYMBOL_GPL(tty_buffer_unlock_exclusive);
  * the returned # of bytes (use tty_prepare_flip_string_xxx() to
  * pre-allocate if memory guarantee is required).
  */
-
 int tty_buffer_space_avail(struct tty_port *port)
 {
 	int space = port->buf.mem_limit - atomic_read(&port->buf.mem_used);
@@ -112,7 +110,6 @@ static void tty_buffer_reset(struct tty_buffer *p, size_t size)
  * Remove all the buffers pending on a tty whether queued with data
  * or in the free ring. Must be called when the tty is no longer in use
  */
-
 void tty_buffer_free_all(struct tty_port *port)
 {
 	struct tty_bufhead *buf = &port->buf;
@@ -152,7 +149,6 @@ void tty_buffer_free_all(struct tty_port *port)
  * Return NULL if out of memory or the allocation would exceed the
  * per device queue
  */
-
 static struct tty_buffer *tty_buffer_alloc(struct tty_port *port, size_t size)
 {
 	struct llist_node *free;
@@ -191,7 +187,6 @@ static struct tty_buffer *tty_buffer_alloc(struct tty_port *port, size_t size)
  * Free a tty buffer, or add it to the free list according to our
  * internal strategy
  */
-
 static void tty_buffer_free(struct tty_port *port, struct tty_buffer *b)
 {
 	struct tty_bufhead *buf = &port->buf;
@@ -216,7 +211,6 @@ static void tty_buffer_free(struct tty_port *port, struct tty_buffer *b)
  * Locking: takes buffer lock to ensure single-threaded flip buffer
  *          'consumer'
  */
-
 void tty_buffer_flush(struct tty_struct *tty, struct tty_ldisc *ld)
 {
 	struct tty_port *port = tty->port;
@@ -308,7 +302,6 @@ EXPORT_SYMBOL_GPL(tty_buffer_request_room);
  * Queue a series of bytes to the tty buffering. All the characters
  * passed are marked with the supplied flag. Returns the number added.
  */
-
 int tty_insert_flip_string_fixed_flag(struct tty_port *port,
 		const unsigned char *chars, char flag, size_t size)
 {
@@ -344,7 +337,6 @@ EXPORT_SYMBOL(tty_insert_flip_string_fixed_flag);
  * the flags array indicates the status of the character. Returns the
  * number added.
  */
-
 int tty_insert_flip_string_flags(struct tty_port *port,
 		const unsigned char *chars, const char *flags, size_t size)
 {
@@ -402,7 +394,6 @@ EXPORT_SYMBOL(__tty_insert_flip_char);
  * ldisc side of the queue. It then schedules those characters for
  * processing by the line discipline.
  */
-
 void tty_schedule_flip(struct tty_port *port)
 {
 	struct tty_bufhead *buf = &port->buf;
@@ -427,7 +418,6 @@ EXPORT_SYMBOL(tty_schedule_flip);
  * that need their own block copy routines into the buffer. There is no
  * guarantee the buffer is a DMA target!
  */
-
 int tty_prepare_flip_string(struct tty_port *port, unsigned char **chars,
 		size_t size)
 {
@@ -497,7 +487,6 @@ receive_buf(struct tty_port *port, struct tty_buffer *head, int count)
  * Locking: takes buffer lock to ensure single-threaded flip buffer
  *          'consumer'
  */
-
 static void flush_to_ldisc(struct work_struct *work)
 {
 	struct tty_port *port = container_of(work, struct tty_port, buf.work);
@@ -551,7 +540,6 @@ static void flush_to_ldisc(struct work_struct *work)
  * In the event of the queue being busy for flipping the work will be
  * held off and retried later.
  */
-
 void tty_flip_buffer_push(struct tty_port *port)
 {
 	tty_schedule_flip(port);
@@ -565,7 +553,6 @@ EXPORT_SYMBOL(tty_flip_buffer_push);
  * Set up the initial state of the buffer management for a tty device.
  * Must be called before the other tty buffer functions are used.
  */
-
 void tty_buffer_init(struct tty_port *port)
 {
 	struct tty_bufhead *buf = &port->buf;
@@ -588,7 +575,6 @@ void tty_buffer_init(struct tty_port *port)
  * Change the tty buffer memory limit.
  * Must be called before the other tty buffer functions are used.
  */
-
 int tty_buffer_set_limit(struct tty_port *port, int limit)
 {
 	if (limit < MIN_TTYB_SIZE)
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index 695d80c7a030..938c9966c459 100644
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
@@ -165,7 +165,6 @@ static void release_tty(struct tty_struct *tty, int idx);
  *
  * Locking: none. Must be called after tty is definitely unused
  */
-
 static void free_tty_struct(struct tty_struct *tty)
 {
 	tty_ldisc_deinit(tty);
@@ -241,7 +240,6 @@ static void tty_del_file(struct file *file)
  *
  * Locking: none
  */
-
 const char *tty_name(const struct tty_struct *tty)
 {
 	if (!tty) /* Hmm.  NULL pointer.  That's fun. */
@@ -313,7 +311,6 @@ static int check_tty_count(struct tty_struct *tty, const char *routine)
  *
  * Locking: caller must hold tty_mutex
  */
-
 static struct tty_driver *get_tty_driver(dev_t device, int *index)
 {
 	struct tty_driver *p;
@@ -520,7 +517,6 @@ static struct file *redirect;
  * informs the line discipline if present that the driver is ready
  * to receive more output data.
  */
-
 void tty_wakeup(struct tty_struct *tty)
 {
 	struct tty_ldisc *ld;
@@ -670,7 +666,6 @@ static void do_tty_hangup(struct work_struct *work)
  * A carrier loss (virtual or otherwise) has occurred on this like
  * schedule a hangup sequence to run after this event.
  */
-
 void tty_hangup(struct tty_struct *tty)
 {
 	tty_debug_hangup(tty, "hangup\n");
@@ -687,7 +682,6 @@ EXPORT_SYMBOL(tty_hangup);
  * We do this synchronously so that when the syscall returns the process
  * is complete. That guarantee is necessary for security reasons.
  */
-
 void tty_vhangup(struct tty_struct *tty)
 {
 	tty_debug_hangup(tty, "vhangup\n");
@@ -702,7 +696,6 @@ EXPORT_SYMBOL(tty_vhangup);
  *
  * Perform a vhangup on the current controlling tty
  */
-
 void tty_vhangup_self(void)
 {
 	struct tty_struct *tty;
@@ -724,7 +717,6 @@ void tty_vhangup_self(void)
  * We do this synchronously so that when the syscall returns the process
  * is complete. That guarantee is necessary for security reasons.
  */
-
 void tty_vhangup_session(struct tty_struct *tty)
 {
 	tty_debug_hangup(tty, "session hangup\n");
@@ -738,7 +730,6 @@ void tty_vhangup_session(struct tty_struct *tty)
  * Return true if the tty has been subject to a vhangup or a carrier
  * loss
  */
-
 int tty_hung_up_p(struct file *filp)
 {
 	return (filp && filp->f_op == &hung_up_tty_fops);
@@ -762,7 +753,6 @@ EXPORT_SYMBOL(tty_hung_up_p);
  * Locking:
  *         flow_lock
  */
-
 void __stop_tty(struct tty_struct *tty)
 {
 	if (tty->stopped)
@@ -793,7 +783,6 @@ EXPORT_SYMBOL(stop_tty);
  * Locking:
  *         flow_lock
  */
-
 void __start_tty(struct tty_struct *tty)
 {
 	if (!tty->stopped || tty->flow_stopped)
@@ -842,7 +831,6 @@ static void tty_update_time(struct timespec64 *time)
  *         Locks the line discipline internally while needed. Multiple
  * read calls may be outstanding in parallel.
  */
-
 static ssize_t tty_read(struct file *file, char __user *buf, size_t count,
 			loff_t *ppos)
 {
@@ -988,7 +976,6 @@ static inline ssize_t do_tty_write(
  *
  * We must still hold the BTM and test the CLOSING flag for the moment.
  */
-
 void tty_write_message(struct tty_struct *tty, char *msg)
 {
 	if (tty) {
@@ -1018,7 +1005,6 @@ void tty_write_message(struct tty_struct *tty, char *msg)
  * and are then processed in chunks to the device. The line discipline
  * write method will not be invoked in parallel for each device.
  */
-
 static ssize_t tty_write(struct file *file, const char __user *buf,
 						size_t count, loff_t *ppos)
 {
@@ -1070,7 +1056,6 @@ ssize_t redirected_tty_write(struct file *file, const char __user *buf,
  *
  * Locking: none for xchar method, write ordering for write method.
  */
-
 int tty_send_xchar(struct tty_struct *tty, char ch)
 {
 	int	was_stopped = tty->stopped;
@@ -1173,7 +1158,6 @@ static struct tty_struct *tty_driver_lookup_tty(struct tty_driver *driver,
  * Initialise the termios structures for this tty. Thus runs under
  * the tty_mutex currently so we can be relaxed about ordering.
  */
-
 void tty_init_termios(struct tty_struct *tty)
 {
 	struct ktermios *tp;
@@ -1302,7 +1286,6 @@ static int tty_reopen(struct tty_struct *tty)
  * really quite straightforward.  The mutex locking can probably be
  * relaxed for the (most common) case of reopening a tty.
  */
-
 struct tty_struct *tty_init_dev(struct tty_driver *driver, int idx)
 {
 	struct tty_struct *tty;
@@ -1463,7 +1446,6 @@ static void queue_release_one_tty(struct kref *kref)
  * Release a reference to a tty device and if need be let the kref
  * layer destruct the object for us
  */
-
 void tty_kref_put(struct tty_struct *tty)
 {
 	if (tty)
@@ -1627,7 +1609,6 @@ EXPORT_SYMBOL_GPL(tty_release_struct);
  * WSH 09/09/97: rewritten to avoid some nasty race conditions that could
  * lead to double frees or releasing memory still in use.
  */
-
 int tty_release(struct inode *inode, struct file *filp)
 {
 	struct tty_struct *tty = file_tty(filp);
@@ -1992,7 +1973,6 @@ static struct tty_struct *tty_open_by_driver(dev_t device, struct inode *inode,
  * Note: the tty_unlock/lock cases without a ref are only safe due to
  * tty_mutex
  */
-
 static int tty_open(struct inode *inode, struct file *filp)
 {
 	struct tty_struct *tty;
@@ -2076,7 +2056,6 @@ static int tty_open(struct inode *inode, struct file *filp)
  * Locking: locks called line discipline but ldisc poll method
  * may be re-entered freely by other callers.
  */
-
 static __poll_t tty_poll(struct file *filp, poll_table *wait)
 {
 	struct tty_struct *tty = file_tty(filp);
@@ -2159,7 +2138,6 @@ static int tty_fasync(int fd, struct file *filp, int on)
  *
  * FIXME: may race normal receive processing
  */
-
 static int tiocsti(struct tty_struct *tty, char __user *p)
 {
 	char ch, mbz = 0;
@@ -2188,7 +2166,6 @@ static int tiocsti(struct tty_struct *tty, char __user *p)
  * Locking: tty->winsize_mutex is taken to ensure the winsize data
  *          is consistent.
  */
-
 static int tiocgwinsz(struct tty_struct *tty, struct winsize __user *arg)
 {
 	int err;
@@ -2209,7 +2186,6 @@ static int tiocgwinsz(struct tty_struct *tty, struct winsize __user *arg)
  * Update the termios variables and send the necessary signals to
  * peform a terminal resize correctly
  */
-
 int tty_do_resize(struct tty_struct *tty, struct winsize *ws)
 {
 	struct pid *pgrp;
@@ -2246,7 +2222,6 @@ EXPORT_SYMBOL(tty_do_resize);
  * tty termios mutex and ctrl_lock. The console takes its own lock
  * then calls into the default method.
  */
-
 static int tiocswinsz(struct tty_struct *tty, struct winsize __user *arg)
 {
 	struct winsize tmp_ws;
@@ -2267,7 +2242,6 @@ static int tiocswinsz(struct tty_struct *tty, struct winsize __user *arg)
  *
  * Locking: uses redirect_lock to guard the redirect information
  */
-
 static int tioccons(struct file *file)
 {
 	if (!capable(CAP_SYS_ADMIN))
@@ -2303,7 +2277,6 @@ static int tioccons(struct file *file)
  *
  * Locking: none, the open file handle ensures it won't go away.
  */
-
 static int fionbio(struct file *file, int __user *p)
 {
 	int nonblock;
@@ -2329,7 +2302,6 @@ static int fionbio(struct file *file, int __user *p)
  *
  * Locking: see tty_set_ldisc, this function is just a helper
  */
-
 static int tiocsetd(struct tty_struct *tty, int __user *p)
 {
 	int disc;
@@ -2353,7 +2325,6 @@ static int tiocsetd(struct tty_struct *tty, int __user *p)
  * Locking: waits for ldisc reference (in case the line discipline
  *          is changing or the tty is being hungup)
  */
-
 static int tiocgetd(struct tty_struct *tty, int __user *p)
 {
 	struct tty_ldisc *ld;
@@ -2379,7 +2350,6 @@ static int tiocgetd(struct tty_struct *tty, int __user *p)
  *         atomic_write_lock serializes
  *
  */
-
 static int send_break(struct tty_struct *tty, unsigned int duration)
 {
 	int retval;
@@ -2418,7 +2388,6 @@ static int send_break(struct tty_struct *tty, unsigned int duration)
  *
  * Locking: none (up to the driver)
  */
-
 static int tty_tiocmget(struct tty_struct *tty, int __user *p)
 {
 	int retval = -EINVAL;
@@ -2443,7 +2412,6 @@ static int tty_tiocmget(struct tty_struct *tty, int __user *p)
  *
  * Locking: none (up to the driver)
  */
-
 static int tty_tiocmset(struct tty_struct *tty, unsigned int cmd,
 	     unsigned __user *p)
 {
@@ -2810,7 +2778,6 @@ static struct device *tty_get_device(struct tty_struct *tty)
  *
  * Locking: none - tty in question is not exposed at this point
  */
-
 struct tty_struct *alloc_tty_struct(struct tty_driver *driver, int idx)
 {
 	struct tty_struct *tty;
@@ -2862,7 +2829,6 @@ struct tty_struct *alloc_tty_struct(struct tty_driver *driver, int idx)
  * Note: the specific put_char operation in the driver layer may go
  * away soon. Don't call it directly, use this method
  */
-
 int tty_put_char(struct tty_struct *tty, unsigned char ch)
 {
 	if (tty->ops->put_char)
@@ -2908,7 +2874,6 @@ static int tty_cdev_add(struct tty_driver *driver, dev_t dev,
  *
  * Locking: ??
  */
-
 struct device *tty_register_device(struct tty_driver *driver, unsigned index,
 				   struct device *device)
 {
@@ -3022,7 +2987,6 @@ EXPORT_SYMBOL_GPL(tty_register_device_attr);
  *
  * Locking: ??
  */
-
 void tty_unregister_device(struct tty_driver *driver, unsigned index)
 {
 	device_destroy(tty_class,
diff --git a/drivers/tty/tty_ioctl.c b/drivers/tty/tty_ioctl.c
index cb72dc6085d8..ca5d3923342d 100644
--- a/drivers/tty/tty_ioctl.c
+++ b/drivers/tty/tty_ioctl.c
@@ -52,7 +52,6 @@
  * output queue. If no private method is supplied there is assumed
  * to be no queue on the device.
  */
-
 int tty_chars_in_buffer(struct tty_struct *tty)
 {
 	if (tty->ops->chars_in_buffer)
@@ -72,7 +71,6 @@ EXPORT_SYMBOL(tty_chars_in_buffer);
  * the number of bytes written. If no method is provided 2K is always
  * returned and data may be lost as there will be no flow control.
  */
-
 int tty_write_room(struct tty_struct *tty)
 {
 	if (tty->ops->write_room)
@@ -105,7 +103,6 @@ EXPORT_SYMBOL(tty_driver_flush_buffer);
  * and also to ensure the driver can consistently reference its own
  * termios data at this point when implementing software flow control.
  */
-
 void tty_throttle(struct tty_struct *tty)
 {
 	down_write(&tty->termios_rwsem);
@@ -130,7 +127,6 @@ EXPORT_SYMBOL(tty_throttle);
  * Drivers should however remember that the stack can issue a throttle,
  * then change flow control method, then unthrottle.
  */
-
 void tty_unthrottle(struct tty_struct *tty)
 {
 	down_write(&tty->termios_rwsem);
@@ -153,7 +149,6 @@ EXPORT_SYMBOL(tty_unthrottle);
  *
  * Returns 0 if tty is throttled (or was already throttled)
  */
-
 int tty_throttle_safe(struct tty_struct *tty)
 {
 	int ret = 0;
@@ -184,7 +179,6 @@ int tty_throttle_safe(struct tty_struct *tty)
  *
  * Returns 0 if tty is unthrottled (or was already unthrottled)
  */
-
 int tty_unthrottle_safe(struct tty_struct *tty)
 {
 	int ret = 0;
@@ -214,7 +208,6 @@ int tty_unthrottle_safe(struct tty_struct *tty)
  *
  * Locking: none
  */
-
 void tty_wait_until_sent(struct tty_struct *tty, long timeout)
 {
 	tty_debug_wait_until_sent(tty, "wait until sent, timeout=%ld\n", timeout);
@@ -310,7 +303,6 @@ EXPORT_SYMBOL(tty_termios_hw_change);
  *
  * Locking: termios_rwsem
  */
-
 int tty_set_termios(struct tty_struct *tty, struct ktermios *new_termios)
 {
 	struct ktermios old_termios;
@@ -358,7 +350,6 @@ EXPORT_SYMBOL_GPL(tty_set_termios);
  * Locking:
  *         Called functions take ldisc and termios_rwsem locks
  */
-
 static int set_termios(struct tty_struct *tty, void __user *arg, int opt)
 {
 	struct ktermios tmp_termios;
@@ -455,7 +446,6 @@ static int get_termio(struct tty_struct *tty, struct termio __user *termio)
  * Implement the device calling points for the SYS5 termiox ioctl
  * interface in Linux
  */
-
 static int set_termiox(struct tty_struct *tty, void __user *arg, int opt)
 {
 	struct termiox tnew;
@@ -563,7 +553,6 @@ static void set_sgflags(struct ktermios *termios, int flags)
  *
  * Locking: termios_rwsem
  */
-
 static int set_sgttyb(struct tty_struct *tty, struct sgttyb __user *sgttyb)
 {
 	int retval;
@@ -674,7 +663,6 @@ static int set_ltchars(struct tty_struct *tty, struct ltchars __user *ltchars)
  * Perform a change to the CLOCAL state and call into the driver
  * layer to make it visible. All done with the termios rwsem
  */
-
 static int tty_change_softcar(struct tty_struct *tty, int arg)
 {
 	int ret = 0;
@@ -704,7 +692,6 @@ static int tty_change_softcar(struct tty_struct *tty, int arg)
  * is designed to be called by line disciplines to ensure they provide
  * consistent mode setting.
  */
-
 int tty_mode_ioctl(struct tty_struct *tty, struct file *file,
 			unsigned int cmd, unsigned long arg)
 {
diff --git a/drivers/tty/tty_ldisc.c b/drivers/tty/tty_ldisc.c
index d86c4c516f25..d54985ea6088 100644
--- a/drivers/tty/tty_ldisc.c
+++ b/drivers/tty/tty_ldisc.c
@@ -57,7 +57,6 @@ static struct tty_ldisc_ops *tty_ldiscs[NR_LDISCS];
  * Locking:
  *         takes tty_ldiscs_lock to guard against ldisc races
  */
-
 int tty_register_ldisc(int disc, struct tty_ldisc_ops *new_ldisc)
 {
 	unsigned long flags;
@@ -87,7 +86,6 @@ EXPORT_SYMBOL(tty_register_ldisc);
  * Locking:
  *         takes tty_ldiscs_lock to guard against ldisc races
  */
-
 int tty_unregister_ldisc(int disc)
 {
 	unsigned long flags;
@@ -155,7 +153,6 @@ static void put_ldops(struct tty_ldisc_ops *ldops)
  * Locking:
  *         takes tty_ldiscs_lock to guard against ldisc races
  */
-
 static struct tty_ldisc *tty_ldisc_get(struct tty_struct *tty, int disc)
 {
 	struct tty_ldisc *ld;
@@ -255,7 +252,6 @@ const struct seq_operations tty_ldiscs_seq_ops = {
  * Note: a file_operations routine (read/poll/write) should use this
  * function to wait for any ldisc lifetime events to finish.
  */
-
 struct tty_ldisc *tty_ldisc_ref_wait(struct tty_struct *tty)
 {
 	struct tty_ldisc *ld;
@@ -276,7 +272,6 @@ EXPORT_SYMBOL_GPL(tty_ldisc_ref_wait);
  * reference to it. If the line discipline is in flux then
  * return NULL. Can be called from IRQ and timer functions.
  */
-
 struct tty_ldisc *tty_ldisc_ref(struct tty_struct *tty)
 {
 	struct tty_ldisc *ld = NULL;
@@ -297,7 +292,6 @@ EXPORT_SYMBOL_GPL(tty_ldisc_ref);
  * Undoes the effect of tty_ldisc_ref or tty_ldisc_ref_wait. May
  * be called in IRQ context.
  */
-
 void tty_ldisc_deref(struct tty_ldisc *ld)
 {
 	ldsem_up_read(&ld->tty->ldisc_sem);
@@ -396,7 +390,6 @@ static void tty_ldisc_unlock_pair(struct tty_struct *tty,
  * Flush the line discipline queue (if any) and the tty flip buffers
  * for this tty.
  */
-
 void tty_ldisc_flush(struct tty_struct *tty)
 {
 	struct tty_ldisc *ld = tty_ldisc_ref(tty);
@@ -422,7 +415,6 @@ EXPORT_SYMBOL_GPL(tty_ldisc_flush);
  *
  * Locking: takes termios_rwsem
  */
-
 static void tty_set_termios_ldisc(struct tty_struct *tty, int disc)
 {
 	down_write(&tty->termios_rwsem);
@@ -443,7 +435,6 @@ static void tty_set_termios_ldisc(struct tty_struct *tty, int disc)
  *
  * Locking: always called with BTM already held.
  */
-
 static int tty_ldisc_open(struct tty_struct *tty, struct tty_ldisc *ld)
 {
 	WARN_ON(test_and_set_bit(TTY_LDISC_OPEN, &tty->flags));
@@ -468,7 +459,6 @@ static int tty_ldisc_open(struct tty_struct *tty, struct tty_ldisc *ld)
  * A helper close method. Also a convenient debugging and check
  * point.
  */
-
 static void tty_ldisc_close(struct tty_struct *tty, struct tty_ldisc *ld)
 {
 	WARN_ON(!test_bit(TTY_LDISC_OPEN, &tty->flags));
@@ -486,7 +476,6 @@ static void tty_ldisc_close(struct tty_struct *tty, struct tty_ldisc *ld)
  * Helper to try and recover a tty when switching back to the old
  * ldisc fails and we need something attached.
  */
-
 static int tty_ldisc_failto(struct tty_struct *tty, int ld)
 {
 	struct tty_ldisc *disc = tty_ldisc_get(tty, ld);
@@ -509,7 +498,6 @@ static int tty_ldisc_failto(struct tty_struct *tty, int ld)
  * Restore the previous line discipline or N_TTY when a line discipline
  * change fails due to an open error
  */
-
 static void tty_ldisc_restore(struct tty_struct *tty, struct tty_ldisc *old)
 {
 	/* There is an outstanding reference here so this is safe */
@@ -536,7 +524,6 @@ static void tty_ldisc_restore(struct tty_struct *tty, struct tty_ldisc *old)
  * overlapping ldisc change (including on the other end of pty pairs),
  * the close of one side of a tty/pty pair, and eventually hangup.
  */
-
 int tty_set_ldisc(struct tty_struct *tty, int disc)
 {
 	int retval;
@@ -632,7 +619,6 @@ static void tty_ldisc_kill(struct tty_struct *tty)
  *
  * Restore a terminal to the driver default state.
  */
-
 static void tty_reset_termios(struct tty_struct *tty)
 {
 	down_write(&tty->termios_rwsem);
@@ -656,7 +642,6 @@ static void tty_reset_termios(struct tty_struct *tty)
  *
  * Returns 0 if successful, otherwise error code < 0
  */
-
 int tty_ldisc_reinit(struct tty_struct *tty, int disc)
 {
 	struct tty_ldisc *ld;
@@ -698,7 +683,6 @@ int tty_ldisc_reinit(struct tty_struct *tty, int disc)
  * In the pty pair case this occurs in the close() path of the
  * tty itself so we must be careful about locking rules.
  */
-
 void tty_ldisc_hangup(struct tty_struct *tty, bool reinit)
 {
 	struct tty_ldisc *ld;
@@ -752,7 +736,6 @@ void tty_ldisc_hangup(struct tty_struct *tty, bool reinit)
  * line disciplines and bind them to the tty. This has no locking issues
  * as the device isn't yet active.
  */
-
 int tty_ldisc_setup(struct tty_struct *tty, struct tty_struct *o_tty)
 {
 	int retval = tty_ldisc_open(tty, tty->ldisc);
@@ -776,7 +759,6 @@ int tty_ldisc_setup(struct tty_struct *tty, struct tty_struct *o_tty)
  * Called during the final close of a tty or a pty pair in order to shut
  * down the line discpline layer. On exit, each tty's ldisc is NULL.
  */
-
 void tty_ldisc_release(struct tty_struct *tty)
 {
 	struct tty_struct *o_tty = tty->link;
@@ -806,7 +788,6 @@ EXPORT_SYMBOL_GPL(tty_ldisc_release);
  * Set up the line discipline objects for a newly allocated tty. Note that
  * the tty structure is not completely set up when this call is made.
  */
-
 int tty_ldisc_init(struct tty_struct *tty)
 {
 	struct tty_ldisc *ld = tty_ldisc_get(tty, N_TTY);
diff --git a/drivers/tty/vt/vt_ioctl.c b/drivers/tty/vt/vt_ioctl.c
index 0d1b232cb5fd..46062e984daa 100644
--- a/drivers/tty/vt/vt_ioctl.c
+++ b/drivers/tty/vt/vt_ioctl.c
@@ -86,7 +86,6 @@ static DECLARE_WAIT_QUEUE_HEAD(vt_event_waitqueue);
  *
  * Post an VT event to interested VT handlers
  */
-
 void vt_event_post(unsigned int event, unsigned int old, unsigned int new)
 {
 	struct list_head *pos, *head;
@@ -163,7 +162,6 @@ static void vt_event_wait(struct vt_event_wait *vw)
  *
  * Implement the VT_WAITEVENT ioctl using the VT event interface
  */
-
 static int vt_event_wait_ioctl(struct vt_event __user *event)
 {
 	struct vt_event_wait vw;
@@ -192,7 +190,6 @@ static int vt_event_wait_ioctl(struct vt_event __user *event)
  * Helper for event waits. Used to implement the legacy
  * event waiting ioctls in terms of events
  */
-
 int vt_waitactive(int n)
 {
 	struct vt_event_wait vw;
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH v2 7/7] tty: Fix section format
  2018-10-18 22:37 [PATCH v2 0/7] drivers: tty: Fix kernel-docs comments Tobin C. Harding
                   ` (5 preceding siblings ...)
  2018-10-18 22:37 ` [PATCH v2 6/7] tty: Remove newline after function kernel-doc Tobin C. Harding
@ 2018-10-18 22:37 ` Tobin C. Harding
  6 siblings, 0 replies; 9+ messages in thread
From: Tobin C. Harding @ 2018-10-18 22:37 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Jiri Slaby
  Cc: Tobin C. Harding, Geert Uytterhoeven, linux-kernel

Currently sections (specifically 'Return:' and 'Context:') are
non-uniform and/or incorrectly labelled.  We should use the format
outlined in Documentation/doc-guide/kernel-doc.rst.  This patch is a bit
of a mash up because text is on occasions mixed up in the current
comments.

 - Use 'Context:' (Replaces 'Locking')

   * Context: Describes whether the function can sleep, what locks it
   *          takes, releases, or expects to be held. It can extend over
   *          multiple lines.

 - Use 'Return:'

   * Return: Describe the return value of foobar.
   *
   * The return value description can also have multiple paragraphs, and
   * should be placed at the end of the comment block.

 - If brief description is too long spilt it up into brief and longer.

   * A longer description, with more discussion of the function
   * function_name() that might be useful to those using or modifying
   * it. Begins with an empty comment line, and may include additional
   * embedded empty comment lines.

Fix brief description if missing and long description present.

This patch leaves some instances of 'Locking:' still in the code (if I
was not _sure_ of the documented locking or if changing it would make
the comment less legible).

Signed-off-by: Tobin C. Harding <tobin@kernel.org>
---
 drivers/tty/hvc/hvc_console.c       |   4 +-
 drivers/tty/hvc/hvc_iucv.c          |  14 +--
 drivers/tty/mips_ejtag_fdc.c        |   4 +-
 drivers/tty/n_gsm.c                 |  37 ++++----
 drivers/tty/n_hdlc.c                |  14 +--
 drivers/tty/n_tracerouter.c         |  14 ++-
 drivers/tty/n_tracesink.c           |  20 ++---
 drivers/tty/n_tty.c                 | 117 ++++++++++++-------------
 drivers/tty/pty.c                   |  19 ++--
 drivers/tty/serial/8250/8250_core.c |  14 +--
 drivers/tty/serial/amba-pl011.c     |   2 +-
 drivers/tty/serial/earlycon.c       |   4 +-
 drivers/tty/serial/ifx6x60.c        |  12 +--
 drivers/tty/serial/serial_txx9.c    |   5 +-
 drivers/tty/serial/xilinx_uartps.c  |  21 +++--
 drivers/tty/tty_audit.c             |   9 +-
 drivers/tty/tty_baudrate.c          |  31 +++----
 drivers/tty/tty_buffer.c            |  26 +++---
 drivers/tty/tty_io.c                | 129 +++++++++++++---------------
 drivers/tty/tty_ioctl.c             |  15 ++--
 drivers/tty/tty_jobctrl.c           |  20 ++---
 drivers/tty/tty_ldisc.c             |  43 +++++-----
 drivers/tty/tty_port.c              |   8 +-
 drivers/tty/vt/consolemap.c         |   4 +-
 drivers/tty/vt/keyboard.c           |   6 +-
 drivers/tty/vt/selection.c          |  10 ++-
 drivers/tty/vt/vt.c                 |  26 +++---
 27 files changed, 310 insertions(+), 318 deletions(-)

diff --git a/drivers/tty/hvc/hvc_console.c b/drivers/tty/hvc/hvc_console.c
index 6d57d0bfff5d..9379de272995 100644
--- a/drivers/tty/hvc/hvc_console.c
+++ b/drivers/tty/hvc/hvc_console.c
@@ -569,7 +569,7 @@ static int hvc_write(struct tty_struct *tty, const unsigned char *buf, int count
  * The routine shall not be called within an atomic context because it
  * might sleep.
  *
- * Locking:	hp->lock
+ * Context: Take hp->lock
  */
 static void hvc_set_winsz(struct work_struct *work)
 {
@@ -784,7 +784,7 @@ EXPORT_SYMBOL_GPL(hvc_poll);
  * Stores the specified window size information in the hvc structure of @hp.
  * The function schedule the tty resize update.
  *
- * Locking:	Locking free; the function MUST be called holding hp->lock
+ * Context: Locking free; the function MUST be called holding hp->lock
  */
 void __hvc_resize(struct hvc_struct *hp, struct winsize ws)
 {
diff --git a/drivers/tty/hvc/hvc_iucv.c b/drivers/tty/hvc/hvc_iucv.c
index 2af1e5751bd6..0de673b29b31 100644
--- a/drivers/tty/hvc/hvc_iucv.c
+++ b/drivers/tty/hvc/hvc_iucv.c
@@ -147,7 +147,8 @@ static struct hvc_iucv_private *hvc_iucv_get_private(uint32_t num)
  * required for receiving and sending data with IUCV.
  * Note: The total message size arises from the internal buffer size and the
  *	 members of the iucv_tty_msg structure.
- * The function returns NULL if memory allocation has failed.
+ *
+ * Return: NULL if memory allocation has failed.
  */
 static struct iucv_tty_buffer *alloc_tty_buffer(size_t size, gfp_t flags)
 {
@@ -210,9 +211,9 @@ static void destroy_tty_buffer_list(struct list_head *list)
  * If all message data has been written, the message is removed from
  * the input queue.
  *
- * The function returns the number of bytes written to the terminal, zero if
- * there are no pending data messages available or if there is no established
- * IUCV path.
+ * Return: The number of bytes written to the terminal, zero if there are no
+ * pending data messages available or if there is no established IUCV path.
+ *
  * If the IUCV path has been severed, then -EPIPE is returned to cause a
  * hang up (that is issued by the HVC layer).
  */
@@ -309,9 +310,8 @@ static int hvc_iucv_write(struct hvc_iucv_private *priv,
  * If an IUCV communication path has been established, pending IUCV messages
  * are received and data is copied into buffer @buf up to @count bytes.
  *
- * Locking:	The routine gets called under an irqsave() spinlock; and
- *		the routine locks the struct hvc_iucv_private->lock to call
- *		helper functions.
+ * Context: The routine gets called under an irqsave() spinlock; locks
+ *          the struct hvc_iucv_private->lock to call helper functions.
  */
 static int hvc_iucv_get_chars(uint32_t vtermno, char *buf, int count)
 {
diff --git a/drivers/tty/mips_ejtag_fdc.c b/drivers/tty/mips_ejtag_fdc.c
index 4c1cd49ae95b..6d2e9e145770 100644
--- a/drivers/tty/mips_ejtag_fdc.c
+++ b/drivers/tty/mips_ejtag_fdc.c
@@ -409,7 +409,7 @@ static struct mips_ejtag_fdc_console mips_ejtag_fdc_con = {
  * Write a single block of data out to the debug adapter. If the circular buffer
  * is wrapped then only the first block is written.
  *
- * Returns:	The number of bytes that were written.
+ * Return: The number of bytes that were written.
  */
 static unsigned int mips_ejtag_fdc_put_chan(struct mips_ejtag_fdc_tty *priv,
 					    unsigned int chan)
@@ -643,7 +643,7 @@ static void mips_ejtag_fdc_handle(struct mips_ejtag_fdc_tty *priv)
  *
  * It simply triggers the common FDC handler code.
  *
- * Returns:	IRQ_HANDLED if an FDC interrupt was pending.
+ * Return:	IRQ_HANDLED if an FDC interrupt was pending.
  *		IRQ_NONE otherwise.
  */
 static irqreturn_t mips_ejtag_fdc_isr(int irq, void *dev_id)
diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c
index c65a9afb7cc4..fbc8d0a15676 100644
--- a/drivers/tty/n_gsm.c
+++ b/drivers/tty/n_gsm.c
@@ -393,7 +393,8 @@ static inline u8 gsm_fcs_add_block(u8 fcs, u8 *c, int len)
  * @c: byte going into the EA
  *
  * Processes one byte of an EA. Updates the passed variable
- * and returns 1 if the EA is now completely read
+ *
+ * Return: 1 if the EA is now completely read.
  */
 static int gsm_read_ea(unsigned int *val, u8 c)
 {
@@ -701,8 +702,9 @@ static void gsm_data_kick(struct gsm_mux *gsm)
  * @msg: message queued
  *
  * Add data to the transmit queue and try and get stuff moving
- * out of the mux tty if not already doing so. The Caller must hold
- * the gsm tx lock.
+ * out of the mux tty if not already doing so.
+ *
+ * Context: The Caller must hold the gsm tx lock.
  */
 static void __gsm_data_queue(struct gsm_dlci *dlci, struct gsm_msg *msg)
 {
@@ -751,8 +753,9 @@ static void __gsm_data_queue(struct gsm_dlci *dlci, struct gsm_msg *msg)
  * @msg: message queued
  *
  * Add data to the transmit queue and try and get stuff moving
- * out of the mux tty if not already doing so. Take the
- * the gsm tx lock and dlci lock.
+ * out of the mux tty if not already doing so.
+ *
+ * Context: Take the gsm tx lock and dlci lock.
  */
 static void gsm_data_queue(struct gsm_dlci *dlci, struct gsm_msg *msg)
 {
@@ -771,7 +774,7 @@ static void gsm_data_queue(struct gsm_dlci *dlci, struct gsm_msg *msg)
  * is data. Keep to the MRU of the mux. This path handles the usual tty
  * interface which is a byte stream with optional modem data.
  *
- * Caller must hold the tx_lock of the mux.
+ * Context: Caller must hold the tx_lock of the mux.
  */
 static int gsm_dlci_data_output(struct gsm_mux *gsm, struct gsm_dlci *dlci)
 {
@@ -823,7 +826,7 @@ static int gsm_dlci_data_output(struct gsm_mux *gsm, struct gsm_dlci *dlci)
  * is data. Keep to the MRU of the mux. This path handles framed data
  * queued as skbuffs to the DLCI.
  *
- * Caller must hold the tx_lock of the mux.
+ * Context: Caller must hold the tx_lock of the mux.
  */
 static int gsm_dlci_data_output_framed(struct gsm_mux *gsm,
 						struct gsm_dlci *dlci)
@@ -1266,7 +1269,9 @@ static void gsm_control_response(struct gsm_mux *gsm, unsigned int command,
  * @gsm: gsm mux
  * @ctrl: frame to send
  *
- * Send out a pending control command (called under control lock)
+ * Send out a pending control command.
+
+ * Context: Called under control lock.
  */
 static void gsm_control_transmit(struct gsm_mux *gsm, struct gsm_control *ctrl)
 {
@@ -1360,8 +1365,10 @@ static struct gsm_control *gsm_control_send(struct gsm_mux *gsm,
  * @control: control we are waiting on
  *
  * Waits for the control to complete or time out. Frees any used
- * resources and returns 0 for success, or an error if the remote
- * rejected or ignored the request.
+ * resources.
+ *
+ * Return: 0 for success, or an error if the remote rejected or
+ *         ignored the request.
  */
 static int gsm_control_wait(struct gsm_mux *gsm, struct gsm_control *control)
 {
@@ -1641,7 +1648,7 @@ static struct gsm_dlci *gsm_dlci_alloc(struct gsm_mux *gsm, int addr)
  *
  * Free up a DLCI.
  *
- * Can sleep.
+ * Context: Can sleep.
  */
 static void gsm_dlci_free(struct tty_port *port)
 {
@@ -1674,7 +1681,7 @@ static void gsm_destroy_network(struct gsm_dlci *dlci);
  * Release a DLCI. Actual free is deferred until either
  * mux is closed or tty is closed - whichever is last.
  *
- * Can sleep.
+ * Context: Can sleep.
  */
 static void gsm_dlci_release(struct gsm_dlci *dlci)
 {
@@ -2381,7 +2388,7 @@ static void gsmld_write_wakeup(struct tty_struct *tty)
  * parallel readers and must handle this ourselves. We may also get
  * a hangup. Always called in user context, may sleep.
  *
- * This code must be sure never to sleep through a hangup.
+ * Context: This code must be sure never to sleep through a hangup.
  */
 static ssize_t gsmld_read(struct tty_struct *tty, struct file *file,
 			 unsigned char __user *buf, size_t nr)
@@ -2422,8 +2429,8 @@ static ssize_t gsmld_write(struct tty_struct *tty, struct file *file,
  * for special events. This code is not serialized with respect to
  * other events save open/close.
  *
- * This code must be sure never to sleep through a hangup.
- * Called without the kernel lock held - fine
+ * Context: This code must be sure never to sleep through a hangup.
+ *          Called without the kernel lock held - fine.
  */
 static __poll_t gsmld_poll(struct tty_struct *tty, struct file *file,
 							poll_table *wait)
diff --git a/drivers/tty/n_hdlc.c b/drivers/tty/n_hdlc.c
index 5b0c776a43a2..af134fd20838 100644
--- a/drivers/tty/n_hdlc.c
+++ b/drivers/tty/n_hdlc.c
@@ -321,7 +321,7 @@ static void n_hdlc_tty_close(struct tty_struct *tty)
  * n_hdlc_tty_open() - called when line discipline changed to n_hdlc
  * @tty - pointer to tty info structure
  *
- * Returns 0 if success, otherwise error code
+ * Return: 0 if success, otherwise error code.
  */
 static int n_hdlc_tty_open (struct tty_struct *tty)
 {
@@ -555,7 +555,7 @@ static void n_hdlc_tty_receive(struct tty_struct *tty, const __u8 *data,
  * @buf - pointer to returned data buffer
  * @nr - size of returned data buffer
  *
- * Returns the number of bytes returned or error code.
+ * Return: The number of bytes returned or error code.
  */
 static ssize_t n_hdlc_tty_read(struct tty_struct *tty, struct file *file,
 			   __u8 __user *buf, size_t nr)
@@ -639,7 +639,7 @@ static ssize_t n_hdlc_tty_read(struct tty_struct *tty, struct file *file,
  * @data - pointer to transmit data (one frame)
  * @count - size of transmit frame in bytes
  *
- * Returns the number of bytes written (or error code).
+ * Return: The number of bytes written or error code.
  */
 static ssize_t n_hdlc_tty_write(struct tty_struct *tty, struct file *file,
 			    const unsigned char *data, size_t count)
@@ -723,7 +723,7 @@ static ssize_t n_hdlc_tty_write(struct tty_struct *tty, struct file *file,
  * @cmd - IOCTL command code
  * @arg - argument for IOCTL call (cmd dependent)
  *
- * Returns command dependent result.
+ * Return: Command dependent result.
  */
 static int n_hdlc_tty_ioctl(struct tty_struct *tty, struct file *file,
 			    unsigned int cmd, unsigned long arg)
@@ -795,7 +795,7 @@ static int n_hdlc_tty_ioctl(struct tty_struct *tty, struct file *file,
  * Determine which operations (read/write) will not block and return info
  * to caller.
  *
- * Returns a bit mask containing info on which ops will not block.
+ * Return: A bit mask containing info on which ops will not block.
  */
 static __poll_t n_hdlc_tty_poll(struct tty_struct *tty, struct file *filp,
 				    poll_table *wait)
@@ -830,7 +830,7 @@ static __poll_t n_hdlc_tty_poll(struct tty_struct *tty, struct file *filp,
 /**
  * n_hdlc_alloc() - allocate an n_hdlc instance data structure
  *
- * Returns a pointer to newly created structure if success, otherwise %NULL
+ * Return: A pointer to newly created structure if success, otherwise %NULL.
  */
 static struct n_hdlc *n_hdlc_alloc(void)
 {
@@ -920,7 +920,7 @@ static void n_hdlc_buf_put(struct n_hdlc_buf_list *buf_list,
  * Remove and return an HDLC buffer from the head of the specified HDLC buffer
  * list.
  *
- * Returns a pointer to HDLC buffer if available, otherwise %NULL.
+ * Return: A pointer to HDLC buffer if available, otherwise %NULL.
  */
 static struct n_hdlc_buf *n_hdlc_buf_get(struct n_hdlc_buf_list *buf_list)
 {
diff --git a/drivers/tty/n_tracerouter.c b/drivers/tty/n_tracerouter.c
index f7a2616145cf..a54e1aed019f 100644
--- a/drivers/tty/n_tracerouter.c
+++ b/drivers/tty/n_tracerouter.c
@@ -53,10 +53,9 @@ static DEFINE_MUTEX(routelock);
  * n_tracerouter_open() - Called when a tty is opened by a SW entity.
  * @tty: terminal device to the ldisc.
  *
- * Return:
- *      0 for success.
- *
  * Caveats: This should only be opened one time per SW entity.
+ *
+ * Return: 0 for success.
  */
 static int n_tracerouter_open(struct tty_struct *tty)
 {
@@ -114,8 +113,7 @@ static void n_tracerouter_close(struct tty_struct *tty)
  * -EIO should be used just to show that there was an intent not to have
  * this function implemented.  Return value based on read() man pages.
  *
- * Return:
- *	 -EINVAL
+ * Return: -EINVAL
  */
 static ssize_t n_tracerouter_read(struct tty_struct *tty, struct file *file,
 				  unsigned char __user *buf, size_t nr) {
@@ -138,8 +136,7 @@ static ssize_t n_tracerouter_read(struct tty_struct *tty, struct file *file,
  * just to show that there was an intent not to have this function
  * implemented.  Return value based on write() man pages.
  *
- * Return:
- *	-EINVAL
+ * Return: -EINVAL
  */
 static ssize_t n_tracerouter_write(struct tty_struct *tty, struct file *file,
 				   const unsigned char *buf, size_t nr) {
@@ -188,8 +185,7 @@ static struct tty_ldisc_ops tty_ptirouter_ldisc = {
  *
  * Registers this module as a line discipline driver.
  *
- * Return:
- *	0 for success, any other value error.
+ * Return: 0 for success, any other value error.
  */
 static int __init n_tracerouter_init(void)
 {
diff --git a/drivers/tty/n_tracesink.c b/drivers/tty/n_tracesink.c
index 8feeea7d33b6..fc5013f34d51 100644
--- a/drivers/tty/n_tracesink.c
+++ b/drivers/tty/n_tracesink.c
@@ -51,15 +51,12 @@ static DEFINE_MUTEX(writelock);
  * n_tracesink_open() - Called when a tty is opened by a SW entity.
  * @tty: terminal device to the ldisc.
  *
- * Return:
- *      0 for success,
- *      -EFAULT = couldn't get a tty kref n_tracesink will sit
- *       on top of
- *      -EEXIST = open() called successfully once and it cannot
- *      be called again.
- *
  * Caveats: open() should only be successful the first time a
  * SW entity calls it.
+ *
+ * Return: 0 for success. -EFAULT = couldn't get a tty kref n_tracesink
+ *         will sit on top of. -EEXIST = open() called successfully once
+ *         and it cannot be called again.
  */
 static int n_tracesink_open(struct tty_struct *tty)
 {
@@ -111,8 +108,7 @@ static void n_tracesink_close(struct tty_struct *tty)
  * -EIO should be used just to show that there was an intent not to have
  * this function implemented.  Return value based on read() man pages.
  *
- * Return:
- *	 -EINVAL
+ * Return: -EINVAL
  */
 static ssize_t n_tracesink_read(struct tty_struct *tty, struct file *file,
 				unsigned char __user *buf, size_t nr) {
@@ -135,8 +131,7 @@ static ssize_t n_tracesink_read(struct tty_struct *tty, struct file *file,
  * just to show that there was an intent not to have this function
  * implemented.  Return value based on write() man pages.
  *
- * Return:
- *	-EINVAL
+ * Return: -EINVAL
  */
 static ssize_t n_tracesink_write(struct tty_struct *tty, struct file *file,
 				 const unsigned char *buf, size_t nr) {
@@ -192,8 +187,7 @@ static struct tty_ldisc_ops tty_n_tracesink = {
  *
  * Registers this module as a line discipline driver.
  *
- * Return:
- *	0 for success, any other value error.
+ * Return: 0 for success, any other value error.
  */
 static int __init n_tracesink_init(void)
 {
diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c
index 3e2b59e99153..23d77ddd187f 100644
--- a/drivers/tty/n_tty.c
+++ b/drivers/tty/n_tty.c
@@ -193,10 +193,8 @@ static int tty_copy_to_user(struct tty_struct *tty, void __user *to,
  *
  * Re-schedules the flip buffer work if it may have stopped
  *
- * Caller holds exclusive termios_rwsem
- *    or
- * n_tty_read()/consumer path:
- *    holds non-exclusive termios_rwsem
+ * Context: Caller holds exclusive termios_rwsem or
+ *          n_tty_read()/consumer path: holds non-exclusive termios_rwsem
  */
 static void n_tty_kick_worker(struct tty_struct *tty)
 {
@@ -306,8 +304,8 @@ static void n_tty_check_unthrottle(struct tty_struct *tty)
  *
  * Add a character to the tty read_buf queue.
  *
- * n_tty_receive_buf()/producer path:
- *     caller holds non-exclusive termios_rwsem
+ * Context: n_tty_receive_buf()/producer path: caller holds
+ *          non-exclusive termios_rwsem.
  */
 static inline void put_tty_queue(unsigned char c, struct n_tty_data *ldata)
 {
@@ -320,10 +318,9 @@ static inline void put_tty_queue(unsigned char c, struct n_tty_data *ldata)
  * @tty: terminal to reset
  *
  * Reset the read buffer counters and clear the flags.
- * Called from n_tty_open() and n_tty_flush_buffer().
  *
- * Locking: caller holds exclusive termios_rwsem
- *          (or locking is not required)
+ * Context: Called from n_tty_open() and n_tty_flush_buffer().  Caller
+ *          holds exclusive termios_rwsem (or locking is not required).
  */
 static void reset_buffer_flags(struct n_tty_data *ldata)
 {
@@ -359,7 +356,7 @@ static void n_tty_packet_mode_flush(struct tty_struct *tty)
  * Holds termios_rwsem to exclude producer/consumer while
  * buffer indices are reset.
  *
- * Locking: ctrl_lock, exclusive termios_rwsem
+ * Context: ctrl_lock, exclusive termios_rwsem.
  */
 static void n_tty_flush_buffer(struct tty_struct *tty)
 {
@@ -412,11 +409,11 @@ static inline int is_continuation(unsigned char c, struct tty_struct *tty)
  * and NLDLY.  They simply aren't relevant in the world today.
  * If you ever need them, add them here.
  *
- * Returns the number of bytes of buffer space used or -1 if
- * no space left.
+ * Context: should be called under the output_lock to protect
+ *          the column state and space left in the buffer.
  *
- * Locking: should be called under the output_lock to protect
- *          the column state and space left in the buffer
+ * Return: The number of bytes of buffer space used or -1 if
+ *         no space left.
  */
 static int do_output_char(unsigned char c, struct tty_struct *tty, int space)
 {
@@ -485,12 +482,13 @@ static int do_output_char(unsigned char c, struct tty_struct *tty, int space)
  * @tty: terminal device
  *
  * Output one character with OPOST processing.
- * Returns -1 when the output device is full and the character
- * must be retried.
  *
- * Locking: output_lock to protect column state and space left
+ * Context: output_lock to protect column state and space left
  *          (also, this is called from n_tty_write under the
- *          tty layer write lock)
+ *          tty layer write lock).
+ *
+ * Return: -1 when the output device is full and the character
+ *         must be retried.
  */
 static int process_output(unsigned char c, struct tty_struct *tty)
 {
@@ -516,16 +514,17 @@ static int process_output(unsigned char c, struct tty_struct *tty)
  * @nr: number of bytes to output
  *
  * Output a block of characters with OPOST processing.
- * Returns the number of characters output.
  *
  * This path is used to speed up block console writes, among other
  * things when processing blocks of output data. It handles only
  * the simple cases normally found and helps to generate blocks of
  * symbols for the console driver and thus improve performance.
  *
- * Locking: output_lock to protect column state and space left
+ * Context: output_lock to protect column state and space left
  *          (also, this is called from n_tty_write under the
- *          tty layer write lock)
+ *          tty layer write lock).
+ *
+ * Return: The number of characters output.
  */
 static ssize_t process_output_block(struct tty_struct *tty,
 				    const unsigned char *buf, unsigned int nr)
@@ -608,7 +607,7 @@ static ssize_t process_output_block(struct tty_struct *tty,
  * are prioritized.  Also, when control characters are echoed with a
  * prefixed "^", the pair is treated atomically and thus not separated.
  *
- * Locking: callers must hold output_lock
+ * Context: Caller must hold output_lock.
  */
 static size_t __process_echoes(struct tty_struct *tty)
 {
@@ -952,8 +951,8 @@ static inline void finish_erasing(struct n_tty_data *ldata)
  * present in the stream from the driver layer. Handles the complexities
  * of UTF-8 multibyte symbols.
  *
- * n_tty_receive_buf()/producer path:
- *     caller holds non-exclusive termios_rwsem
+ * Context: n_tty_receive_buf()/producer path: caller holds
+ *          non-exclusive termios_rwsem
  */
 static void eraser(unsigned char c, struct tty_struct *tty)
 {
@@ -1085,7 +1084,7 @@ static void eraser(unsigned char c, struct tty_struct *tty)
  * buffer is 'output'. The signal is processed first to alert any current
  * readers or writers to discontinue and exit their i/o loops.
  *
- * Locking: ctrl_lock
+ * Context: ctrl_lock
  */
 static void __isig(int sig, struct tty_struct *tty)
 {
@@ -1138,8 +1137,8 @@ static void isig(int sig, struct tty_struct *tty)
  * An RS232 break event has been hit in the incoming bitstream. This
  * can cause a variety of events depending upon the termios settings.
  *
- * n_tty_receive_buf()/producer path:
- *    caller holds non-exclusive termios_rwsem
+ * Context: n_tty_receive_buf()/producer path: caller holds
+ *          non-exclusive termios_rwsem.
  *
  * Note: may get exclusive termios_rwsem if flushing input buffer
  */
@@ -1193,8 +1192,8 @@ static void n_tty_receive_overrun(struct tty_struct *tty)
  * Process a parity error and queue the right data to indicate
  * the error case if necessary.
  *
- * n_tty_receive_buf()/producer path:
- *     caller holds non-exclusive termios_rwsem
+ * Context: n_tty_receive_buf()/producer path: caller holds
+ *          non-exclusive termios_rwsem
  */
 static void n_tty_receive_parity_error(struct tty_struct *tty, unsigned char c)
 {
@@ -1236,11 +1235,11 @@ n_tty_receive_signal_char(struct tty_struct *tty, int signal, unsigned char c)
  * This is serialized with respect to itself by the rules for the
  * driver above.
  *
- * n_tty_receive_buf()/producer path:
- *     caller holds non-exclusive termios_rwsem
- *     publishes canon_head if canonical mode is active
+ * Context: n_tty_receive_buf()/producer path: caller holds
+ *          non-exclusive termios_rwsem publishes canon_head if
+ *          canonical mode is active.
  *
- * Returns 1 if LNEXT was received, else returns 0
+ * Return: 1 if LNEXT was received, else returns 0.
  */
 static int
 n_tty_receive_char_special(struct tty_struct *tty, unsigned char c)
@@ -1649,8 +1648,6 @@ static void __receive_buf(struct tty_struct *tty, const unsigned char *cp,
  * not from interrupt context. The driver is responsible for making
  * calls one at a time and in order (or using flush_to_ldisc)
  *
- * Returns the # of input chars from @cp which were processed.
- *
  * In canonical mode, the maximum line length is 4096 chars (including
  * the line termination char); lines longer than 4096 chars are
  * truncated. After 4095 chars, input data is still processed but
@@ -1666,9 +1663,10 @@ static void __receive_buf(struct tty_struct *tty, const unsigned char *cp,
  * maximum canon line of 4096 chars when the mode is switched to
  * non-canonical.
  *
- * n_tty_receive_buf()/producer path:
- *     claims non-exclusive termios_rwsem
- *     publishes commit_head or canon_head
+ * Context: n_tty_receive_buf()/producer path: claims non-exclusive
+ *          termios_rwsem publishes commit_head or canon_head.
+ *
+ * Return: The number of input chars from @cp which were processed.
  */
 static int
 n_tty_receive_buf_common(struct tty_struct *tty, const unsigned char *cp,
@@ -1763,7 +1761,7 @@ static int n_tty_receive_buf2(struct tty_struct *tty, const unsigned char *cp,
  * guaranteed that this function will not be re-entered or in progress
  * when the ldisc is closed.
  *
- * Locking: Caller holds tty->termios_rwsem
+ * Context: Caller holds tty->termios_rwsem.
  */
 static void n_tty_set_termios(struct tty_struct *tty, struct ktermios *old)
 {
@@ -1873,10 +1871,11 @@ static void n_tty_close(struct tty_struct *tty)
  * n_tty_open() - open an ldisc
  * @tty: terminal to open
  *
- * Called when this line discipline is being attached to the
- * terminal device. Can sleep. Called serialized so that no
- * other events will occur in parallel. No further open will occur
- * until a close.
+ * Called when this line discipline is being attached to the terminal
+ * device. Called serialized so that no other events will occur in
+ * parallel. No further open will occur until a close.
+ *
+ * Context: Can sleep.
  */
 static int n_tty_open(struct tty_struct *tty)
 {
@@ -1924,11 +1923,9 @@ static inline int input_available_p(struct tty_struct *tty, int poll)
  * buffer, and once to drain the space from the (physical) beginning of
  * the buffer to head pointer.
  *
- * Called under the ldata->atomic_read_lock sem
- *
- * n_tty_read()/consumer path:
- *     caller holds non-exclusive termios_rwsem
- *     read_tail published
+ * Context: Called under the ldata->atomic_read_lock sem.
+ *          n_tty_read()/consumer path: caller holds non-exclusive
+ *          termios_rwsem read_tail published.
  */
 static int copy_from_read_buf(struct tty_struct *tty,
 				      unsigned char __user **b,
@@ -1979,11 +1976,9 @@ static int copy_from_read_buf(struct tty_struct *tty,
  * This causes data already processed as input to be immediately available
  * as input although a newline has not been received.
  *
- * Called under the atomic_read_lock mutex
- *
- * n_tty_read()/consumer path:
- *     caller holds non-exclusive termios_rwsem
- *     read_tail published
+ * Context: Called under the atomic_read_lock mutex.
+ *          n_tty_read()/consumer path: caller holds non-exclusive
+ *          termios_rwsem read_tail published.
  */
 static int canon_copy_from_read_buf(struct tty_struct *tty,
 				    unsigned char __user **b,
@@ -2061,9 +2056,9 @@ extern ssize_t redirected_tty_write(struct file *, const char __user *,
  * and if appropriate send any needed signals and return a negative
  * error code if action should be taken.
  *
- * Locking: redirected write test is safe
+ * Context: redirected write test is safe
  *          current->signal->tty check is safe
- *          ctrl_lock to safely reference tty->pgrp
+ *          ctrl_lock to safely reference tty->pgrp.
  */
 static int job_control(struct tty_struct *tty, struct file *file)
 {
@@ -2093,9 +2088,8 @@ static int job_control(struct tty_struct *tty, struct file *file)
  *
  * This code must be sure never to sleep through a hangup.
  *
- * n_tty_read()/consumer path:
- *     claims non-exclusive termios_rwsem
- *     publishes read_tail
+ * Context: n_tty_read()/consumer path: claims non-exclusive
+ *          termios_rwsem publishes read_tail.
  */
 static ssize_t n_tty_read(struct tty_struct *tty, struct file *file,
 			 unsigned char __user *buf, size_t nr)
@@ -2261,9 +2255,9 @@ static ssize_t n_tty_read(struct tty_struct *tty, struct file *file,
  *
  * This code must be sure never to sleep through a hangup.
  *
- * Locking: output_lock to protect column state and space left
+ * Context: output_lock to protect column state and space left
  *          (note that the process_output*() functions take this
- *          lock themselves)
+ *          lock themselves).
  */
 static ssize_t n_tty_write(struct tty_struct *tty, struct file *file,
 			   const unsigned char *buf, size_t nr)
@@ -2363,7 +2357,8 @@ static ssize_t n_tty_write(struct tty_struct *tty, struct file *file,
  * other events save open/close.
  *
  * This code must be sure never to sleep through a hangup.
- * Called without the kernel lock held - fine
+ *
+ * Context: Called without the kernel lock held - fine.
  */
 static __poll_t n_tty_poll(struct tty_struct *tty, struct file *file,
 							poll_table *wait)
diff --git a/drivers/tty/pty.c b/drivers/tty/pty.c
index 35cb13995c1c..c3db7d6d7b5b 100644
--- a/drivers/tty/pty.c
+++ b/drivers/tty/pty.c
@@ -369,7 +369,7 @@ static void pty_stop(struct tty_struct *tty)
  * Perform the initial set up for the tty/pty pair. Called from the
  * tty layer when the port is first opened.
  *
- * Locking: the caller must hold the tty_mutex
+ * Context: The caller must hold the tty_mutex.
  */
 static int pty_common_install(struct tty_driver *driver, struct tty_struct *tty,
 		bool legacy)
@@ -687,8 +687,9 @@ static long pty_unix98_compat_ioctl(struct tty_struct *tty,
  * @driver: ptm driver
  * @idx: tty index
  *
- * Look up a pty master device. Called under the tty_mutex for now.
- * This provides our locking.
+ * Look up a pty master device.
+ *
+ * Context: Called under the tty_mutex for now. This provides our locking.
  */
 static struct tty_struct *ptm_unix98_lookup(struct tty_driver *driver,
 		struct file *file, int idx)
@@ -702,8 +703,10 @@ static struct tty_struct *ptm_unix98_lookup(struct tty_driver *driver,
  * @driver: pts driver
  * @idx: tty index
  *
- * Look up a pty master device. Called under the tty_mutex for now.
- * This provides our locking for the tty pointer.
+ * Look up a pty master device.
+ *
+ * Context: Called under the tty_mutex for now.  This provides our
+ *          locking for the tty pointer.
  */
 static struct tty_struct *pts_unix98_lookup(struct tty_driver *driver,
 		struct file *file, int idx)
@@ -787,9 +790,9 @@ static const struct tty_operations pty_unix98_ops = {
  *
  * Allocate a unix98 pty master device from the ptmx driver.
  *
- * Locking: tty_mutex protects the init_dev work. tty->count should
- *          protect the rest.
- *          allocated_ptys_lock handles the list of free pty numbers
+ * Context: tty_mutex protects the init_dev work. tty->count should
+ *          protect the rest.  allocated_ptys_lock handles the list
+ *          of free pty numbers.
  */
 static int ptmx_open(struct inode *inode, struct file *filp)
 {
diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c
index 63d7537a1db1..e5157e0679de 100644
--- a/drivers/tty/serial/8250/8250_core.c
+++ b/drivers/tty/serial/8250/8250_core.c
@@ -404,9 +404,10 @@ static struct uart_8250_port serial8250_ports[UART_NR];
  * This struct *must* *not* be used to perform a 8250 or serial core operation
  * which is not accessible otherwise. Its only purpose is to make the struct
  * accessible to the runtime-pm callbacks for context suspend/restore.
- * The lock assumption made here is none because runtime-pm suspend/resume
- * callbacks should not be invoked if there is any operation performed on the
- * port.
+ *
+ * Context: The lock assumption made here is none because runtime-pm
+ *          suspend/resume callbacks should not be invoked if there is any
+ *          operation performed on the port.
  */
 struct uart_8250_port *serial8250_get_port(int line)
 {
@@ -624,7 +625,7 @@ static int univ8250_console_setup(struct console *co, char *options)
  * Performs console setup for a match (as required by interface)
  * If no <options> are specified, then assume the h/w is already setup.
  *
- * Returns 0 if console matches; otherwise non-zero to use default matching
+ * Return: 0 if console matches; otherwise non-zero to use default matching.
  */
 static int univ8250_console_match(struct console *co, char *name, int idx,
 				  char *options)
@@ -1066,8 +1067,9 @@ EXPORT_SYMBOL(serial8250_register_8250_port);
  * serial8250_unregister_port() - remove a 16x50 serial port at runtime
  * @line: serial line number
  *
- * Remove one serial port.  This may not be called from interrupt
- * context.  We hand the port back to the our control.
+ * Remove one serial port.  We hand the port back to the our control.
+ *
+ * Context: This may not be called from interrupt context.
  */
 void serial8250_unregister_port(int line)
 {
diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
index 589adc597923..73fd98fd13e4 100644
--- a/drivers/tty/serial/amba-pl011.c
+++ b/drivers/tty/serial/amba-pl011.c
@@ -2355,7 +2355,7 @@ static int __init pl011_console_setup(struct console *co, char *options)
  * Performs console setup for a match (as required by interface)
  * If no <options> are specified, then assume the h/w is already setup.
  *
- * Returns 0 if console matches; otherwise non-zero to use default matching
+ * Return: 0 if console matches; otherwise non-zero to use default matching.
  */
 static int __init pl011_console_match(struct console *co, char *name, int idx,
 				      char *options)
diff --git a/drivers/tty/serial/earlycon.c b/drivers/tty/serial/earlycon.c
index 85bd5a5d7f39..f56703c10ac6 100644
--- a/drivers/tty/serial/earlycon.c
+++ b/drivers/tty/serial/earlycon.c
@@ -164,8 +164,8 @@ static int __init register_earlycon(char *buf, const struct earlycon_id *match)
  * <options> string in the 'options' parameter; all other forms set
  * the parameter to NULL.
  *
- * Returns 0 if an attempt to register the earlycon was made,
- * otherwise negative error code
+ * Return: 0 if an attempt to register the earlycon was made,
+ *         otherwise negative error code.
  */
 int __init setup_earlycon(char *buf)
 {
diff --git a/drivers/tty/serial/ifx6x60.c b/drivers/tty/serial/ifx6x60.c
index 63c8b9f8c7b7..6d3a9cfaad34 100644
--- a/drivers/tty/serial/ifx6x60.c
+++ b/drivers/tty/serial/ifx6x60.c
@@ -169,12 +169,10 @@ ifx_spi_power_state_clear(struct ifx_spi_device *ifx_dev, unsigned char val)
 }
 
 /**
- * swap_buf_8()
+ * swap_buf_8() - Swap the contents of a buffer into big endian format.
  * @buf: our buffer
  * @len: number of bytes (not words) in the buffer
  * @end: end of buffer
- *
- * Swap the contents of a buffer into big endian format
  */
 static inline void swap_buf_8(unsigned char *buf, int len, void *end)
 {
@@ -183,12 +181,10 @@ static inline void swap_buf_8(unsigned char *buf, int len, void *end)
 }
 
 /**
- * swap_buf_16()
+ * swap_buf_16() - Swap the contents of a buffer into big endian format.
  * @buf: our buffer
  * @len: number of bytes (not words) in the buffer
  * @end: end of buffer
- *
- * Swap the contents of a buffer into big endian format
  */
 static inline void swap_buf_16(unsigned char *buf, int len, void *end)
 {
@@ -208,12 +204,10 @@ static inline void swap_buf_16(unsigned char *buf, int len, void *end)
 }
 
 /**
- * swap_buf_32()
+ * swap_buf_32() - Swap the contents of a buffer into big endian format.
  * @buf: our buffer
  * @len: number of bytes (not words) in the buffer
  * @end: end of buffer
- *
- * Swap the contents of a buffer into big endian format
  */
 static inline void swap_buf_32(unsigned char *buf, int len, void *end)
 {
diff --git a/drivers/tty/serial/serial_txx9.c b/drivers/tty/serial/serial_txx9.c
index b6b17d5005f6..621217e4ee27 100644
--- a/drivers/tty/serial/serial_txx9.c
+++ b/drivers/tty/serial/serial_txx9.c
@@ -1059,8 +1059,9 @@ static int serial_txx9_register_port(struct uart_port *port)
  * serial_txx9_unregister_port() - remove a txx9 serial port at runtime
  * @line: serial line number
  *
- * Remove one serial port.  This may not be called from interrupt
- * context.  We hand the port back to the our control.
+ * Remove one serial port.  We hand the port back to the our control.
+ *
+ * Context: This may not be called from interrupt context.
  */
 static void serial_txx9_unregister_port(int line)
 {
diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c
index 5ed85c49bbce..527dd273fccb 100644
--- a/drivers/tty/serial/xilinx_uartps.c
+++ b/drivers/tty/serial/xilinx_uartps.c
@@ -204,7 +204,6 @@ struct cdns_platform_data {
  * cdns_uart_handle_rx() - Handle the received bytes along with Rx errors.
  * @dev_id: Id of the UART port
  * @isrstatus: The interrupt status register value as read
- * Return: None
  */
 static void cdns_uart_handle_rx(void *dev_id, unsigned int isrstatus)
 {
@@ -299,7 +298,6 @@ static void cdns_uart_handle_rx(void *dev_id, unsigned int isrstatus)
 /**
  * cdns_uart_handle_tx() - Handle the bytes to be Txed.
  * @dev_id: Id of the UART port
- * Return: None
  */
 static void cdns_uart_handle_tx(void *dev_id)
 {
@@ -378,8 +376,6 @@ static irqreturn_t cdns_uart_isr(int irq, void *dev_id)
  * @rbdiv: BDIV value (return value)
  * @rcd: CD value (return value)
  * @div8: Value for clk_sel bit in mod (return value)
- * Return: baud rate, requested baud when possible, or actual baud when there
- *	was too much error, zero if no valid divisors are found.
  *
  * Formula to obtain baud rate is
  *	baud_tx/rx rate = clk/CD * (BDIV + 1)
@@ -390,6 +386,9 @@ static irqreturn_t cdns_uart_isr(int irq, void *dev_id)
  *	CD and BDIV depends on values in
  *			baud rate generate register
  *			baud rate clock divisor register
+ *
+ * Return: Baud rate, requested baud when possible, or actual baud when
+ *         there was too much error, zero if no valid divisors are found.
  */
 static unsigned int cdns_uart_calc_baud_divs(unsigned int clk,
 		unsigned int baud, u32 *rbdiv, u32 *rcd, int *div8)
@@ -437,6 +436,7 @@ static unsigned int cdns_uart_calc_baud_divs(unsigned int clk,
  * cdns_uart_set_baud_rate() - Calculate and set the baud rate
  * @port: Handle to the uart port structure
  * @baud: Baud rate to set
+ *
  * Return: baud rate, requested baud when possible, or actual baud when there
  *	   was too much error, zero if no valid divisors are found.
  */
@@ -472,6 +472,7 @@ static unsigned int cdns_uart_set_baud_rate(struct uart_port *port,
  * @nb:		Notifier block
  * @event:	Notify event
  * @data:	Notifier data
+ *
  * Return:	NOTIFY_OK or NOTIFY_DONE on success, NOTIFY_BAD on error.
  */
 static int cdns_uart_clk_notifier_cb(struct notifier_block *nb,
@@ -665,11 +666,13 @@ static void cdns_uart_break_ctl(struct uart_port *port, int ctl)
 }
 
 /**
- * cdns_uart_set_termios() - termios operations, handling data length, parity,
- *				stop bits, flow control, baud rate
+ * cdns_uart_set_termios() - termios operations
  * @port: Handle to the uart port structure
  * @termios: Handle to the input termios structure
  * @old: Values of the previously saved termios structure
+ *
+ * Termios operations, handling data length, parity, stop bits,
+ * flow control, baud rate.
  */
 static void cdns_uart_set_termios(struct uart_port *port,
 				struct ktermios *termios, struct ktermios *old)
@@ -938,11 +941,11 @@ static int cdns_uart_verify_port(struct uart_port *port,
 }
 
 /**
- * cdns_uart_request_port() - Claim the memory region attached to cdns_uart port,
- *				called when the driver adds a cdns_uart port via
- *				uart_add_one_port()
+ * cdns_uart_request_port() - Claim the memory region attached to cdns_uart port.
  * @port: Handle to the uart port structure
  *
+ * Called when the driver adds a cdns_uart port via uart_add_one_port().
+ *
  * Return: 0 on success, negative errno otherwise.
  */
 static int cdns_uart_request_port(struct uart_port *port)
diff --git a/drivers/tty/tty_audit.c b/drivers/tty/tty_audit.c
index 54574c8d677e..34d1b09b69a1 100644
--- a/drivers/tty/tty_audit.c
+++ b/drivers/tty/tty_audit.c
@@ -149,7 +149,7 @@ void tty_audit_tiocsti(struct tty_struct *tty, char ch)
 /**
  * tty_audit_push() - Flush current's pending audit data
  *
- * Returns 0 if success, -EPERM if tty audit is disabled
+ * Return: 0 if success, -EPERM if tty audit is disabled.
  */
 int tty_audit_push(void)
 {
@@ -170,9 +170,10 @@ int tty_audit_push(void)
 /**
  * tty_audit_buf_get() - Get an audit buffer.
  *
- * Get an audit buffer, allocate it if necessary.  Return %NULL
- * if out of memory or ERR_PTR(-ESRCH) if tty_audit_exit() has already
- * occurred.  Otherwise, return a new reference to the buffer.
+ * Get an audit buffer, allocate it if necessary.
+ *
+ * Return: %NULL if out of memory or ERR_PTR(-ESRCH) if tty_audit_exit()
+ * has already occurred.  Otherwise, return a new reference to the buffer.
  */
 static struct tty_audit_buf *tty_audit_buf_get(void)
 {
diff --git a/drivers/tty/tty_baudrate.c b/drivers/tty/tty_baudrate.c
index fac79ff29fb1..1bb4c3fb61b2 100644
--- a/drivers/tty/tty_baudrate.c
+++ b/drivers/tty/tty_baudrate.c
@@ -50,12 +50,12 @@ static int n_baud_table = ARRAY_SIZE(baud_table);
  * tty_termios_baud_rate()
  * @termios: termios structure
  *
- * Convert termios baud rate data into a speed. This should be called
- * with the termios lock held if this termios is a terminal termios
- * structure. May change the termios data. Device drivers can call this
- * function but should use ->c_[io]speed directly as they are updated.
+ * Convert termios baud rate data into a speed.
  *
- * Locking: none
+ * Context: This should be called with the termios lock held if this termios
+ *          is a terminal termios structure. May change the termios data.
+ *          Device drivers can call this function but should use ->c_[io]speed
+ *          directly as they are updated.
  */
 speed_t tty_termios_baud_rate(struct ktermios *termios)
 {
@@ -84,12 +84,12 @@ EXPORT_SYMBOL(tty_termios_baud_rate);
  * tty_termios_input_baud_rate()
  * @termios: termios structure
  *
- * Convert termios baud rate data into a speed. This should be called
- * with the termios lock held if this termios is a terminal termios
- * structure. May change the termios data. Device drivers can call this
- * function but should use ->c_[io]speed directly as they are updated.
+ * Convert termios baud rate data into a speed.
  *
- * Locking: none
+ * Context: This should be called with the termios lock held if this termios
+ *          is a terminal termios structure. May change the termios data.
+ *          Device drivers can call this function but should use ->c_[io]speed
+ *          directly as they are updated.
  */
 speed_t tty_termios_input_baud_rate(struct ktermios *termios)
 {
@@ -133,11 +133,11 @@ EXPORT_SYMBOL(tty_termios_input_baud_rate);
  * desired speed. We allow small margins and preserve as much of possible
  * of the input intent to keep compatibility.
  *
- * Locking: Caller should hold termios lock. This is already held
- * when calling this function from the driver termios handler.
- *
  * The ifdefs deal with platforms whose owners have yet to update them
  * and will all go away once this is done.
+ *
+ * Context: Caller should hold termios lock. This is already held
+ *          when calling this function from the driver termios handler.
  */
 void tty_termios_encode_baud_rate(struct ktermios *termios,
 				  speed_t ibaud, speed_t obaud)
@@ -227,8 +227,9 @@ EXPORT_SYMBOL_GPL(tty_termios_encode_baud_rate);
  * @obad: output baud rate
  *
  * Update the current termios data for the tty with the new speed
- * settings. The caller must hold the termios_rwsem for the tty in
- * question.
+ * settings.
+ *
+ * Context: The caller must hold the termios_rwsem for the tty in question.
  */
 void tty_encode_baud_rate(struct tty_struct *tty, speed_t ibaud, speed_t obaud)
 {
diff --git a/drivers/tty/tty_buffer.c b/drivers/tty/tty_buffer.c
index 447f235eeb0c..46eee0e3b285 100644
--- a/drivers/tty/tty_buffer.c
+++ b/drivers/tty/tty_buffer.c
@@ -146,8 +146,8 @@ void tty_buffer_free_all(struct tty_port *port)
  * We round our buffers off in 256 character chunks to get better
  * allocation behaviour.
  *
- * Return NULL if out of memory or the allocation would exceed the
- * per device queue
+ * Return: NULL if out of memory or the allocation would exceed the
+ *         per device queue.
  */
 static struct tty_buffer *tty_buffer_alloc(struct tty_port *port, size_t size)
 {
@@ -208,8 +208,8 @@ static void tty_buffer_free(struct tty_port *port, struct tty_buffer *b)
  * flush all the buffers containing receive data. If ld != NULL,
  * flush the ldisc input buffer.
  *
- * Locking: takes buffer lock to ensure single-threaded flip buffer
- *          'consumer'
+ * Context: Takes buffer lock to ensure single-threaded flip buffer
+ *          'consumer'.
  */
 void tty_buffer_flush(struct tty_struct *tty, struct tty_ldisc *ld)
 {
@@ -300,7 +300,9 @@ EXPORT_SYMBOL_GPL(tty_buffer_request_room);
  * @size: size
  *
  * Queue a series of bytes to the tty buffering. All the characters
- * passed are marked with the supplied flag. Returns the number added.
+ * passed are marked with the supplied flag.
+ *
+ * Return: The number of bytes added.
  */
 int tty_insert_flip_string_fixed_flag(struct tty_port *port,
 		const unsigned char *chars, char flag, size_t size)
@@ -334,8 +336,9 @@ EXPORT_SYMBOL(tty_insert_flip_string_fixed_flag);
  * @size: size
  *
  * Queue a series of bytes to the tty buffering. For each character
- * the flags array indicates the status of the character. Returns the
- * number added.
+ * the flags array indicates the status of the character.
+ *
+ * Return: The number of bytes added.
  */
 int tty_insert_flip_string_flags(struct tty_port *port,
 		const unsigned char *chars, const char *flags, size_t size)
@@ -443,7 +446,7 @@ EXPORT_SYMBOL_GPL(tty_prepare_flip_string);
  * Callers other than flush_to_ldisc() need to exclude the kworker
  * from concurrent use of the line discipline, see paste_selection().
  *
- * Returns the number of bytes processed
+ * Return: The number of bytes processed.
  */
 int tty_ldisc_receive_buf(struct tty_ldisc *ld, const unsigned char *p,
 			  char *f, int count)
@@ -484,8 +487,8 @@ receive_buf(struct tty_port *port, struct tty_buffer *head, int count)
  *
  * The receive_buf method is single threaded for each tty instance.
  *
- * Locking: takes buffer lock to ensure single-threaded flip buffer
- *          'consumer'
+ * Context: Takes buffer lock to ensure single-threaded flip buffer
+ *          'consumer'.
  */
 static void flush_to_ldisc(struct work_struct *work)
 {
@@ -535,10 +538,11 @@ static void flush_to_ldisc(struct work_struct *work)
  * @port: tty port to push
  *
  * Queue a push of the terminal flip buffers to the line discipline.
- * Can be called from IRQ/atomic context.
  *
  * In the event of the queue being busy for flipping the work will be
  * held off and retried later.
+ *
+ * Context: Can be called from IRQ/atomic context.
  */
 void tty_flip_buffer_push(struct tty_port *port)
 {
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index 938c9966c459..6d161eba0684 100644
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
@@ -163,7 +163,7 @@ static void release_tty(struct tty_struct *tty, int idx);
  *
  * Free the write buffers, tty queue and tty memory itself.
  *
- * Locking: none. Must be called after tty is definitely unused
+ * Context: No locks taken. Must be called after tty is definitely unused.
  */
 static void free_tty_struct(struct tty_struct *tty)
 {
@@ -238,7 +238,7 @@ static void tty_del_file(struct file *file)
  * Convert a tty structure into a name. The name reflects the kernel
  * naming policy and if udev is in use may not reflect user space
  *
- * Locking: none
+ * Context: No locks taken.
  */
 const char *tty_name(const struct tty_struct *tty)
 {
@@ -309,7 +309,7 @@ static int check_tty_count(struct tty_struct *tty, const char *routine)
  * This routine returns a tty driver structure, given a device number
  * and also passes back the index number.
  *
- * Locking: caller must hold tty_mutex
+ * Context: Caller must hold tty_mutex.
  */
 static struct tty_driver *get_tty_driver(dev_t device, int *index)
 {
@@ -334,7 +334,7 @@ static struct tty_driver *get_tty_driver(dev_t device, int *index)
  * like (4, 64) or (188, 1). If no corresponding driver is registered then
  * the function returns -ENODEV.
  *
- * Locking: this acquires tty_mutex to protect the tty_drivers list from
+ * Context: Acquires tty_mutex to protect the tty_drivers list from
  *          being modified while we are traversing it, and makes sure to
  *          release it before exiting.
  */
@@ -750,8 +750,7 @@ EXPORT_SYMBOL(tty_hung_up_p);
  * called from any context, may be under the tty atomic_write_lock
  * but not always.
  *
- * Locking:
- *         flow_lock
+ * Context: Takes flow_lock.
  */
 void __stop_tty(struct tty_struct *tty)
 {
@@ -780,8 +779,7 @@ EXPORT_SYMBOL(stop_tty);
  * tty was previous stopped and is now being started, the driver
  * start method is invoked and the line discipline woken.
  *
- * Locking:
- *         flow_lock
+ * Context: Takes flow_lock.
  */
 void __start_tty(struct tty_struct *tty)
 {
@@ -827,9 +825,8 @@ static void tty_update_time(struct timespec64 *time)
  * Perform the read system call function on this terminal device. Checks
  * for hung up devices before calling the line discipline method.
  *
- * Locking:
- *         Locks the line discipline internally while needed. Multiple
- * read calls may be outstanding in parallel.
+ * Context: Locks the line discipline internally while needed. Multiple
+ *          read calls may be outstanding in parallel.
  */
 static ssize_t tty_read(struct file *file, char __user *buf, size_t count,
 			loff_t *ppos)
@@ -999,11 +996,10 @@ void tty_write_message(struct tty_struct *tty, char *msg)
  *
  * Write data to a tty device via the line discipline.
  *
- * Locking:
- *         Locks the line discipline as required
- *         Writes to the tty driver are serialized by the atomic_write_lock
- * and are then processed in chunks to the device. The line discipline
- * write method will not be invoked in parallel for each device.
+ * Context: Locks the line discipline as required.  Writes to the tty
+ *          driver are serialized by the atomic_write_lock and are then
+ *          processed in chunks to the device. The line discipline write
+ *          method will not be invoked in parallel for each device.
  */
 static ssize_t tty_write(struct file *file, const char __user *buf,
 						size_t count, loff_t *ppos)
@@ -1054,7 +1050,7 @@ ssize_t redirected_tty_write(struct file *file, const char __user *buf,
  *
  * Send a high priority character to the tty even if stopped
  *
- * Locking: none for xchar method, write ordering for write method.
+ * Context: Takes termios_rwsem and write ordering for write method.
  */
 int tty_send_xchar(struct tty_struct *tty, char ch)
 {
@@ -1092,7 +1088,7 @@ static char ptychar[] = "pqrstuvwxyzabcde";
  * Generate a name from a driver reference and write it to the output
  * buffer.
  *
- * Locking: None
+ * Context: No locks taken.
  */
 static void pty_line_name(struct tty_driver *driver, int index, char *p)
 {
@@ -1112,7 +1108,7 @@ static void pty_line_name(struct tty_driver *driver, int index, char *p)
  * Generate a name from a driver reference and write it to the output
  * buffer.
  *
- * Locking: None
+ * Context: No locks taken.
  */
 static ssize_t tty_line_name(struct tty_driver *driver, int index, char *p)
 {
@@ -1131,7 +1127,7 @@ static ssize_t tty_line_name(struct tty_driver *driver, int index, char *p)
  * Return the tty, if found. If not found, return NULL or ERR_PTR() if the
  * driver lookup() method returns an error.
  *
- * Locking: tty_mutex must be held. If the tty is found, bump the tty kref.
+ * Context: tty_mutex must be held. If the tty is found, bump the tty kref.
  */
 static struct tty_struct *tty_driver_lookup_tty(struct tty_driver *driver,
 		struct file *file, int idx)
@@ -1200,7 +1196,7 @@ EXPORT_SYMBOL_GPL(tty_standard_install);
  * for ensuring any need additional structures are allocated and
  * configured.
  *
- * Locking: tty_mutex for now
+ * Context: tty_mutex for now.
  */
 static int tty_driver_install_tty(struct tty_driver *driver,
 						struct tty_struct *tty)
@@ -1214,10 +1210,10 @@ static int tty_driver_install_tty(struct tty_driver *driver,
  * @driver: the driver for the tty
  * @idx: the minor number
  *
- * Remvoe a tty object from the driver tables. The tty->index field
+ * Remove a tty object from the driver tables. The tty->index field
  * will be set by the time this is called.
  *
- * Locking: tty_mutex for now
+ * Context: tty_mutex for now.
  */
 static void tty_driver_remove_tty(struct tty_driver *driver, struct tty_struct *tty)
 {
@@ -1273,10 +1269,6 @@ static int tty_reopen(struct tty_struct *tty)
  * could also be an active device. The pty drivers require special
  * handling because of this.
  *
- * Locking:
- *         The function is called under the tty_mutex, which
- * protects us from the tty struct or driver itself going away.
- *
  * On exit the tty device has the line discipline attached and
  * a reference count of 1. If a pair was created for pty/tty use
  * and the other was a pty master then it too has a reference count of 1.
@@ -1285,6 +1277,9 @@ static int tty_reopen(struct tty_struct *tty)
  * failed open.  The new code protects the open with a mutex, so it's
  * really quite straightforward.  The mutex locking can probably be
  * relaxed for the (most common) case of reopening a tty.
+ *
+ * Context: The function is called under the tty_mutex, which
+ *          protects us from the tty struct or driver itself going away.
  */
 struct tty_struct *tty_init_dev(struct tty_driver *driver, int idx)
 {
@@ -1399,12 +1394,11 @@ static void tty_flush_works(struct tty_struct *tty)
  * driver table slots. This function is called when a device is no longer
  * in use. It also gets called when setup of a device fails.
  *
- * Locking:
- *         takes the file list lock internally when working on the list
- * of ttys that the driver keeps.
- *
  * This method gets called from a work queue so that the driver private
  * cleanup ops can sleep (needed for USB at least)
+ *
+ * Context: Takes the file list lock internally when working on the list
+ *          of ttys that the driver keeps.
  */
 static void release_one_tty(struct work_struct *work)
 {
@@ -1599,15 +1593,14 @@ EXPORT_SYMBOL_GPL(tty_release_struct);
  * Called the last time each file handle is closed that references
  * this tty. There may however be several such references.
  *
- * Locking:
- *         Takes bkl. See tty_release_dev
- *
  * Even releasing the tty structures is a tricky business.. We have
  * to be very careful that the structures are all released at the
  * same time, as interrupts might otherwise get the wrong pointers.
  *
  * WSH 09/09/97: rewritten to avoid some nasty race conditions that could
  * lead to double frees or releasing memory still in use.
+ *
+ * Context: Takes bkl. See tty_release_dev
  */
 int tty_release(struct inode *inode, struct file *filp)
 {
@@ -1840,12 +1833,12 @@ static struct tty_driver *tty_lookup_driver(dev_t device, struct file *filp,
  * makes sure it's not already opened and performs the first-time
  * tty initialization.
  *
- * Returns the locked initialized &tty_struct
- *
- * Claims the global tty_mutex to serialize:
+ * Context: Claims the global tty_mutex to serialize:
  *   - concurrent first-time tty initialization
  *   - concurrent tty driver removal w/ lookup
  *   - concurrent tty removal from driver table
+ *
+ * Return: The locked initialized &tty_struct.
  */
 struct tty_struct *tty_kopen(dev_t device)
 {
@@ -1891,12 +1884,12 @@ EXPORT_SYMBOL_GPL(tty_kopen);
  * Performs the driver lookup, checks for a reopen, or otherwise
  * performs the first-time tty initialization.
  *
- * Returns the locked initialized or re-opened &tty_struct
- *
- * Claims the global tty_mutex to serialize:
+ * Context: Claims the global tty_mutex to serialize:
  *   - concurrent first-time tty initialization
  *   - concurrent tty driver removal w/ lookup
  *   - concurrent tty removal from driver table
+ *
+ * Return: The locked initialized or re-opened &tty_struct.
  */
 static struct tty_struct *tty_open_by_driver(dev_t device, struct inode *inode,
 					     struct file *filp)
@@ -1966,7 +1959,7 @@ static struct tty_struct *tty_open_by_driver(dev_t device, struct inode *inode,
  * The termios state of a pty is reset on first open so that
  * settings don't persist across reuse.
  *
- * Locking: tty_mutex protects tty, tty_lookup_driver and tty_init_dev.
+ * Context: tty_mutex protects tty, tty_lookup_driver and tty_init_dev.
  *          tty->count should protect the rest.
  *          ->siglock protects ->signal/->sighand
  *
@@ -2053,8 +2046,8 @@ static int tty_open(struct inode *inode, struct file *filp)
  * Call the line discipline polling method to obtain the poll
  * status of the device.
  *
- * Locking: locks called line discipline but ldisc poll method
- * may be re-entered freely by other callers.
+ * Context: Locks called line discipline but ldisc poll method
+ *          may be re-entered freely by other callers.
  */
 static __poll_t tty_poll(struct file *filp, poll_table *wait)
 {
@@ -2132,9 +2125,8 @@ static int tty_fasync(int fd, struct file *filp, int on)
  *
  * FIXME: does not honour flow control ??
  *
- * Locking:
- *         Called functions take tty_ldiscs_lock
- *         current->signal->tty check is safe without locks
+ * Context: Called functions take tty_ldiscs_lock
+ *          current->signal->tty check is safe without locks
  *
  * FIXME: may race normal receive processing
  */
@@ -2163,7 +2155,7 @@ static int tiocsti(struct tty_struct *tty, char __user *p)
  *
  * Copies the kernel idea of the window size into the user buffer.
  *
- * Locking: tty->winsize_mutex is taken to ensure the winsize data
+ * Context: tty->winsize_mutex is taken to ensure the winsize data
  *          is consistent.
  */
 static int tiocgwinsz(struct tty_struct *tty, struct winsize __user *arg)
@@ -2217,10 +2209,9 @@ EXPORT_SYMBOL(tty_do_resize);
  * this is just advisory information but for the Linux console it
  * actually has driver level meaning and triggers a VC resize.
  *
- * Locking:
- *         Driver dependent. The default do_resize method takes the
- * tty termios mutex and ctrl_lock. The console takes its own lock
- * then calls into the default method.
+ * Context: Driver dependent. The default do_resize method takes the
+ *          tty termios mutex and ctrl_lock. The console takes its own lock
+ *          then calls into the default method.
  */
 static int tiocswinsz(struct tty_struct *tty, struct winsize __user *arg)
 {
@@ -2240,7 +2231,7 @@ static int tiocswinsz(struct tty_struct *tty, struct winsize __user *arg)
  *
  * Allow the administrator to move the redirected console device
  *
- * Locking: uses redirect_lock to guard the redirect information
+ * Context: Uses redirect_lock to guard the redirect information.
  */
 static int tioccons(struct file *file)
 {
@@ -2275,7 +2266,7 @@ static int tioccons(struct file *file)
  * the generic functionality existed. This piece of history is preserved
  * in the expected tty API of posix OS's.
  *
- * Locking: none, the open file handle ensures it won't go away.
+ * Context: No locks taken, the open file handle ensures it won't go away.
  */
 static int fionbio(struct file *file, int __user *p)
 {
@@ -2300,7 +2291,7 @@ static int fionbio(struct file *file, int __user *p)
  *
  * Set the line discipline according to user request.
  *
- * Locking: see tty_set_ldisc, this function is just a helper
+ * Context: Please see tty_set_ldisc, this function is just a helper.
  */
 static int tiocsetd(struct tty_struct *tty, int __user *p)
 {
@@ -2322,8 +2313,8 @@ static int tiocsetd(struct tty_struct *tty, int __user *p)
  *
  * Retrieves the line discipline id directly from the ldisc.
  *
- * Locking: waits for ldisc reference (in case the line discipline
- *          is changing or the tty is being hungup)
+ * Context: Waits for ldisc reference (in case the line discipline
+ *          is changing or the tty is being hungup).
  */
 static int tiocgetd(struct tty_struct *tty, int __user *p)
 {
@@ -2346,9 +2337,7 @@ static int tiocgetd(struct tty_struct *tty, int __user *p)
  * Perform a timed break on hardware that lacks its own driver level
  * timed break functionality.
  *
- * Locking:
- *         atomic_write_lock serializes
- *
+ * Context: atomic_write_lock serializes.
  */
 static int send_break(struct tty_struct *tty, unsigned int duration)
 {
@@ -2386,7 +2375,7 @@ static int send_break(struct tty_struct *tty, unsigned int duration)
  * Obtain the modem status bits from the tty driver if the feature
  * is supported. Return -EINVAL if it is not available.
  *
- * Locking: none (up to the driver)
+ * Context: No locks taken (up to the driver).
  */
 static int tty_tiocmget(struct tty_struct *tty, int __user *p)
 {
@@ -2410,7 +2399,7 @@ static int tty_tiocmget(struct tty_struct *tty, int __user *p)
  * Set the modem status bits from the tty driver if the feature
  * is supported. Return -EINVAL if it is not available.
  *
- * Locking: none (up to the driver)
+ * Context: No locks taken (up to the driver).
  */
 static int tty_tiocmset(struct tty_struct *tty, unsigned int cmd,
 	     unsigned __user *p)
@@ -2776,7 +2765,7 @@ static struct device *tty_get_device(struct tty_struct *tty)
  *
  * This subroutine allocates and initializes a tty structure.
  *
- * Locking: none - tty in question is not exposed at this point
+ * Locking: No locks taken - tty in question is not exposed at this point.
  */
 struct tty_struct *alloc_tty_struct(struct tty_driver *driver, int idx)
 {
@@ -2824,10 +2813,12 @@ struct tty_struct *alloc_tty_struct(struct tty_driver *driver, int idx)
  * @ch: character
  *
  * Write one byte to the tty using the provided put_char method
- * if present. Returns the number of characters successfully output.
+ * if present.
  *
  * Note: the specific put_char operation in the driver layer may go
  * away soon. Don't call it directly, use this method
+ *
+ * Return: The number of characters successfully output.
  */
 int tty_put_char(struct tty_struct *tty, unsigned char ch)
 {
@@ -2864,15 +2855,15 @@ static int tty_cdev_add(struct tty_driver *driver, dev_t dev,
  *          This field is optional, if there is no known struct device
  *          for this tty device it can be set to NULL safely.
  *
- * Returns a pointer to the struct device for this tty device
- * (or ERR_PTR(-EFOO) on error).
- *
  * This call is required to be made to register an individual tty device
  * if the tty driver's flags have the TTY_DRIVER_DYNAMIC_DEV bit set.  If
  * that bit is not set, this function should not be called by a tty
  * driver.
  *
  * Locking: ??
+ *
+ * Return: A pointer to the struct device for this tty device
+ *         (or ERR_PTR(-EFOO) on error).
  */
 struct device *tty_register_device(struct tty_driver *driver, unsigned index,
 				   struct device *device)
@@ -2897,15 +2888,15 @@ static void tty_device_create_release(struct device *dev)
  * @drvdata: Driver data to be set to device.
  * @attr_grp: Attribute group to be set on device.
  *
- * Returns a pointer to the struct device for this tty device
- * (or ERR_PTR(-EFOO) on error).
- *
  * This call is required to be made to register an individual tty device
  * if the tty driver's flags have the TTY_DRIVER_DYNAMIC_DEV bit set.  If
  * that bit is not set, this function should not be called by a tty
  * driver.
  *
  * Locking: ??
+ *
+ * Return: A pointer to the struct device for this tty device
+ *         (or ERR_PTR(-EFOO) on error).
  */
 struct device *tty_register_device_attr(struct tty_driver *driver,
 				   unsigned index, struct device *device,
diff --git a/drivers/tty/tty_ioctl.c b/drivers/tty/tty_ioctl.c
index ca5d3923342d..d23872fb2ad8 100644
--- a/drivers/tty/tty_ioctl.c
+++ b/drivers/tty/tty_ioctl.c
@@ -147,7 +147,7 @@ EXPORT_SYMBOL(tty_unthrottle);
  * throttle due to race conditions when throttling is conditional
  * on factors evaluated prior to throttling.
  *
- * Returns 0 if tty is throttled (or was already throttled)
+ * Return: 0 if tty is throttled (or was already throttled).
  */
 int tty_throttle_safe(struct tty_struct *tty)
 {
@@ -177,7 +177,7 @@ int tty_throttle_safe(struct tty_struct *tty)
  * unthrottle due to race conditions when unthrottling is conditional
  * on factors evaluated prior to unthrottling.
  *
- * Returns 0 if tty is unthrottled (or was already unthrottled)
+ * Return: 0 if tty is unthrottled (or was already unthrottled).
  */
 int tty_unthrottle_safe(struct tty_struct *tty)
 {
@@ -206,7 +206,7 @@ int tty_unthrottle_safe(struct tty_struct *tty)
  * Wait for characters pending in a tty driver to hit the wire, or
  * for a timeout to occur (eg due to flow control)
  *
- * Locking: none
+ * Context: No locks taken.
  */
 void tty_wait_until_sent(struct tty_struct *tty, long timeout)
 {
@@ -301,7 +301,7 @@ EXPORT_SYMBOL(tty_termios_hw_change);
  * Perform updates to the termios values set on this terminal.
  * A master pty's termios should never be set.
  *
- * Locking: termios_rwsem
+ * Context: Takes termios_rwsem.
  */
 int tty_set_termios(struct tty_struct *tty, struct ktermios *new_termios)
 {
@@ -347,8 +347,7 @@ EXPORT_SYMBOL_GPL(tty_set_termios);
  * Helper function to prepare termios data and run necessary other
  * functions before using tty_set_termios to do the actual changes.
  *
- * Locking:
- *         Called functions take ldisc and termios_rwsem locks
+ * Context: Takes termios_rwsem.  Called functions take ldisc.
  */
 static int set_termios(struct tty_struct *tty, void __user *arg, int opt)
 {
@@ -551,7 +550,7 @@ static void set_sgflags(struct ktermios *termios, int flags)
  * Updates a terminal from the legacy BSD style terminal information
  * structure.
  *
- * Locking: termios_rwsem
+ * Context: Takes termios_rwsem.
  */
 static int set_sgttyb(struct tty_struct *tty, struct sgttyb __user *sgttyb)
 {
@@ -662,6 +661,8 @@ static int set_ltchars(struct tty_struct *tty, struct ltchars __user *ltchars)
  *
  * Perform a change to the CLOCAL state and call into the driver
  * layer to make it visible. All done with the termios rwsem
+ *
+ * Context: Takes termios_rwsem.
  */
 static int tty_change_softcar(struct tty_struct *tty, int arg)
 {
diff --git a/drivers/tty/tty_jobctrl.c b/drivers/tty/tty_jobctrl.c
index 3b5c822d360d..629452b9fe08 100644
--- a/drivers/tty/tty_jobctrl.c
+++ b/drivers/tty/tty_jobctrl.c
@@ -26,7 +26,7 @@ static int is_ignored(int sig)
  * not in the foreground, send a SIGTTOU.  If the signal is blocked or
  * ignored, go ahead and perform the operation.  (POSIX 7.2)
  *
- * Locking: ctrl_lock
+ * Context: Takes ctrl_lock.
  */
 int __tty_check_change(struct tty_struct *tty, int sig)
 {
@@ -87,9 +87,8 @@ void proc_clear_tty(struct task_struct *p)
  * Only callable by the session leader and only if it does not already have
  * a controlling terminal.
  *
- * Caller must hold:  tty_lock()
- *                    a readlock on tasklist_lock
- *                    sighand lock
+ * Context: Caller must hold tty_lock(), a readlock on tasklist_lock, and
+ *          sighand lock.
  */
 static void __proc_set_tty(struct tty_struct *tty)
 {
@@ -335,10 +334,9 @@ void no_tty(void)
  * This ioctl is used to manage job control. It permits a session
  * leader to set this tty as the controlling tty for the session.
  *
- * Locking:
- *         Takes tty_lock() to serialize proc_set_tty() for this tty
- *         Takes tasklist_lock internally to walk sessions
- *         Takes ->siglock() when updating signal->tty
+ * Context: Takes tty_lock() to serialize proc_set_tty() for this tty
+ *          Takes tasklist_lock internally to walk sessions
+ *          Takes ->siglock() when updating signal->tty
  */
 static int tiocsctty(struct tty_struct *tty, struct file *file, int arg)
 {
@@ -438,7 +436,7 @@ static struct pid *session_of_pgrp(struct pid *pgrp)
  * Obtain the process group of the tty. If there is no process group
  * return an error.
  *
- * Locking: none. Reference to current->signal->tty is safe.
+ * Context: No Locks taken. Reference to current->signal->tty is safe.
  */
 static int tiocgpgrp(struct tty_struct *tty, struct tty_struct *real_tty, pid_t __user *p)
 {
@@ -465,7 +463,7 @@ static int tiocgpgrp(struct tty_struct *tty, struct tty_struct *real_tty, pid_t
  * Set the process group of the tty to the session passed. Only
  * permitted where the tty session is our session.
  *
- * Locking: RCU, ctrl lock
+ * Context: RCU, ctrl lock
  */
 static int tiocspgrp(struct tty_struct *tty, struct tty_struct *real_tty, pid_t __user *p)
 {
@@ -512,7 +510,7 @@ static int tiocspgrp(struct tty_struct *tty, struct tty_struct *real_tty, pid_t
  * Obtain the session id of the tty. If there is no session
  * return an error.
  *
- * Locking: none. Reference to current->signal->tty is safe.
+ * Context: No locks taken. Reference to current->signal->tty is safe.
  */
 static int tiocgsid(struct tty_struct *tty, struct tty_struct *real_tty, pid_t __user *p)
 {
diff --git a/drivers/tty/tty_ldisc.c b/drivers/tty/tty_ldisc.c
index d54985ea6088..b9c62682996d 100644
--- a/drivers/tty/tty_ldisc.c
+++ b/drivers/tty/tty_ldisc.c
@@ -54,8 +54,7 @@ static struct tty_ldisc_ops *tty_ldiscs[NR_LDISCS];
  * is set up as unreferenced and then made available to the kernel
  * from this point onwards.
  *
- * Locking:
- *         takes tty_ldiscs_lock to guard against ldisc races
+ * Context: Takes tty_ldiscs_lock to guard against ldisc races.
  */
 int tty_register_ldisc(int disc, struct tty_ldisc_ops *new_ldisc)
 {
@@ -83,8 +82,7 @@ EXPORT_SYMBOL(tty_register_ldisc);
  * Remove a line discipline from the kernel providing it is not
  * currently in use.
  *
- * Locking:
- *         takes tty_ldiscs_lock to guard against ldisc races
+ * Context: Takes tty_ldiscs_lock to guard against ldisc races.
  */
 int tty_unregister_ldisc(int disc)
 {
@@ -141,17 +139,16 @@ static void put_ldops(struct tty_ldisc_ops *ldops)
  * Takes a reference to a line discipline. Deals with refcounts and
  * module locking counts.
  *
- * Returns: -EINVAL if the discipline index is not [N_TTY..NR_LDISCS] or
- *                  if the discipline is not registeredn
- *          -EAGAIN if request_module() failed to load or register the
- *                  the discipline
- *          -ENOMEM if allocation failure
+ * Context: Takes tty_ldiscs_lock to guard against ldisc races.
  *
- *          Otherwise, returns a pointer to the discipline and bumps the
- *          ref count
+ * Return: -EINVAL if the discipline index is not [N_TTY..NR_LDISCS] or
+ *                 if the discipline is not registered
+ *         -EAGAIN if request_module() failed to load or register the
+ *                 the discipline
+ *         -ENOMEM if allocation failure
  *
- * Locking:
- *         takes tty_ldiscs_lock to guard against ldisc races
+ *         Otherwise, returns a pointer to the discipline and bumps the
+ *         ref count.
  */
 static struct tty_ldisc *tty_ldisc_get(struct tty_struct *tty, int disc)
 {
@@ -241,9 +238,6 @@ const struct seq_operations tty_ldiscs_seq_ops = {
  * reference to it. If the line discipline is in flux then
  * wait patiently until it changes.
  *
- * Returns: NULL if the tty has been hungup and not re-opened with
- *          a new file descriptor, otherwise valid ldisc reference
- *
  * Note: Must not be called from an IRQ/timer context. The caller
  * must also be careful not to hold other locks that will deadlock
  * against a discipline change, such as an existing ldisc reference
@@ -251,6 +245,9 @@ const struct seq_operations tty_ldiscs_seq_ops = {
  *
  * Note: a file_operations routine (read/poll/write) should use this
  * function to wait for any ldisc lifetime events to finish.
+ *
+ * Return: NULL if the tty has been hungup and not re-opened with
+ *         a new file descriptor, otherwise valid ldisc reference
  */
 struct tty_ldisc *tty_ldisc_ref_wait(struct tty_struct *tty)
 {
@@ -413,7 +410,7 @@ EXPORT_SYMBOL_GPL(tty_ldisc_flush);
  * prevent the ldisc driver from re-using stale information for
  * the new ldisc instance.
  *
- * Locking: takes termios_rwsem
+ * Context: Takes termios_rwsem.
  */
 static void tty_set_termios_ldisc(struct tty_struct *tty, int disc)
 {
@@ -433,7 +430,7 @@ static void tty_set_termios_ldisc(struct tty_struct *tty, int disc)
  * A helper opening method. Also a convenient debugging and check
  * point.
  *
- * Locking: always called with BTM already held.
+ * Context: Always called with BTM already held.
  */
 static int tty_ldisc_open(struct tty_struct *tty, struct tty_ldisc *ld)
 {
@@ -640,7 +637,7 @@ static void tty_reset_termios(struct tty_struct *tty)
  * is dropped and tty->ldisc reset to NULL. The caller can then retry
  * with N_TTY instead.
  *
- * Returns 0 if successful, otherwise error code < 0
+ * Return: 0 if successful, otherwise error code < 0.
  */
 int tty_ldisc_reinit(struct tty_struct *tty, int disc)
 {
@@ -677,8 +674,8 @@ int tty_ldisc_reinit(struct tty_struct *tty, int disc)
  * event. In that situation we must also switch back to N_TTY properly
  * before we reset the termios data.
  *
- * Locking: We can take the ldisc mutex as the rest of the code is
- * careful to allow for this.
+ * Context: We can take the ldisc mutex as the rest of the code is
+ *          careful to allow for this.
  *
  * In the pty pair case this occurs in the close() path of the
  * tty itself so we must be careful about locking rules.
@@ -801,8 +798,8 @@ int tty_ldisc_init(struct tty_struct *tty)
  * tty_ldisc_deinit() - ldisc cleanup for new tty
  * @tty: tty that was allocated recently
  *
- * The tty structure must not becompletely set up (tty_ldisc_setup) when
- *      this call is made.
+ * The tty structure must not be completely set up (tty_ldisc_setup) when
+ * this call is made.
  */
 void tty_ldisc_deinit(struct tty_struct *tty)
 {
diff --git a/drivers/tty/tty_port.c b/drivers/tty/tty_port.c
index d4dfe29a6348..c5770682ee7a 100644
--- a/drivers/tty/tty_port.c
+++ b/drivers/tty/tty_port.c
@@ -339,7 +339,7 @@ static void tty_port_shutdown(struct tty_port *port, struct tty_struct *tty)
  * Perform port level tty hangup flag and count changes. Drop the tty
  * reference.
  *
- * Caller holds tty lock.
+ * Context: Caller holds tty lock.
  */
 void tty_port_hangup(struct tty_port *port)
 {
@@ -451,7 +451,7 @@ EXPORT_SYMBOL(tty_port_lower_dtr_rts);
  * management of these lines. Note that the dtr/rts raise is done each
  * iteration as a hangup may have previously dropped them while we wait.
  *
- * Caller holds tty lock.
+ * Context: Caller holds tty lock.
  *
  * NB: May drop and reacquire tty lock when blocking, so tty and tty_port
  * may have changed state (eg., may have been hung up).
@@ -623,7 +623,7 @@ EXPORT_SYMBOL(tty_port_close_end);
 /**
  * tty_port_close()
  *
- * Caller holds tty lock
+ * Context: Caller holds tty lock.
  */
 void tty_port_close(struct tty_port *port, struct tty_struct *tty,
 							struct file *filp)
@@ -658,7 +658,7 @@ EXPORT_SYMBOL_GPL(tty_port_install);
 /**
  * tty_port_open()
  *
- * Caller holds tty lock.
+ * Context: Caller holds tty lock.
  *
  * NB: may drop and reacquire tty lock (in tty_port_block_til_ready()) so
  * tty and tty_port may have changed state (eg., may be hung up now)
diff --git a/drivers/tty/vt/consolemap.c b/drivers/tty/vt/consolemap.c
index 74f4ef98aa7d..45bc49229fe5 100644
--- a/drivers/tty/vt/consolemap.c
+++ b/drivers/tty/vt/consolemap.c
@@ -654,7 +654,7 @@ int con_set_unimap(struct vc_data *vc, ushort ct, struct unipair __user *list)
  * with.  This routine is executed at video setup, and when the
  * PIO_FONTRESET ioctl is called.
  *
- * The caller must hold the console lock
+ * Context: The caller must hold the console lock.
  */
 int con_set_default_unimap(struct vc_data *vc)
 {
@@ -710,7 +710,7 @@ EXPORT_SYMBOL(con_set_default_unimap);
  * @dst_vc: target
  * @src_vt: source
  *
- * The caller must hold the console lock when invoking this method
+ * Context: The caller must hold the console lock.
  */
 int con_copy_unimap(struct vc_data *dst_vc, struct vc_data *src_vc)
 {
diff --git a/drivers/tty/vt/keyboard.c b/drivers/tty/vt/keyboard.c
index 3c3eb14e1565..487e5af87173 100644
--- a/drivers/tty/vt/keyboard.c
+++ b/drivers/tty/vt/keyboard.c
@@ -1789,7 +1789,8 @@ int vt_do_diacrit(unsigned int cmd, void __user *udp, int perm)
  * @arg: the requested mode
  *
  * Update the keyboard mode bits while holding the correct locks.
- * Return 0 for success or an error code.
+ *
+ * Return: 0 for success or an error code.
  */
 int vt_do_kdskbmode(int console, unsigned int arg)
 {
@@ -1829,7 +1830,8 @@ int vt_do_kdskbmode(int console, unsigned int arg)
  * @arg: the requested meta state
  *
  * Update the keyboard meta bits while holding the correct locks.
- * Return 0 for success or an error code.
+ *
+ * Return: 0 for success or an error code.
  */
 int vt_do_kdskbmeta(int console, unsigned int arg)
 {
diff --git a/drivers/tty/vt/selection.c b/drivers/tty/vt/selection.c
index 473015beb0f2..309b3f043710 100644
--- a/drivers/tty/vt/selection.c
+++ b/drivers/tty/vt/selection.c
@@ -70,7 +70,9 @@ sel_pos(int n)
  * clear_selection() - remove current selection
  *
  * Remove the current selection highlight, if any from the console
- * holding the selection. The caller must hold the console lock.
+ * holding the selection.
+ *
+ * Context: The caller must hold the console lock.
  */
 void clear_selection(void)
 {
@@ -101,8 +103,10 @@ static inline int inword(const u32 c)
  * sel_loadlut() - load the LUT table
  * @p: user table
  *
- * Load the LUT table from user space. The caller must hold the console
- * lock. Make a temporary copy so a partial update doesn't make a mess.
+ * Load the LUT table from user space.  Make a temporary copy so a
+ * partial update doesn't make a mess.
+ *
+ * Context: The caller must hold the console lock.
  */
 int sel_loadlut(char __user *p)
 {
diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
index dae5a7a82aee..e0c989647d7e 100644
--- a/drivers/tty/vt/vt.c
+++ b/drivers/tty/vt/vt.c
@@ -1140,8 +1140,8 @@ static inline int resize_screen(struct vc_data *vc, int width, int height,
  * If the caller passes a tty structure then update the termios winsize
  * information and perform any necessary signal handling.
  *
- * Caller must hold the console semaphore. Takes the termios rwsem and
- * ctrl_lock of the tty IFF a tty is passed.
+ * Context: Caller must hold the console semaphore. Takes the termios_rwsem
+ *          and ctrl_lock of the tty IFF a tty is passed.
  */
 
 static int vc_do_resize(struct tty_struct *tty, struct vc_data *vc,
@@ -3797,10 +3797,10 @@ static void vtconsole_deinit_device(struct con_driver *con)
  * con_is_bound() - checks if driver is bound to the console
  * @csw: console driver
  *
- * RETURNS: zero if unbound, nonzero if bound
- *
  * Drivers can call this and if zero, they should release
  * all resources allocated on con_startup()
+ *
+ * Return: zero if unbound, nonzero if bound.
  */
 int con_is_bound(const struct consw *csw)
 {
@@ -3825,9 +3825,8 @@ EXPORT_SYMBOL(con_is_bound);
  * function needs to save the current console state, then put the console
  * into a state suitable for the kernel debugger.
  *
- * RETURNS:
- * Zero on success, nonzero if a failure occurred when trying to prepare
- * the console for the debugger.
+ * Return: Zero on success, nonzero if a failure occurred when trying to
+ *         prepare the console for the debugger.
  */
 int con_debug_enter(struct vc_data *vc)
 {
@@ -3882,9 +3881,8 @@ EXPORT_SYMBOL_GPL(con_debug_enter);
  * Restore the console state to what it was before the kernel debugger
  * was invoked.
  *
- * RETURNS:
- * Zero on success, nonzero if a failure occurred when trying to restore
- * the console.
+ * Return: Zero on success, nonzero if a failure occurred when trying
+ *         to restore the console.
  */
 int con_debug_leave(void)
 {
@@ -3977,10 +3975,10 @@ static int do_register_con_driver(const struct consw *csw, int first, int last)
  * do_unregister_con_driver() - unregister console driver from console layer
  * @csw: console driver
  *
- * DESCRIPTION: All drivers that registers to the console layer must
- * call this function upon exit, or if the console driver is in a state
- * where it won't be able to handle console services, such as the
- * framebuffer console without loaded framebuffer drivers.
+ * All drivers that registers to the console layer must call this function
+ * upon exit, or if the console driver is in a state where it won't be able
+ * to handle console services, such as the framebuffer console without
+ * loaded framebuffer drivers.
  *
  * The driver must unbind first prior to unregistration.
  */
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH v2 1/7] tty: Fix whitespace before tab warnings
  2018-10-18 22:37 ` [PATCH v2 1/7] tty: Fix whitespace before tab warnings Tobin C. Harding
@ 2018-11-09 16:42   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 9+ messages in thread
From: Greg Kroah-Hartman @ 2018-11-09 16:42 UTC (permalink / raw)
  To: Tobin C. Harding; +Cc: Jiri Slaby, Geert Uytterhoeven, linux-kernel

On Fri, Oct 19, 2018 at 09:37:01AM +1100, Tobin C. Harding wrote:
> This patch is whitespace only.
> 
> Checkpatch emits a BUNCH of warnings of type
> 
> 	WARNING: please, no spaces at the start of a line
> 	WARNING: please, no space before tabs
> 
> While these may seem trivial they hinder further cleanup efforts because
> there are so many that later cleanup touches many of the same lines,
> this makes the cleanup patches super noisy when parsed with
> checkpatch (although checkpatching this series is prohibitively noisy
> even with this patch).
> 
> In preparation for doing kernel-docs cleanup fix all the whitespace
> before tab and whitespace at start of line warnings.  We do not fix any
> that are obviously there for extra-ordinary formatting reasons.
> 
> Any line in the diff with obvious other formatting errors is fixed also
> excluding kernel-docs lines.
> 
> Signed-off-by: Tobin C. Harding <tobin@kernel.org>
> ---
> 
> Actually, checkpatch is only noisy on a couple of patches from this
> set.  I ran checkpatch individually (instead of on the whole set) on
> each patch and fixed things within scope of this set while working on
> version 2 of the set.
> 
>  drivers/tty/amiserial.c                     |  43 ++++---
>  drivers/tty/hvc/hvc_console.c               |   2 +-
>  drivers/tty/ipwireless/tty.c                |   2 +-
>  drivers/tty/isicom.c                        |   4 +-
>  drivers/tty/moxa.c                          |  30 +++--
>  drivers/tty/mxser.c                         |  10 +-
>  drivers/tty/n_hdlc.c                        |  10 +-
>  drivers/tty/rocket.c                        |   8 +-
>  drivers/tty/serdev/core.c                   |   2 +-
>  drivers/tty/serial/8250/8250_dw.c           |   4 +-
>  drivers/tty/serial/amba-pl011.c             |   8 +-
>  drivers/tty/serial/cpm_uart/cpm_uart_core.c |   8 +-
>  drivers/tty/serial/icom.c                   |   5 +-
>  drivers/tty/serial/ip22zilog.c              |   2 +-
>  drivers/tty/serial/jsm/jsm_neo.c            |   2 +-
>  drivers/tty/serial/mux.c                    |   6 +-
>  drivers/tty/serial/mxs-auart.c              |   2 +-
>  drivers/tty/serial/pmac_zilog.c             |   4 +-
>  drivers/tty/serial/pxa.c                    |  20 +--
>  drivers/tty/serial/serial_txx9.c            |   2 +-
>  drivers/tty/serial/sn_console.c             |  38 +++---
>  drivers/tty/serial/sunsab.c                 |   2 +-
>  drivers/tty/serial/sunsu.c                  |   4 +-
>  drivers/tty/serial/sunzilog.c               |   2 +-
>  drivers/tty/serial/ucc_uart.c               | 134 ++++++++++----------
>  drivers/tty/serial/vr41xx_siu.c             |   2 +-
>  drivers/tty/serial/zs.c                     |  12 +-
>  drivers/tty/sysrq.c                         |  34 ++---
>  drivers/tty/tty_baudrate.c                  |   2 +-
>  drivers/tty/tty_io.c                        |  22 ++--
>  drivers/tty/tty_ioctl.c                     |   2 +-
>  drivers/tty/tty_jobctrl.c                   |   8 +-
>  drivers/tty/vt/consolemap.c                 |   6 +-
>  drivers/tty/vt/keyboard.c                   |  29 +++--
>  drivers/tty/vt/selection.c                  |  12 +-
>  drivers/tty/vt/vt.c                         |  40 +++---
>  drivers/tty/vt/vt_ioctl.c                   |  14 +-
>  37 files changed, 271 insertions(+), 266 deletions(-)

The hard part about doing large patches like this that cross lots of
files is that it usually does not end up applying.  This patch currently
fails against 4.20-rc1 :(

But, if it were divided up into "one patch per driver" then I could have
applied the majority of them, as only a few drivers changed to require
this series to be rebased and reworked.

I really want to apply this patch series, but as-is, it just can't even
apply...  Can you rebase/break up the patches into smaller ones so that
we have a chance to get them merged eventually?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-11-09 16:42 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-18 22:37 [PATCH v2 0/7] drivers: tty: Fix kernel-docs comments Tobin C. Harding
2018-10-18 22:37 ` [PATCH v2 1/7] tty: Fix whitespace before tab warnings Tobin C. Harding
2018-11-09 16:42   ` Greg Kroah-Hartman
2018-10-18 22:37 ` [PATCH v2 2/7] tty: Remove trailing whitespace Tobin C. Harding
2018-10-18 22:37 ` [PATCH v2 3/7] tty: Partially fix kernel-docs layout Tobin C. Harding
2018-10-18 22:37 ` [PATCH v2 4/7] tty: Fix kernel-doc variable typos Tobin C. Harding
2018-10-18 22:37 ` [PATCH v2 5/7] tty: Fix spacing between kernel-doc sections Tobin C. Harding
2018-10-18 22:37 ` [PATCH v2 6/7] tty: Remove newline after function kernel-doc Tobin C. Harding
2018-10-18 22:37 ` [PATCH v2 7/7] tty: Fix section format Tobin C. Harding

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).