Commit 1bb80b50 authored by Hanna V. Linder's avatar Hanna V. Linder Committed by Greg Kroah-Hartman

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

parent 126582e2
...@@ -389,29 +389,6 @@ void rio_udelay (int usecs) ...@@ -389,29 +389,6 @@ void rio_udelay (int usecs)
udelay (usecs); 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) static int rio_set_real_termios (void *ptr)
{ {
int rv, modem; int rv, modem;
...@@ -660,7 +637,6 @@ static void rio_hungup (void *ptr) ...@@ -660,7 +637,6 @@ static void rio_hungup (void *ptr)
PortP = (struct Port *)ptr; PortP = (struct Port *)ptr;
PortP->gs.tty = NULL; PortP->gs.tty = NULL;
rio_dec_mod_count ();
func_exit (); func_exit ();
} }
...@@ -686,7 +662,6 @@ static void rio_close (void *ptr) ...@@ -686,7 +662,6 @@ static void rio_close (void *ptr)
} }
PortP->gs.tty = NULL; PortP->gs.tty = NULL;
rio_dec_mod_count ();
func_exit (); func_exit ();
} }
...@@ -908,6 +883,7 @@ static int rio_init_drivers(void) ...@@ -908,6 +883,7 @@ static int rio_init_drivers(void)
memset(&rio_driver, 0, sizeof(rio_driver)); memset(&rio_driver, 0, sizeof(rio_driver));
rio_driver.magic = TTY_DRIVER_MAGIC; rio_driver.magic = TTY_DRIVER_MAGIC;
rio_driver.owner = THIS_MODULE;
rio_driver.driver_name = "specialix_rio"; rio_driver.driver_name = "specialix_rio";
rio_driver.name = "ttySR"; rio_driver.name = "ttySR";
rio_driver.major = RIO_NORMAL_MAJOR0; rio_driver.major = RIO_NORMAL_MAJOR0;
......
...@@ -87,9 +87,6 @@ struct vpd_prom { ...@@ -87,9 +87,6 @@ struct vpd_prom {
#endif #endif
void rio_dec_mod_count (void);
void rio_inc_mod_count (void);
/* Allow us to debug "in the field" without requiring clients to /* Allow us to debug "in the field" without requiring clients to
recompile.... */ recompile.... */
#if 1 #if 1
......
...@@ -139,7 +139,6 @@ default_sg = ...@@ -139,7 +139,6 @@ default_sg =
extern struct rio_info *p; extern struct rio_info *p;
extern void rio_inc_mod_count (void);
int int
...@@ -205,8 +204,6 @@ riotopen(struct tty_struct * tty, struct file * filp) ...@@ -205,8 +204,6 @@ riotopen(struct tty_struct * tty, struct file * filp)
tty->driver_data = PortP; tty->driver_data = PortP;
PortP->gs.tty = tty; PortP->gs.tty = tty;
if (!PortP->gs.count)
rio_inc_mod_count ();
PortP->gs.count++; PortP->gs.count++;
rio_dprintk (RIO_DEBUG_TTY, "%d bytes in tx buffer\n", rio_dprintk (RIO_DEBUG_TTY, "%d bytes in tx buffer\n",
...@@ -215,8 +212,6 @@ riotopen(struct tty_struct * tty, struct file * filp) ...@@ -215,8 +212,6 @@ riotopen(struct tty_struct * tty, struct file * filp)
retval = gs_init_port (&PortP->gs); retval = gs_init_port (&PortP->gs);
if (retval) { if (retval) {
PortP->gs.count--; PortP->gs.count--;
if (PortP->gs.count)
rio_dec_mod_count ();
return -ENXIO; return -ENXIO;
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment