summaryrefslogtreecommitdiff
path: root/drivers/nvdimm
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2024-05-21 22:19:55 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2025-08-13 02:59:29 -0400
commit4fc8728aa34f54835b72e4db0f3db76a72948b65 (patch)
tree0fb0b72d032c1d0b047cde1a398f9dd1ac8ac2e1 /drivers/nvdimm
parent3eb50369c09efb0f668a7f568a7e6f7cf4194cde (diff)
downloadlinux-4fc8728aa34f54835b72e4db0f3db76a72948b65.tar.gz
linux-4fc8728aa34f54835b72e4db0f3db76a72948b65.tar.bz2
linux-4fc8728aa34f54835b72e4db0f3db76a72948b65.zip
block: switch ->getgeo() to struct gendisk
Instances are happier that way and it makes more sense anyway - the only part of the result that is related to partition we are given is the start sector, and that has been filled in by the caller. Everything else is a function of the disk. Only one instance (DASD) is ever looking at anything other than bdev->bd_disk and that one is trivial to adjust. Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Acked-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/nvdimm')
-rw-r--r--drivers/nvdimm/btt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/nvdimm/btt.c b/drivers/nvdimm/btt.c
index 2a1aa32e6693..a933db961ed7 100644
--- a/drivers/nvdimm/btt.c
+++ b/drivers/nvdimm/btt.c
@@ -1478,12 +1478,12 @@ static void btt_submit_bio(struct bio *bio)
bio_endio(bio);
}
-static int btt_getgeo(struct block_device *bd, struct hd_geometry *geo)
+static int btt_getgeo(struct gendisk *disk, struct hd_geometry *geo)
{
/* some standard values */
geo->heads = 1 << 6;
geo->sectors = 1 << 5;
- geo->cylinders = get_capacity(bd->bd_disk) >> 11;
+ geo->cylinders = get_capacity(disk) >> 11;
return 0;
}