diff options
Diffstat (limited to 'sys/dev/mmc/mmc.c')
-rw-r--r-- | sys/dev/mmc/mmc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/mmc/mmc.c b/sys/dev/mmc/mmc.c index 27447ad..e7f6648 100644 --- a/sys/dev/mmc/mmc.c +++ b/sys/dev/mmc/mmc.c @@ -353,7 +353,8 @@ mmc_highest_voltage(uint32_t ocr) { int i; - for (i = 30; i >= 0; i--) + for (i = MMC_OCR_MAX_VOLTAGE_SHIFT; + i >= MMC_OCR_MIN_VOLTAGE_SHIFT; i--) if (ocr & (1 << i)) return (i); return (-1); |