Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

cdrom: remove the unused driver specific disc change ioctl

This was only used by the ide-cd driver, which went away in
commit b7fb14d3ac63 ("ide: remove the legacy ide driver")
so we might as well take advantage of that and get rid of
this hook as well.

Cc: Christoph Hellwig <hch@lst.de>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Phillip Potter <phil@philpotter.co.uk>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Link: https://lore.kernel.org/all/20220427132436.12795-2-paul.gortmaker@windriver.com
Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
Link: https://lore.kernel.org/r/20220515205833.944139-3-phil@philpotter.co.uk
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Paul Gortmaker and committed by
Jens Axboe
03fea699 eeef7565

-19
-10
Documentation/cdrom/cdrom-standard.rst
··· 218 218 int (*tray_move)(struct cdrom_device_info *, int); 219 219 int (*lock_door)(struct cdrom_device_info *, int); 220 220 int (*select_speed)(struct cdrom_device_info *, int); 221 - int (*select_disc)(struct cdrom_device_info *, int); 222 221 int (*get_last_session) (struct cdrom_device_info *, 223 222 struct cdrom_multisession *); 224 223 int (*get_mcn)(struct cdrom_device_info *, struct cdrom_mcn *); ··· 417 418 this `auto-selection` capability, the decision should be made on the 418 419 current disc loaded and the return value should be positive. A negative 419 420 return value indicates an error. 420 - 421 - :: 422 - 423 - int select_disc(struct cdrom_device_info *cdi, int number) 424 - 425 - If the drive can store multiple discs (a juke-box) this function 426 - will perform disc selection. It should return the number of the 427 - selected disc on success, a negative value on error. Currently, only 428 - the ide-cd driver supports this functionality. 429 421 430 422 :: 431 423
-8
drivers/cdrom/cdrom.c
··· 2452 2452 return -EINVAL; 2453 2453 } 2454 2454 2455 - /* 2456 - * ->select_disc is a hook to allow a driver-specific way of 2457 - * seleting disc. However, since there is no equivalent hook for 2458 - * cdrom_slot_status this may not actually be useful... 2459 - */ 2460 - if (cdi->ops->select_disc) 2461 - return cdi->ops->select_disc(cdi, arg); 2462 - 2463 2455 cd_dbg(CD_CHANGER, "Using generic cdrom_select_disc()\n"); 2464 2456 return cdrom_select_disc(cdi, arg); 2465 2457 }
-1
include/linux/cdrom.h
··· 77 77 int (*tray_move) (struct cdrom_device_info *, int); 78 78 int (*lock_door) (struct cdrom_device_info *, int); 79 79 int (*select_speed) (struct cdrom_device_info *, int); 80 - int (*select_disc) (struct cdrom_device_info *, int); 81 80 int (*get_last_session) (struct cdrom_device_info *, 82 81 struct cdrom_multisession *); 83 82 int (*get_mcn) (struct cdrom_device_info *,