pr_warn("%s: '%s' is using deprecated serial flags (with no effect): %.8x\n",
__func__, get_task_comm(comm, current), flags);
if (!tty->ops->set_serial)
- return -ENOIOCTLCMD;
+ return -ENOTTY;
return tty->ops->set_serial(tty, &v);
}
memset(&v, 0, sizeof(struct serial_struct));
if (!tty->ops->get_serial)
- return -ENOIOCTLCMD;
+ return -ENOTTY;
err = tty->ops->get_serial(tty, &v);
if (!err && copy_to_user(ss, &v, sizeof(struct serial_struct)))
err = -EFAULT;
}
break;
case TIOCSSERIAL:
- retval = tty_tiocsserial(tty, p);
- if (retval != -ENOIOCTLCMD)
- return retval;
- break;
+ return tty_tiocsserial(tty, p);
case TIOCGSERIAL:
- retval = tty_tiocgserial(tty, p);
- if (retval != -ENOIOCTLCMD)
- return retval;
- break;
+ return tty_tiocgserial(tty, p);
case TIOCGPTPEER:
/* Special because the struct file is needed */
return ptm_open_peer(file, tty, (int)arg);
if (port->serial->type->get_serial)
return port->serial->type->get_serial(tty, ss);
- return -ENOIOCTLCMD;
+ return -ENOTTY;
}
static int serial_set_serial(struct tty_struct *tty, struct serial_struct *ss)
if (port->serial->type->set_serial)
return port->serial->type->set_serial(tty, ss);
- return -ENOIOCTLCMD;
+ return -ENOTTY;
}
static int serial_ioctl(struct tty_struct *tty,