summaryrefslogtreecommitdiff
path: root/drivers/block/sunvdc.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2019-11-28 17:48:10 +0300
committerArnd Bergmann <arnd@arndb.de>2020-01-03 11:33:15 +0300
commit9452b1a3ed8792e0e8909512ea1d21aefe6cf53f (patch)
tree49255f94545d9524a75b5e243d29bb4202b94e4a /drivers/block/sunvdc.c
parentab8bc5417d8cf62a5fc515737b391689573e7fb3 (diff)
downloadlinux-9452b1a3ed8792e0e8909512ea1d21aefe6cf53f.tar.xz
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/sunvdc.c')
-rw-r--r--drivers/block/sunvdc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/block/sunvdc.c b/drivers/block/sunvdc.c
index 571612e233fe..39aeebc6837d 100644
--- a/drivers/block/sunvdc.c
+++ b/drivers/block/sunvdc.c
@@ -171,6 +171,7 @@ static const struct block_device_operations vdc_fops = {
.owner = THIS_MODULE,
.getgeo = vdc_getgeo,
.ioctl = vdc_ioctl,
+ .compat_ioctl = blkdev_compat_ptr_ioctl,
};
static void vdc_blk_queue_start(struct vdc_port *port)