diff mbox series

[10/19] paride/pcd: use bdev_check_media_change

Message ID 20200908145347.2992670-11-hch@lst.de
State New, archived
Headers show
Series [01/19] block: add a bdev_check_media_change helper | expand

Commit Message

Christoph Hellwig Sept. 8, 2020, 2:53 p.m. UTC
The pcd driver does not have a ->revalidate_disk method, so it can just
use bdev_check_media_change without any additional changes.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
---
 drivers/block/paride/pcd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Hannes Reinecke Sept. 9, 2020, 7:26 a.m. UTC | #1
On 9/8/20 4:53 PM, Christoph Hellwig wrote:
> The pcd driver does not have a ->revalidate_disk method, so it can just
> use bdev_check_media_change without any additional changes.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
> ---
>  drivers/block/paride/pcd.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/block/paride/pcd.c b/drivers/block/paride/pcd.c
> index 5124eca90e8337..70da8b86ce587d 100644
> --- a/drivers/block/paride/pcd.c
> +++ b/drivers/block/paride/pcd.c
> @@ -233,7 +233,7 @@ static int pcd_block_open(struct block_device *bdev, fmode_t mode)
>  	struct pcd_unit *cd = bdev->bd_disk->private_data;
>  	int ret;
>  
> -	check_disk_change(bdev);
> +	bdev_check_media_change(bdev);
>  
>  	mutex_lock(&pcd_mutex);
>  	ret = cdrom_open(&cd->info, bdev, mode);
> 
Reviewed-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
diff mbox series

Patch

diff --git a/drivers/block/paride/pcd.c b/drivers/block/paride/pcd.c
index 5124eca90e8337..70da8b86ce587d 100644
--- a/drivers/block/paride/pcd.c
+++ b/drivers/block/paride/pcd.c
@@ -233,7 +233,7 @@  static int pcd_block_open(struct block_device *bdev, fmode_t mode)
 	struct pcd_unit *cd = bdev->bd_disk->private_data;
 	int ret;
 
-	check_disk_change(bdev);
+	bdev_check_media_change(bdev);
 
 	mutex_lock(&pcd_mutex);
 	ret = cdrom_open(&cd->info, bdev, mode);