mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
Merge branch 'work.tty-ioctl' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull tty ioctl updates from Al Viro:
"This is the compat_ioctl work related to tty ioctls.
Quite a bit of dead code taken out, all tty-related stuff gone from
fs/compat_ioctl.c. A bunch of compat bugs fixed - some still remain,
but all more or less generic tty-related ioctls should be covered
(remaining issues are in things like driver-private ioctls in a pcmcia
serial card driver not getting properly handled in 32bit processes on
64bit host, etc)"
* 'work.tty-ioctl' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (53 commits)
kill TIOCSERGSTRUCT
change semantics of ldisc ->compat_ioctl()
kill TIOCSER[SG]WILD
synclink_gt(): fix compat_ioctl()
pty: fix compat ioctls
compat_ioctl - kill keyboard ioctl handling
gigaset: add ->compat_ioctl()
vt_compat_ioctl(): clean up, use compat_ptr() properly
gigaset: don't try to printk userland buffer contents
dgnc: don't bother with (empty) stub for TCXONC
dgnc: leave TIOC[GS]SOFTCAR to ldisc
remove fallback to drivers for TIOCGICOUNT
dgnc: break-related ioctls won't reach ->ioctl()
kill the rest of tty COMPAT_IOCTL() entries
dgnc: TIOCM... won't reach ->ioctl()
isdn_tty: TCSBRK{,P} won't reach ->ioctl()
kill capinc_tty_ioctl()
take compat TIOC[SG]SERIAL treatment into tty_compat_ioctl()
synclink: reduce pointless checks in ->ioctl()
complete ->[sg]et_serial() switchover
...
This commit is contained in:
commit
44adbac8f7
56 changed files with 779 additions and 1522 deletions
|
|
@ -1155,12 +1155,6 @@ static int capinc_tty_chars_in_buffer(struct tty_struct *tty)
|
|||
return mp->outbytes;
|
||||
}
|
||||
|
||||
static int capinc_tty_ioctl(struct tty_struct *tty,
|
||||
unsigned int cmd, unsigned long arg)
|
||||
{
|
||||
return -ENOIOCTLCMD;
|
||||
}
|
||||
|
||||
static void capinc_tty_set_termios(struct tty_struct *tty, struct ktermios *old)
|
||||
{
|
||||
pr_debug("capinc_tty_set_termios\n");
|
||||
|
|
@ -1236,7 +1230,6 @@ static const struct tty_operations capinc_ops = {
|
|||
.flush_chars = capinc_tty_flush_chars,
|
||||
.write_room = capinc_tty_write_room,
|
||||
.chars_in_buffer = capinc_tty_chars_in_buffer,
|
||||
.ioctl = capinc_tty_ioctl,
|
||||
.set_termios = capinc_tty_set_termios,
|
||||
.throttle = capinc_tty_throttle,
|
||||
.unthrottle = capinc_tty_unthrottle,
|
||||
|
|
|
|||
|
|
@ -206,7 +206,7 @@ static int if_ioctl(struct tty_struct *tty,
|
|||
? -EFAULT : 0;
|
||||
if (retval >= 0) {
|
||||
gigaset_dbg_buffer(DEBUG_IF, "GIGASET_BRKCHARS",
|
||||
6, (const unsigned char *) arg);
|
||||
6, buf);
|
||||
retval = cs->ops->brkchars(cs, buf);
|
||||
}
|
||||
break;
|
||||
|
|
@ -233,6 +233,14 @@ static int if_ioctl(struct tty_struct *tty,
|
|||
return retval;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_COMPAT
|
||||
static long if_compat_ioctl(struct tty_struct *tty,
|
||||
unsigned int cmd, unsigned long arg)
|
||||
{
|
||||
return if_ioctl(tty, cmd, (unsigned long)compat_ptr(arg));
|
||||
}
|
||||
#endif
|
||||
|
||||
static int if_tiocmget(struct tty_struct *tty)
|
||||
{
|
||||
struct cardstate *cs = tty->driver_data;
|
||||
|
|
@ -472,6 +480,9 @@ static const struct tty_operations if_ops = {
|
|||
.open = if_open,
|
||||
.close = if_close,
|
||||
.ioctl = if_ioctl,
|
||||
#ifdef CONFIG_COMPAT
|
||||
.compat_ioctl = if_compat_ioctl,
|
||||
#endif
|
||||
.write = if_write,
|
||||
.write_room = if_write_room,
|
||||
.chars_in_buffer = if_chars_in_buffer,
|
||||
|
|
|
|||
|
|
@ -1412,31 +1412,12 @@ static int
|
|||
isdn_tty_ioctl(struct tty_struct *tty, uint cmd, ulong arg)
|
||||
{
|
||||
modem_info *info = (modem_info *) tty->driver_data;
|
||||
int retval;
|
||||
|
||||
if (isdn_tty_paranoia_check(info, tty->name, "isdn_tty_ioctl"))
|
||||
return -ENODEV;
|
||||
if (tty_io_error(tty))
|
||||
return -EIO;
|
||||
switch (cmd) {
|
||||
case TCSBRK: /* SVID version: non-zero arg --> no break */
|
||||
#ifdef ISDN_DEBUG_MODEM_IOCTL
|
||||
printk(KERN_DEBUG "ttyI%d ioctl TCSBRK\n", info->line);
|
||||
#endif
|
||||
retval = tty_check_change(tty);
|
||||
if (retval)
|
||||
return retval;
|
||||
tty_wait_until_sent(tty, 0);
|
||||
return 0;
|
||||
case TCSBRKP: /* support for POSIX tcsendbreak() */
|
||||
#ifdef ISDN_DEBUG_MODEM_IOCTL
|
||||
printk(KERN_DEBUG "ttyI%d ioctl TCSBRKP\n", info->line);
|
||||
#endif
|
||||
retval = tty_check_change(tty);
|
||||
if (retval)
|
||||
return retval;
|
||||
tty_wait_until_sent(tty, 0);
|
||||
return 0;
|
||||
case TIOCSERGETLSR: /* Get line status register */
|
||||
#ifdef ISDN_DEBUG_MODEM_IOCTL
|
||||
printk(KERN_DEBUG "ttyI%d ioctl TIOCSERGETLSR\n", info->line);
|
||||
|
|
|
|||
Loading…
Reference in a new issue