diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2024-05-21 22:19:55 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2025-08-13 02:59:29 -0400 |
commit | 4fc8728aa34f54835b72e4db0f3db76a72948b65 (patch) | |
tree | 0fb0b72d032c1d0b047cde1a398f9dd1ac8ac2e1 /drivers/mmc/core/block.c | |
parent | 3eb50369c09efb0f668a7f568a7e6f7cf4194cde (diff) |
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/mmc/core/block.c')
-rw-r--r-- | drivers/mmc/core/block.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c index 9cc47bf94804..d1f295af9713 100644 --- a/drivers/mmc/core/block.c +++ b/drivers/mmc/core/block.c @@ -435,9 +435,9 @@ static void mmc_blk_release(struct gendisk *disk) } static int -mmc_blk_getgeo(struct block_device *bdev, struct hd_geometry *geo) +mmc_blk_getgeo(struct gendisk *disk, struct hd_geometry *geo) { - geo->cylinders = get_capacity(bdev->bd_disk) / (4 * 16); + geo->cylinders = get_capacity(disk) / (4 * 16); geo->heads = 4; geo->sectors = 16; return 0; |