diff mbox series

[v2,13/17] compat_ioctl: remove /dev/random commands

Message ID 20180912151422.571531-4-arnd@arndb.de
State New
Headers show
Series [v2,01/17] compat_ioctl: add generic_compat_ioctl_ptrarg() | expand

Commit Message

Arnd Bergmann Sept. 12, 2018, 3:13 p.m. UTC
These are all handled by the random driver, so instead of listing
each ioctl, we can just use the same function to deal with both
native and compat commands.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>

---
 drivers/char/random.c | 1 +
 fs/compat_ioctl.c     | 7 -------
 2 files changed, 1 insertion(+), 7 deletions(-)

-- 
2.18.0

Comments

Greg Kroah-Hartman Sept. 12, 2018, 6:13 p.m. UTC | #1
On Wed, Sep 12, 2018 at 05:13:05PM +0200, Arnd Bergmann wrote:
> These are all handled by the random driver, so instead of listing

> each ioctl, we can just use the same function to deal with both

> native and compat commands.

> 

> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

> ---

>  drivers/char/random.c | 1 +

>  fs/compat_ioctl.c     | 7 -------

>  2 files changed, 1 insertion(+), 7 deletions(-)


Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff mbox series

Patch

diff --git a/drivers/char/random.c b/drivers/char/random.c
index bf5f99fc36f1..d1b2cdebc598 100644
--- a/drivers/char/random.c
+++ b/drivers/char/random.c
@@ -2021,6 +2021,7 @@  const struct file_operations random_fops = {
 	.write = random_write,
 	.poll  = random_poll,
 	.unlocked_ioctl = random_ioctl,
+	.compat_ioctl = generic_compat_ioctl_ptrarg,
 	.fasync = random_fasync,
 	.llseek = noop_llseek,
 };
diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c
index ca7f83976a3f..d5b8380fb1b1 100644
--- a/fs/compat_ioctl.c
+++ b/fs/compat_ioctl.c
@@ -764,13 +764,6 @@  COMPATIBLE_IOCTL(WDIOC_SETTIMEOUT)
 COMPATIBLE_IOCTL(WDIOC_GETTIMEOUT)
 COMPATIBLE_IOCTL(WDIOC_SETPRETIMEOUT)
 COMPATIBLE_IOCTL(WDIOC_GETPRETIMEOUT)
-/* Big R */
-COMPATIBLE_IOCTL(RNDGETENTCNT)
-COMPATIBLE_IOCTL(RNDADDTOENTCNT)
-COMPATIBLE_IOCTL(RNDGETPOOL)
-COMPATIBLE_IOCTL(RNDADDENTROPY)
-COMPATIBLE_IOCTL(RNDZAPENTCNT)
-COMPATIBLE_IOCTL(RNDCLEARPOOL)
 /* Bluetooth */
 COMPATIBLE_IOCTL(HCIDEVUP)
 COMPATIBLE_IOCTL(HCIDEVDOWN)