Re: [PATCH] TTY changes for 2.5.69

Greg KH (greg@kroah.com)
Wed, 7 May 2003 16:16:27 -0700


ChangeSet 1.1099, 2003/05/07 14:59:42-07:00, hannal@us.ibm.com

[PATCH] rio tty_driver add .owner field remove MOD_INC/DEC_USE_COUNT

drivers/char/rio/rio_linux.c | 26 +-------------------------
drivers/char/rio/rio_linux.h | 3 ---
drivers/char/rio/riotty.c | 5 -----
3 files changed, 1 insertion(+), 33 deletions(-)

diff -Nru a/drivers/char/rio/rio_linux.c b/drivers/char/rio/rio_linux.c
--- a/drivers/char/rio/rio_linux.c Wed May 7 16:01:14 2003
+++ b/drivers/char/rio/rio_linux.c Wed May 7 16:01:14 2003
@@ -389,29 +389,6 @@
udelay (usecs);
}

-
-void rio_inc_mod_count (void)
-{
-#ifdef MODULE
- func_enter ();
- rio_dprintk (RIO_DEBUG_MOD_COUNT, "rio_inc_mod_count\n");
- MOD_INC_USE_COUNT;
- func_exit ();
-#endif
-}
-
-
-void rio_dec_mod_count (void)
-{
-#ifdef MODULE
- func_enter ();
- rio_dprintk (RIO_DEBUG_MOD_COUNT, "rio_dec_mod_count\n");
- MOD_DEC_USE_COUNT;
- func_exit ();
-#endif
-}
-
-
static int rio_set_real_termios (void *ptr)
{
int rv, modem;
@@ -660,7 +637,6 @@

PortP = (struct Port *)ptr;
PortP->gs.tty = NULL;
- rio_dec_mod_count ();

func_exit ();
}
@@ -686,7 +662,6 @@
}

PortP->gs.tty = NULL;
- rio_dec_mod_count ();
func_exit ();
}

@@ -908,6 +883,7 @@

memset(&rio_driver, 0, sizeof(rio_driver));
rio_driver.magic = TTY_DRIVER_MAGIC;
+ rio_driver.owner = THIS_MODULE;
rio_driver.driver_name = "specialix_rio";
rio_driver.name = "ttySR";
rio_driver.major = RIO_NORMAL_MAJOR0;
diff -Nru a/drivers/char/rio/rio_linux.h b/drivers/char/rio/rio_linux.h
--- a/drivers/char/rio/rio_linux.h Wed May 7 16:01:14 2003
+++ b/drivers/char/rio/rio_linux.h Wed May 7 16:01:14 2003
@@ -87,9 +87,6 @@
#endif


-void rio_dec_mod_count (void);
-void rio_inc_mod_count (void);
-
/* Allow us to debug "in the field" without requiring clients to
recompile.... */
#if 1
diff -Nru a/drivers/char/rio/riotty.c b/drivers/char/rio/riotty.c
--- a/drivers/char/rio/riotty.c Wed May 7 16:01:14 2003
+++ b/drivers/char/rio/riotty.c Wed May 7 16:01:14 2003
@@ -139,7 +139,6 @@


extern struct rio_info *p;
-extern void rio_inc_mod_count (void);


int
@@ -205,8 +204,6 @@
tty->driver_data = PortP;

PortP->gs.tty = tty;
- if (!PortP->gs.count)
- rio_inc_mod_count ();
PortP->gs.count++;

rio_dprintk (RIO_DEBUG_TTY, "%d bytes in tx buffer\n",
@@ -215,8 +212,6 @@
retval = gs_init_port (&PortP->gs);
if (retval) {
PortP->gs.count--;
- if (PortP->gs.count)
- rio_dec_mod_count ();
return -ENXIO;
}
/*

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/