* [PATCH] n_hdlc.c 2.5.68
@ 2003-04-21 18:12 Paul Fulghum
2003-04-21 18:18 ` Christoph Hellwig
0 siblings, 1 reply; 2+ messages in thread
From: Paul Fulghum @ 2003-04-21 18:12 UTC (permalink / raw)
To: linux-kernel; +Cc: alan, torvalds
Patch to remove MODULE_USE_COUNT macros
and make some functions static.
Please apply.
Paul Fulghum
paulkf@microgate.com
--- linux-2.5.68/drivers/char/n_hdlc.c 2003-04-07 12:30:59.000000000
-0500
+++ linux-2.5.68-mg/drivers/char/n_hdlc.c 2003-04-21 12:54:06.650579776
-0500
@@ -9,7 +9,7 @@
* Al Longyear <longyear@netcom.com>, Paul Mackerras
<Paul.Mackerras@cs.anu.edu.au>
*
* Original release 01/11/99
- * $Id: n_hdlc.c,v 4.2 2002/10/10 14:52:41 paulkf Exp $
+ * $Id: n_hdlc.c,v 4.5 2003/04/21 17:46:54 paulkf Exp $
*
* This code is released under the GNU General Public License (GPL)
*
@@ -78,7 +78,7 @@
*/
#define HDLC_MAGIC 0x239e
-#define HDLC_VERSION "$Revision: 4.2 $"
+#define HDLC_VERSION "$Revision: 4.5 $"
#include <linux/version.h>
#include <linux/config.h>
@@ -171,9 +171,9 @@
/*
* HDLC buffer list manipulation functions
*/
-void n_hdlc_buf_list_init(N_HDLC_BUF_LIST *list);
-void n_hdlc_buf_put(N_HDLC_BUF_LIST *list,N_HDLC_BUF *buf);
-N_HDLC_BUF* n_hdlc_buf_get(N_HDLC_BUF_LIST *list);
+static void n_hdlc_buf_list_init(N_HDLC_BUF_LIST *list);
+static void n_hdlc_buf_put(N_HDLC_BUF_LIST *list,N_HDLC_BUF *buf);
+static N_HDLC_BUF* n_hdlc_buf_get(N_HDLC_BUF_LIST *list);
/* Local functions */
@@ -299,7 +299,6 @@
n_hdlc->tty = n_hdlc->backup_tty;
} else {
n_hdlc_release (n_hdlc);
- MOD_DEC_USE_COUNT;
}
}
@@ -339,8 +338,6 @@
tty->disc_data = n_hdlc;
n_hdlc->tty = tty;
- MOD_INC_USE_COUNT;
-
#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);
@@ -903,7 +900,7 @@
* Arguments: list pointer to buffer list
* Return Value: None
*/
-void n_hdlc_buf_list_init(N_HDLC_BUF_LIST *list)
+static void n_hdlc_buf_list_init(N_HDLC_BUF_LIST *list)
{
memset(list,0,sizeof(N_HDLC_BUF_LIST));
spin_lock_init(&list->spinlock);
@@ -920,7 +917,7 @@
*
* Return Value: None
*/
-void n_hdlc_buf_put(N_HDLC_BUF_LIST *list,N_HDLC_BUF *buf)
+static void n_hdlc_buf_put(N_HDLC_BUF_LIST *list,N_HDLC_BUF *buf)
{
unsigned long flags;
spin_lock_irqsave(&list->spinlock,flags);
@@ -950,7 +947,7 @@
*
* pointer to HDLC buffer if available, otherwise NULL
*/
-N_HDLC_BUF* n_hdlc_buf_get(N_HDLC_BUF_LIST *list)
+static N_HDLC_BUF* n_hdlc_buf_get(N_HDLC_BUF_LIST *list)
{
unsigned long flags;
N_HDLC_BUF *buf;
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] n_hdlc.c 2.5.68
2003-04-21 18:12 [PATCH] n_hdlc.c 2.5.68 Paul Fulghum
@ 2003-04-21 18:18 ` Christoph Hellwig
0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2003-04-21 18:18 UTC (permalink / raw)
To: Paul Fulghum; +Cc: linux-kernel, alan, torvalds
On Mon, Apr 21, 2003 at 01:12:22PM -0500, Paul Fulghum wrote:
> Patch to remove MODULE_USE_COUNT macros
> and make some functions static.
You also need to set the module owner. Once you're at it also
please try to initialize as much as possible of n_hdlc_ldisc
at compile, like:
struct tty_ldisc n_hdlc_ldisc {
.foo = bar,
....
};
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-04-21 18:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-21 18:12 [PATCH] n_hdlc.c 2.5.68 Paul Fulghum
2003-04-21 18:18 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®