diff options
author | imp <imp@FreeBSD.org> | 2008-10-02 07:06:59 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2008-10-02 07:06:59 +0000 |
commit | 97389cb928ffca7d653c1f4ea018250eea64079b (patch) | |
tree | f0628f749027058b9a61d19f899475d975689fc4 /sys/dev/mmc/mmc.c | |
parent | fa4528e966e99bf0a083fd49cdb060b34bb8804a (diff) | |
download | FreeBSD-src-97389cb928ffca7d653c1f4ea018250eea64079b.zip FreeBSD-src-97389cb928ffca7d653c1f4ea018250eea64079b.tar.gz |
Define and use MMC_SECTOR_SIZE.
Make mmc_get_media_size now return an off_t and remove now useless cast.
Diffstat (limited to 'sys/dev/mmc/mmc.c')
-rw-r--r-- | sys/dev/mmc/mmc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/mmc/mmc.c b/sys/dev/mmc/mmc.c index 868ab01..e2357e7 100644 --- a/sys/dev/mmc/mmc.c +++ b/sys/dev/mmc/mmc.c @@ -760,13 +760,13 @@ mmc_read_ivar(device_t bus, device_t child, int which, u_char *result) *(int *)result = ivar->csd.dsr_imp; break; case MMC_IVAR_MEDIA_SIZE: - *(int *)result = ivar->csd.capacity / DEV_BSIZE; + *(off_t *)result = ivar->csd.capacity / MMC_SECTOR_SIZE; break; case MMC_IVAR_RCA: *(int *)result = ivar->rca; break; case MMC_IVAR_SECTOR_SIZE: - *(int *)result = 512; + *(int *)result = MMC_SECTOR_SIZE; break; case MMC_IVAR_TRAN_SPEED: *(int *)result = ivar->csd.tran_speed; |