]> www.infradead.org Git - users/hch/block.git/commitdiff
paride/pd: remove ->revalidate_disk
authorChristoph Hellwig <hch@lst.de>
Sat, 29 Aug 2020 17:01:50 +0000 (19:01 +0200)
committerChristoph Hellwig <hch@lst.de>
Wed, 3 Mar 2021 17:04:12 +0000 (18:04 +0100)
->revalidate_disk is only called during add_disk for pd, but at that
point the driver has already set the capacity to the one returned from
Identify a little earlier, so this additional update is entirely
superflous.

Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/block/paride/pd.c

index 897acda20ac85a2b3c8ccbc0dbf4d95294d892fd..828a45ffe0e7d8a41f61d7e722c5786c6fd1e8ef 100644 (file)
@@ -859,16 +859,6 @@ static unsigned int pd_check_events(struct gendisk *p, unsigned int clearing)
        return r ? DISK_EVENT_MEDIA_CHANGE : 0;
 }
 
-static int pd_revalidate(struct gendisk *p)
-{
-       struct pd_unit *disk = p->private_data;
-       if (pd_special_command(disk, pd_identify) == 0)
-               set_capacity(p, disk->capacity);
-       else
-               set_capacity(p, 0);
-       return 0;
-}
-
 static const struct block_device_operations pd_fops = {
        .owner          = THIS_MODULE,
        .open           = pd_open,
@@ -877,7 +867,6 @@ static const struct block_device_operations pd_fops = {
        .compat_ioctl   = pd_ioctl,
        .getgeo         = pd_getgeo,
        .check_events   = pd_check_events,
-       .revalidate_disk= pd_revalidate
 };
 
 /* probing */