9
0
Fork 0

Missing breaks in switch

git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@2256 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
patacongo 2009-11-14 18:24:47 +00:00
parent 90f4a2a679
commit 018374c9a7
1 changed files with 13 additions and 6 deletions

View File

@ -664,6 +664,7 @@ static int mmcsd_ioctl(FAR struct inode *inode, int cmd, unsigned long arg)
static inline int mmcsd_mmcinitialize(struct mmcsd_state_s *priv)
{
#ifdef CONFIG_MMCSD_MMCSUPPORT
uint32 cid[4];
uint32 csd[4];
int ret;
@ -745,7 +746,7 @@ static inline int mmcsd_mmcinitialize(struct mmcsd_state_s *priv)
SDIO_CLOCK(priv->dev, CLOCK_MMC_TRANSFER);
up_udelay( MMCSD_CLK_DELAY);
#endif
return OK;
}
@ -862,7 +863,9 @@ static inline int mmcsd_cardidentify(struct mmcsd_state_s *priv)
* skip the SD-specific commands.
*/
#ifdef CONFIG_MMCSD_MMCSUPPORT
if (priv->type != MMCSD_CARDTYPE_MMC)
#endif
{
/* Send CMD55 */
@ -938,7 +941,7 @@ static inline int mmcsd_cardidentify(struct mmcsd_state_s *priv)
* MMC card. We can send the CMD1 to find out for sure. CMD1 is supported
* by MMC cards, but not by SD cards.
*/
#ifdef CONFIG_MMCSD_MMCSUPPORT
if (priv->type == MMCSD_CARDTYPE_UNKNOWN || priv->type == MMCSD_CARDTYPE_MMC)
{
/* Send the MMC CMD1 to specify the operating voltage. CMD1 causes
@ -985,7 +988,7 @@ static inline int mmcsd_cardidentify(struct mmcsd_state_s *priv)
}
}
}
#endif
/* Check the elapsed time. We won't keep trying this forever! */
elapsed = g_system_timer - start;
@ -1065,18 +1068,22 @@ static int mmcsd_probe(struct mmcsd_state_s *priv)
switch (priv->type)
{
case MMCSD_CARDTYPE_MMC: /* MMC card */
ret = mmcsd_mmcinitialize(priv);
case MMCSD_CARDTYPE_SDV1: /* Bit 1: SD version 1.x */
case MMCSD_CARDTYPE_SDV2: /* SD version 2.x with byte addressing */
case MMCSD_CARDTYPE_SDV2|MMCSD_CARDTYPE_BLOCK: /* SD version 2.x with block addressing */
ret = mmcsd_sdinitialize(priv);
break;
case MMCSD_CARDTYPE_MMC: /* MMC card */
#ifdef CONFIG_MMCSD_MMCSUPPORT
ret = mmcsd_mmcinitialize(priv);
break;
#endif
case MMCSD_CARDTYPE_UNKNOWN: /* Unknown card type */
default:
fdbg("ERROR: Internal confusion: %d\n", priv->type);
ret = -EPERM;
break;
};
/* Was the card configured successfully? */