summaryrefslogtreecommitdiff
path: root/drivers/ide
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-09-08 16:53:41 +0200
committerJens Axboe <axboe@kernel.dk>2020-09-10 09:32:31 -0600
commita367e440e15c19f5694186dda9dd8a0f9eeb0c9f (patch)
tree51f578145443df873bdecf9e00f62331dede147d /drivers/ide
parenta22be69d5354c63d379cf7ecdbf3eef257f14512 (diff)
ide-cd: remove idecd_revalidate_disk
Just merge the trivial function into its only caller. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/ide-cd.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index 6a38cbc80aea..25d2d88e82ad 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -56,7 +56,6 @@ static DEFINE_MUTEX(ide_cd_mutex);
static DEFINE_MUTEX(idecd_ref_mutex);
static void ide_cd_release(struct device *);
-static int idecd_revalidate_disk(struct gendisk *disk);
static struct cdrom_info *ide_cd_get(struct gendisk *disk)
{
@@ -1612,8 +1611,11 @@ static int idecd_open(struct block_device *bdev, fmode_t mode)
struct cdrom_info *info;
int rc = -ENXIO;
- if (bdev_check_media_change(bdev))
- idecd_revalidate_disk(bdev->bd_disk);
+ if (bdev_check_media_change(bdev)) {
+ info = ide_drv_g(bdev->bd_disk, cdrom_info);
+
+ ide_cd_read_toc(info->drive);
+ }
mutex_lock(&ide_cd_mutex);
info = ide_cd_get(bdev->bd_disk);
@@ -1755,15 +1757,6 @@ static unsigned int idecd_check_events(struct gendisk *disk,
return cdrom_check_events(&info->devinfo, clearing);
}
-static int idecd_revalidate_disk(struct gendisk *disk)
-{
- struct cdrom_info *info = ide_drv_g(disk, cdrom_info);
-
- ide_cd_read_toc(info->drive);
-
- return 0;
-}
-
static const struct block_device_operations idecd_ops = {
.owner = THIS_MODULE,
.open = idecd_open,