diff mbox series

[02/19] amiflop: use bdev_check_media_change

Message ID 20200908145347.2992670-3-hch@lst.de
State Superseded
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 Amiga floppy 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/amiflop.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Hannes Reinecke Sept. 9, 2020, 6:59 a.m. UTC | #1
On 9/8/20 4:53 PM, Christoph Hellwig wrote:
> The Amiga floppy 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/amiflop.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/block/amiflop.c b/drivers/block/amiflop.c
> index 226219da3da6a7..71c2b156455860 100644
> --- a/drivers/block/amiflop.c
> +++ b/drivers/block/amiflop.c
> @@ -1670,7 +1670,7 @@ static int floppy_open(struct block_device *bdev, fmode_t mode)
>  	}
>  
>  	if (mode & (FMODE_READ|FMODE_WRITE)) {
> -		check_disk_change(bdev);
> +		bdev_check_media_change(bdev);
>  		if (mode & FMODE_WRITE) {
>  			int wrprot;
>  
> 
Reviewed-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
diff mbox series

Patch

diff --git a/drivers/block/amiflop.c b/drivers/block/amiflop.c
index 226219da3da6a7..71c2b156455860 100644
--- a/drivers/block/amiflop.c
+++ b/drivers/block/amiflop.c
@@ -1670,7 +1670,7 @@  static int floppy_open(struct block_device *bdev, fmode_t mode)
 	}
 
 	if (mode & (FMODE_READ|FMODE_WRITE)) {
-		check_disk_change(bdev);
+		bdev_check_media_change(bdev);
 		if (mode & FMODE_WRITE) {
 			int wrprot;