/* Locking: see tty_set_ldisc, this function is just a helper  */
static int tiocsetd(struct tty_struct *tty, int __user *p)
/* Locking: see tty_set_ldisc, this function is just a helper  */
static int tiocsetd(struct tty_struct *tty, int __user *p)
{
	int ldisc;
	int ret;
	if (get_user(ldisc, p))
		return -EFAULT;
	ret = tty_set_ldisc(tty, ldisc);
	return ret;
}