linux/net/nfc/nci
Al Viro f0193d3ea7 change semantics of ldisc ->compat_ioctl()
First of all, make it return int.  Returning long when native method
had never allowed that is ridiculous and inconvenient.

More importantly, change the caller; if ldisc ->compat_ioctl() is NULL
or returns -ENOIOCTLCMD, tty_compat_ioctl() will try to feed cmd and
compat_ptr(arg) to ldisc's native ->ioctl().

That simplifies ->compat_ioctl() instances quite a bit - they only
need to deal with ioctls that are neither generic tty ones (those
would get shunted off to tty_ioctl()) nor simple compat pointer ones.

Note that something like TCFLSH won't reach ->compat_ioctl(),
even if ldisc ->ioctl() does handle it - it will be recognized
earlier and passed to tty_ioctl() (and ultimately - ldisc ->ioctl()).

For many ldiscs it means that NULL ->compat_ioctl() does the
right thing.  Those where it won't serve (see e.g. n_r3964.c) are
also easily dealt with - we need to handle the numeric-argument
ioctls (calling the native instance) and, if such would exist,
the ioctls that need layout conversion, etc.

All in-tree ldiscs dealt with.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2018-10-13 00:50:53 -04:00
..
core.c treewide: setup_timer() -> timer_setup() 2017-11-21 15:57:07 -08:00
data.c networking: make skb_push & __skb_push return void pointers 2017-06-16 11:48:40 -04:00
hci.c networking: add and use skb_put_u8() 2017-06-16 11:48:40 -04:00
Kconfig NFC: NCI: move generic spi driver to a module 2015-10-27 04:21:38 +01:00
lib.c nfc: Fix FSF address in file headers 2013-12-11 10:56:21 -05:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ntf.c nfc: nci: Add an additional parameter to identify a connection id 2016-05-04 01:43:21 +02:00
rsp.c nfc: nci: Add an additional parameter to identify a connection id 2016-05-04 01:43:21 +02:00
spi.c networking: add and use skb_put_u8() 2017-06-16 11:48:40 -04:00
uart.c change semantics of ldisc ->compat_ioctl() 2018-10-13 00:50:53 -04:00