Commit 0deee377 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] callout removal: pc300

callout removal: pc300
parent 80b6a11a
......@@ -113,7 +113,7 @@ typedef struct _st_cpc_tty_area {
static struct tty_struct *cpc_tty_serial_table[CPC_TTY_NPORTS];
static struct termios *cpc_tty_serial_termios[CPC_TTY_NPORTS];
static struct termios *cpc_tty_serial_termios_locked[CPC_TTY_NPORTS];
static struct tty_driver serial_drv, callout_drv;
static struct tty_driver serial_drv;
/* local variables */
st_cpc_tty_area cpc_tty_area[CPC_TTY_NPORTS];
......@@ -244,15 +244,6 @@ void cpc_tty_init(pc300dev_t *pc300dev)
serial_drv.flush_buffer = cpc_tty_flush_buffer;
serial_drv.hangup = cpc_tty_hangup;
/* the callout device is just like normal device except for major */
/* number and the subtype code */
callout_drv = serial_drv;
callout_drv.name = "cucp";
callout_drv.major = CPC_TTY_MAJOR + 1;
callout_drv.subtype = SERIAL_TYPE_CALLOUT;
callout_drv.read_proc = 0;
callout_drv.proc_entry = 0;
/* register the TTY driver */
if (tty_register_driver(&serial_drv)) {
printk("%s-tty: Failed to register serial driver! ",
......@@ -260,11 +251,6 @@ void cpc_tty_init(pc300dev_t *pc300dev)
return;
}
if (tty_register_driver(&callout_drv)) {
CPC_TTY_DBG("%s-tty: Failed to register callout driver! ",
((struct net_device*)(pc300dev->hdlc))->name);
return;
}
memset((void *)cpc_tty_area, 0,
sizeof(st_cpc_tty_area) * CPC_TTY_NPORTS);
}
......@@ -436,10 +422,6 @@ static void cpc_tty_close(struct tty_struct *tty, struct file *flip)
CPC_TTY_DBG("%s: ERROR ->unregister the tty driver error=%d\n",
cpc_tty->name,res);
}
if ((res=tty_unregister_driver(&callout_drv))) {
CPC_TTY_DBG("%s: ERROR ->unregister the tty driver error=%d\n",
cpc_tty->name,res);
}
}
return;
}
......@@ -688,10 +670,6 @@ static void cpc_tty_hangup(struct tty_struct *tty)
CPC_TTY_DBG("%s: ERROR ->unregister the tty driver error=%d\n",
cpc_tty->name,res);
}
if ((res=tty_unregister_driver(&callout_drv))) {
CPC_TTY_DBG("%s: ERROR ->unregister the tty driver error=%d\n",
cpc_tty->name,res);
}
}
cpc_tty_dtr_off(cpc_tty->pc300dev);
}
......@@ -1092,10 +1070,6 @@ void cpc_tty_unregister_service(pc300dev_t *pc300dev)
CPC_TTY_DBG("%s: ERROR ->unregister the tty driver error=%d\n",
cpc_tty->name,res);
}
if ((res=tty_unregister_driver(&callout_drv))) {
CPC_TTY_DBG("%s: ERROR ->unregister the tty driver error=%d\n",
cpc_tty->name,res);
}
}
}
CPC_TTY_LOCK(pc300dev->chan->card,flags);
......@@ -1130,7 +1104,6 @@ void cpc_tty_reset_var(void)
CPC_TTY_DBG("hdlcX-tty: reset variables\n");
/* reset the tty_driver structure - serial_drv */
memset(&serial_drv, 0, sizeof(struct tty_driver));
memset(&callout_drv, 0, sizeof(struct tty_driver));
for (i=0; i < CPC_TTY_NPORTS; i++){
memset(&cpc_tty_area[i],0, sizeof(st_cpc_tty_area));
}
......
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