diff options
author | imp <imp@FreeBSD.org> | 2008-09-29 18:17:23 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2008-09-29 18:17:23 +0000 |
commit | c6c9e7b65c9c790aa2631b2a38a6277830ff32ea (patch) | |
tree | ce54f959e5179684568bc2519ca15a37f6e45937 /sys/dev | |
parent | 8a3e9c9a9da63419ccead8baff4e381e17f48bb9 (diff) | |
download | FreeBSD-src-c6c9e7b65c9c790aa2631b2a38a6277830ff32ea.zip FreeBSD-src-c6c9e7b65c9c790aa2631b2a38a6277830ff32ea.tar.gz |
Minor style fixes from mav@ (with similar problems fixed where I noticed
them):
#define<tab>
zero memory when we allocate it
Put device name in error message.
Submitted by: mav@
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/mmc/mmc.c | 5 | ||||
-rw-r--r-- | sys/dev/mmc/mmcreg.h | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/sys/dev/mmc/mmc.c b/sys/dev/mmc/mmc.c index 831a943..c918257 100644 --- a/sys/dev/mmc/mmc.c +++ b/sys/dev/mmc/mmc.c @@ -618,14 +618,15 @@ mmc_discover_cards(struct mmc_softc *sc) device_t child; while (1) { - ivar = malloc(sizeof(struct mmc_ivars), M_DEVBUF, M_WAITOK); + ivar = malloc(sizeof(struct mmc_ivars), M_DEVBUF, + M_WAITOK | M_ZERO); if (!ivar) return; err = mmc_all_send_cid(sc, ivar->raw_cid); if (err == MMC_ERR_TIMEOUT) break; if (err != MMC_ERR_NONE) { - printf("Error reading CID %d\n", err); + device_printf(sc->dev, "Error reading CID %d\n", err); break; } if (mmcbr_get_mode(sc->dev) == mode_sd) { diff --git a/sys/dev/mmc/mmcreg.h b/sys/dev/mmc/mmcreg.h index fddaf97..6bd45fc 100644 --- a/sys/dev/mmc/mmcreg.h +++ b/sys/dev/mmc/mmcreg.h @@ -96,7 +96,7 @@ struct mmc_command { #define MMC_ERR_FIFO 3 #define MMC_ERR_FAILED 4 #define MMC_ERR_INVALID 5 -#define MMC_ERR_NO_MEMORY 6 +#define MMC_ERR_NO_MEMORY 6 struct mmc_data *data; /* Data segment with cmd */ struct mmc_request *mrq; /* backpointer to request */ }; @@ -292,7 +292,7 @@ struct mmc_request { * * The MMC_OCR_CCS appears to be valid for only SD cards. */ -#define MMC_OCR_VOLTAGE 0x3fffffffU /* Vdd Voltage mask */ +#define MMC_OCR_VOLTAGE 0x3fffffffU /* Vdd Voltage mask */ #define MMC_OCR_LOW_VOLTAGE (1u << 7) /* Low Voltage Range -- tbd */ #define MMC_OCR_200_210 (1U << 8) /* Vdd voltage 2.00 ~ 2.10 */ #define MMC_OCR_210_220 (1U << 9) /* Vdd voltage 2.10 ~ 2.20 */ |