diff options
author | Arnd Bergmann <arnd@arndb.de> | 2019-11-28 15:48:10 +0100 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2020-01-03 09:33:15 +0100 |
commit | 9452b1a3ed8792e0e8909512ea1d21aefe6cf53f (patch) | |
tree | 49255f94545d9524a75b5e243d29bb4202b94e4a /drivers/block/paride | |
parent | ab8bc5417d8cf62a5fc515737b391689573e7fb3 (diff) | |
download | lwn-9452b1a3ed8792e0e8909512ea1d21aefe6cf53f.tar.gz lwn-9452b1a3ed8792e0e8909512ea1d21aefe6cf53f.zip |
compat_ioctl: block: handle cdrom compat ioctl in non-cdrom drivers
Various block drivers implement the CDROMMULTISESSION,
CDROM_GET_CAPABILITY, and CDROMEJECT ioctl commands, relying on the
block layer to handle compat_ioctl mode for them.
Move this into the drivers directly as a preparation for simplifying
the block layer later.
When only integer arguments or no arguments are passed, the
same handler can be used for .ioctl and .compat_ioctl, and
when only pointer arguments are passed, the newly added
blkdev_compat_ptr_ioctl can be used.
Reviewed-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/block/paride')
-rw-r--r-- | drivers/block/paride/pd.c | 1 | ||||
-rw-r--r-- | drivers/block/paride/pf.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/drivers/block/paride/pd.c b/drivers/block/paride/pd.c index 6f9ad3fc716f..c0967507d085 100644 --- a/drivers/block/paride/pd.c +++ b/drivers/block/paride/pd.c @@ -874,6 +874,7 @@ static const struct block_device_operations pd_fops = { .open = pd_open, .release = pd_release, .ioctl = pd_ioctl, + .compat_ioctl = pd_ioctl, .getgeo = pd_getgeo, .check_events = pd_check_events, .revalidate_disk= pd_revalidate diff --git a/drivers/block/paride/pf.c b/drivers/block/paride/pf.c index 6b7d4cab3687..bb09f21ce21a 100644 --- a/drivers/block/paride/pf.c +++ b/drivers/block/paride/pf.c @@ -276,6 +276,7 @@ static const struct block_device_operations pf_fops = { .open = pf_open, .release = pf_release, .ioctl = pf_ioctl, + .compat_ioctl = pf_ioctl, .getgeo = pf_getgeo, .check_events = pf_check_events, }; |