public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [2.6 patch] drivers/char/mxser.c cleanups
@ 2005-01-31 12:38 Adrian Bunk
  0 siblings, 0 replies; 3+ messages in thread
From: Adrian Bunk @ 2005-01-31 12:38 UTC (permalink / raw)
  To: Alan Cox; +Cc: linux-kernel

This patch contains the following cleanups:
- make two needlessly global structs static
- remove the unused global function SDS_PORT8_DTR

@Alan:
SDS_PORT8_DTR was introduced by your "Bring Moxa serial back into being" 
patch last month but was completely unused.
Is it correct to remove this function or should there have been a usage 
of this function?

Signed-off-by: Adrian Bunk <bunk@stusta.de>

---

 drivers/char/mxser.c |   21 ++-------------------
 1 files changed, 2 insertions(+), 19 deletions(-)

--- linux-2.6.11-rc2-mm2-full/drivers/char/mxser.c.old	2005-01-31 13:20:44.000000000 +0100
+++ linux-2.6.11-rc2-mm2-full/drivers/char/mxser.c	2005-01-31 13:22:07.000000000 +0100
@@ -179,7 +179,7 @@
 
 #define UART_TYPE_NUM	2
 
-unsigned int Gmoxa_uart_id[UART_TYPE_NUM] = {
+static unsigned int Gmoxa_uart_id[UART_TYPE_NUM] = {
 	MOXA_MUST_MU150_HWID,
 	MOXA_MUST_MU860_HWID
 };
@@ -197,7 +197,7 @@
 	long max_baud;
 };
 
-struct mxpciuart_info Gpci_uart_info[UART_INFO_NUM] = {
+static struct mxpciuart_info Gpci_uart_info[UART_INFO_NUM] = {
 	{MOXA_OTHER_UART, 16, 16, 16, 14, 14, 1, 921600L},
 	{MOXA_MUST_MU150_HWID, 64, 64, 64, 48, 48, 16, 230400L},
 	{MOXA_MUST_MU860_HWID, 128, 128, 128, 96, 96, 32, 921600L}
@@ -3174,22 +3174,5 @@
 	outb(0x00, port + 4);
 }
 
-// added by James 03-05-2004.
-// for secure device server:
-// stat = 1, the port8 DTR is set to ON.
-// stat = 0, the port8 DTR is set to OFF.
-void SDS_PORT8_DTR(int stat)
-{
-	int _sds_oldmcr;
-	_sds_oldmcr = inb(mxvar_table[7].base + UART_MCR);	// get old MCR
-	if (stat == 1) {
-		outb(_sds_oldmcr | 0x01, mxvar_table[7].base + UART_MCR);	// set DTR ON
-	}
-	if (stat == 0) {
-		outb(_sds_oldmcr & 0xfe, mxvar_table[7].base + UART_MCR);	// set DTR OFF
-	}
-	return;
-}
-
 module_init(mxser_module_init);
 module_exit(mxser_module_exit);


^ permalink raw reply	[flat|nested] 3+ messages in thread
* [2.6 patch] drivers/char/mxser.c cleanups
@ 2005-02-24 23:38 Adrian Bunk
       [not found] ` <200502251043.14792.vda@port.imtp.ilyichevsk.odessa.ua>
  0 siblings, 1 reply; 3+ messages in thread
From: Adrian Bunk @ 2005-02-24 23:38 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Alan Cox, linux-kernel

This patch contains the following cleanups:
- make two needlessly global structs static
- remove the unused global function SDS_PORT8_DTR

Alan already ACK'ed this patch.

Signed-off-by: Adrian Bunk <bunk@stusta.de>

---

This patch was already sent on:
- 31 Jan 2005

 drivers/char/mxser.c |   21 ++-------------------
 1 files changed, 2 insertions(+), 19 deletions(-)

--- linux-2.6.11-rc2-mm2-full/drivers/char/mxser.c.old	2005-01-31 13:20:44.000000000 +0100
+++ linux-2.6.11-rc2-mm2-full/drivers/char/mxser.c	2005-01-31 13:22:07.000000000 +0100
@@ -179,7 +179,7 @@
 
 #define UART_TYPE_NUM	2
 
-unsigned int Gmoxa_uart_id[UART_TYPE_NUM] = {
+static unsigned int Gmoxa_uart_id[UART_TYPE_NUM] = {
 	MOXA_MUST_MU150_HWID,
 	MOXA_MUST_MU860_HWID
 };
@@ -197,7 +197,7 @@
 	long max_baud;
 };
 
-struct mxpciuart_info Gpci_uart_info[UART_INFO_NUM] = {
+static struct mxpciuart_info Gpci_uart_info[UART_INFO_NUM] = {
 	{MOXA_OTHER_UART, 16, 16, 16, 14, 14, 1, 921600L},
 	{MOXA_MUST_MU150_HWID, 64, 64, 64, 48, 48, 16, 230400L},
 	{MOXA_MUST_MU860_HWID, 128, 128, 128, 96, 96, 32, 921600L}
@@ -3174,22 +3174,5 @@
 	outb(0x00, port + 4);
 }
 
-// added by James 03-05-2004.
-// for secure device server:
-// stat = 1, the port8 DTR is set to ON.
-// stat = 0, the port8 DTR is set to OFF.
-void SDS_PORT8_DTR(int stat)
-{
-	int _sds_oldmcr;
-	_sds_oldmcr = inb(mxvar_table[7].base + UART_MCR);	// get old MCR
-	if (stat == 1) {
-		outb(_sds_oldmcr | 0x01, mxvar_table[7].base + UART_MCR);	// set DTR ON
-	}
-	if (stat == 0) {
-		outb(_sds_oldmcr & 0xfe, mxvar_table[7].base + UART_MCR);	// set DTR OFF
-	}
-	return;
-}
-
 module_init(mxser_module_init);
 module_exit(mxser_module_exit);


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

end of thread, other threads:[~2005-02-25 22:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-31 12:38 [2.6 patch] drivers/char/mxser.c cleanups Adrian Bunk
  -- strict thread matches above, loose matches on Subject: below --
2005-02-24 23:38 Adrian Bunk
     [not found] ` <200502251043.14792.vda@port.imtp.ilyichevsk.odessa.ua>
2005-02-25 22:48   ` Adrian Bunk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox