]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix read_ivar implementation for MMC and SD.
authorjchandra <jchandra@FreeBSD.org>
Mon, 30 May 2011 06:23:51 +0000 (06:23 +0000)
committerjchandra <jchandra@FreeBSD.org>
Mon, 30 May 2011 06:23:51 +0000 (06:23 +0000)
commit861907aeb2a72e77dcc62ead2385783cfd29f170
treeb59618edfa1e2aca4e43a08e1267750f30b498ad
parent430ebf5dcf509df6b2222dddb06d283642ad2f28
Fix read_ivar implementation for MMC and SD.

1. Both mmc_read_ivar() and sdhci_read_ivar() use the expression
'*(int *)result = val' to assign to result which is uintptr_t *.
This does not work on big-endian 64 bit systems.

2. The media_size ivar is declared as 'off_t' which does not fit
into uintptr_t in 32bit systems, change this to long.

Submitted by: kanthms at netlogicmicro com (initial version)
sys/dev/mmc/mmc.c
sys/dev/mmc/mmcvar.h
sys/dev/sdhci/sdhci.c