Commit 797e8af2 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] callout removal: rio

callout removal: rio
parent 08f6df21
...@@ -114,15 +114,12 @@ more than 512 ports.... */ ...@@ -114,15 +114,12 @@ more than 512 ports.... */
/* Why the hell am I defining these here? */ /* Why the hell am I defining these here? */
#define RIO_TYPE_NORMAL 1 #define RIO_TYPE_NORMAL 1
#define RIO_TYPE_CALLOUT 2
#ifndef RIO_NORMAL_MAJOR0 #ifndef RIO_NORMAL_MAJOR0
/* This allows overriding on the compiler commandline, or in a "major.h" /* This allows overriding on the compiler commandline, or in a "major.h"
include or something like that */ include or something like that */
#define RIO_NORMAL_MAJOR0 154 #define RIO_NORMAL_MAJOR0 154
#define RIO_CALLOUT_MAJOR0 155
#define RIO_NORMAL_MAJOR1 156 #define RIO_NORMAL_MAJOR1 156
#define RIO_CALLOUT_MAJOR1 157
#endif #endif
#ifndef PCI_DEVICE_ID_SPECIALIX_SX_XIO_IO8 #ifndef PCI_DEVICE_ID_SPECIALIX_SX_XIO_IO8
...@@ -208,8 +205,7 @@ static int rio_init_drivers(void); ...@@ -208,8 +205,7 @@ static int rio_init_drivers(void);
void my_hd (void *addr, int len); void my_hd (void *addr, int len);
static struct tty_driver rio_driver, rio_callout_driver; static struct tty_driver rio_driver, rio_driver2;
static struct tty_driver rio_driver2, rio_callout_driver2;
static struct tty_struct * rio_table[RIO_NPORTS]; static struct tty_struct * rio_table[RIO_NPORTS];
static struct termios ** rio_termios; static struct termios ** rio_termios;
...@@ -920,28 +916,14 @@ static int rio_init_drivers(void) ...@@ -920,28 +916,14 @@ static int rio_init_drivers(void)
rio_driver2.termios += 256; rio_driver2.termios += 256;
rio_driver2.termios_locked += 256; rio_driver2.termios_locked += 256;
rio_callout_driver = rio_driver;
rio_callout_driver.name = "cusr";
rio_callout_driver.major = RIO_CALLOUT_MAJOR0;
rio_callout_driver.subtype = RIO_TYPE_CALLOUT;
rio_callout_driver2 = rio_callout_driver;
rio_callout_driver2.major = RIO_CALLOUT_MAJOR1;
rio_callout_driver2.termios += 256;
rio_callout_driver2.termios_locked += 256;
rio_dprintk (RIO_DEBUG_INIT, "set_termios = %p\n", gs_set_termios); rio_dprintk (RIO_DEBUG_INIT, "set_termios = %p\n", gs_set_termios);
if ((error = tty_register_driver(&rio_driver))) goto bad1; if ((error = tty_register_driver(&rio_driver))) goto bad1;
if ((error = tty_register_driver(&rio_driver2))) goto bad2; if ((error = tty_register_driver(&rio_driver2))) goto bad2;
if ((error = tty_register_driver(&rio_callout_driver))) goto bad3;
if ((error = tty_register_driver(&rio_callout_driver2))) goto bad4;
func_exit(); func_exit();
return 0; return 0;
/* /*
bad5:tty_unregister_driver (&rio_callout_driver2); */
bad4:tty_unregister_driver (&rio_callout_driver);
bad3:tty_unregister_driver (&rio_driver2); bad3:tty_unregister_driver (&rio_driver2);
bad2:tty_unregister_driver (&rio_driver); bad2:tty_unregister_driver (&rio_driver);
bad1:printk(KERN_ERR "rio: Couldn't register a rio driver, error = %d\n", bad1:printk(KERN_ERR "rio: Couldn't register a rio driver, error = %d\n",
...@@ -1006,7 +988,6 @@ static int rio_init_datastructures (void) ...@@ -1006,7 +988,6 @@ static int rio_init_datastructures (void)
} }
rio_dprintk (RIO_DEBUG_INIT, "initing port %d (%d)\n", i, port->Mapped); rio_dprintk (RIO_DEBUG_INIT, "initing port %d (%d)\n", i, port->Mapped);
port->PortNum = i; port->PortNum = i;
port->gs.callout_termios = tty_std_termios;
port->gs.normal_termios = tty_std_termios; port->gs.normal_termios = tty_std_termios;
port->gs.magic = RIO_MAGIC; port->gs.magic = RIO_MAGIC;
port->gs.close_delay = HZ/2; port->gs.close_delay = HZ/2;
...@@ -1051,8 +1032,6 @@ static int rio_init_datastructures (void) ...@@ -1051,8 +1032,6 @@ static int rio_init_datastructures (void)
static void __exit rio_release_drivers(void) static void __exit rio_release_drivers(void)
{ {
func_enter(); func_enter();
tty_unregister_driver (&rio_callout_driver2);
tty_unregister_driver (&rio_callout_driver);
tty_unregister_driver (&rio_driver2); tty_unregister_driver (&rio_driver2);
tty_unregister_driver (&rio_driver); tty_unregister_driver (&rio_driver);
func_exit(); func_exit();
......
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