提交 d003e982 编写于 作者: R Richard Weinberger

um: remove line_ioctl()

line_ioctl() has no real function.
Signed-off-by: NRichard Weinberger <richard@nod.at>
上级 6fc58845
......@@ -221,92 +221,6 @@ void line_set_termios(struct tty_struct *tty, struct ktermios * old)
/* nothing */
}
static const struct {
int cmd;
char *level;
char *name;
} tty_ioctls[] = {
/* don't print these, they flood the log ... */
{ TCGETS, NULL, "TCGETS" },
{ TCSETS, NULL, "TCSETS" },
{ TCSETSW, NULL, "TCSETSW" },
{ TCFLSH, NULL, "TCFLSH" },
{ TCSBRK, NULL, "TCSBRK" },
/* general tty stuff */
{ TCSETSF, KERN_DEBUG, "TCSETSF" },
{ TCGETA, KERN_DEBUG, "TCGETA" },
{ TIOCMGET, KERN_DEBUG, "TIOCMGET" },
{ TCSBRKP, KERN_DEBUG, "TCSBRKP" },
{ TIOCMSET, KERN_DEBUG, "TIOCMSET" },
/* linux-specific ones */
{ TIOCLINUX, KERN_INFO, "TIOCLINUX" },
{ KDGKBMODE, KERN_INFO, "KDGKBMODE" },
{ KDGKBTYPE, KERN_INFO, "KDGKBTYPE" },
{ KDSIGACCEPT, KERN_INFO, "KDSIGACCEPT" },
};
int line_ioctl(struct tty_struct *tty, unsigned int cmd,
unsigned long arg)
{
int ret;
int i;
ret = 0;
switch(cmd) {
#ifdef TIOCGETP
case TIOCGETP:
case TIOCSETP:
case TIOCSETN:
#endif
#ifdef TIOCGETC
case TIOCGETC:
case TIOCSETC:
#endif
#ifdef TIOCGLTC
case TIOCGLTC:
case TIOCSLTC:
#endif
/* Note: these are out of date as we now have TCGETS2 etc but this
whole lot should probably go away */
case TCGETS:
case TCSETSF:
case TCSETSW:
case TCSETS:
case TCGETA:
case TCSETAF:
case TCSETAW:
case TCSETA:
case TCXONC:
case TCFLSH:
case TIOCOUTQ:
case TIOCINQ:
case TIOCGLCKTRMIOS:
case TIOCSLCKTRMIOS:
case TIOCPKT:
case TIOCGSOFTCAR:
case TIOCSSOFTCAR:
return -ENOIOCTLCMD;
#if 0
case TCwhatever:
/* do something */
break;
#endif
default:
for (i = 0; i < ARRAY_SIZE(tty_ioctls); i++)
if (cmd == tty_ioctls[i].cmd)
break;
if (i == ARRAY_SIZE(tty_ioctls)) {
printk(KERN_ERR "%s: %s: unknown ioctl: 0x%x\n",
__func__, tty->name, cmd);
}
ret = -ENOIOCTLCMD;
break;
}
return ret;
}
void line_throttle(struct tty_struct *tty)
{
struct line *line = tty->driver_data;
......
......@@ -69,8 +69,6 @@ extern int line_chars_in_buffer(struct tty_struct *tty);
extern void line_flush_buffer(struct tty_struct *tty);
extern void line_flush_chars(struct tty_struct *tty);
extern int line_write_room(struct tty_struct *tty);
extern int line_ioctl(struct tty_struct *tty, unsigned int cmd,
unsigned long arg);
extern void line_throttle(struct tty_struct *tty);
extern void line_unthrottle(struct tty_struct *tty);
......
......@@ -129,7 +129,6 @@ static const struct tty_operations ssl_ops = {
.flush_buffer = line_flush_buffer,
.flush_chars = line_flush_chars,
.set_termios = line_set_termios,
.ioctl = line_ioctl,
.throttle = line_throttle,
.unthrottle = line_unthrottle,
#if 0
......
......@@ -112,7 +112,6 @@ static const struct tty_operations console_ops = {
.flush_buffer = line_flush_buffer,
.flush_chars = line_flush_chars,
.set_termios = line_set_termios,
.ioctl = line_ioctl,
.throttle = line_throttle,
.unthrottle = line_unthrottle,
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册