Re: [PATCH] mmc: mmc_add_card(): fix missing break in switch statement

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



To be more specific, I would think that the code change required in include/linux/mmc/card.h is:

#define mmc_card_mmc(c)         ((c)->type == MMC_TYPE_MMC)
- #define mmc_card_sd(c)          ((c)->type == MMC_TYPE_SD)
- #define mmc_card_sdio(c)        ((c)->type == MMC_TYPE_SDIO)

+ #define mmc_card_sd(c) ((c)->type == MMC_TYPE_SD || (c)->type == MMC_TYPE_SD_COMBO) + #define mmc_card_sdio(c) ((c)->type == MMC_TYPE_SDIO || (c)->type == MMC_TYPE_SD_COMBO)

Thanks,
Prashanth

On Tuesday 03 May 2011 04:50 PM, Prashanth Bhat wrote:
Michal,

I hope you remember the email exchange we had about a month ago. I think I see an issue with SD-COMBO support.

In include/linux/mmc/card.h, there are macros:

#define mmc_card_mmc(c)         ((c)->type == MMC_TYPE_MMC)
#define mmc_card_sd(c)          ((c)->type == MMC_TYPE_SD)
#define mmc_card_sdio(c)        ((c)->type == MMC_TYPE_SDIO)

In particular, the mmc_card_sd(c) is invoked in many places, to determine whether the card is SD, and certain action is taken. Shouldn't the same be done for Combo cards, because these also have SD on them?

For instance, in drivers/mmc/core/core.c, routine mmc_set_data_timeout(), there is a call to mmc_card_sd(c).
Also, in drivers/mmc/card/block.c, routine mmc_blk_alloc().

I would appreciate your opinion on this.

Thanks,
Prashanth


On Saturday 09 April 2011 11:46 AM, MichaÅ MirosÅaw wrote:
Fixes a cosmetic bug that affects printk() for SD-combo cards.

Noticed-by: Prashanth Bhat<prashanth.bhat@xxxxxxxxxxx>
Signed-off-by: MichaÅ MirosÅaw<mirq-linux@xxxxxxxxxxxx>
---
  drivers/mmc/core/bus.c |    1 +
  1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c
index 63667a8..d6d62fd 100644
--- a/drivers/mmc/core/bus.c
+++ b/drivers/mmc/core/bus.c
@@ -284,6 +284,7 @@ int mmc_add_card(struct mmc_card *card)
          type = "SD-combo";
          if (mmc_card_blockaddr(card))
              type = "SDHC-combo";
+        break;
      default:
          type = "?";
          break;


--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux