From 9452b1a3ed8792e0e8909512ea1d21aefe6cf53f Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Thu, 28 Nov 2019 15:48:10 +0100 Subject: 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 Signed-off-by: Arnd Bergmann --- drivers/block/sunvdc.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/block/sunvdc.c') 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) -- cgit v1.2.3