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@
This commit is contained in:
parent
8a3e9c9a9d
commit
c6c9e7b65c
@ -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) {
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user