mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCHv5 1/3] mmc_test: use API to check card type
@ 2010-09-06  8:12 Andy Shevchenko
  2010-09-06  8:12 ` [PATCHv5 2/3] mmc_test: change simple_strtol() to strict_strtol() Andy Shevchenko
  0 siblings, 1 reply; 3+ messages in thread
From: Andy Shevchenko @ 2010-09-06  8:12 UTC (permalink / raw)
  To: linux-mmc, linux-kernel; +Cc: Hunter Adrian, Chris Ball, Andy Shevchenko

There are methods to check card type. Let's use them instead of direct checking
type bits.

Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>
---
 drivers/mmc/card/mmc_test.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mmc/card/mmc_test.c b/drivers/mmc/card/mmc_test.c
index b992725..cd8edf4 100644
--- a/drivers/mmc/card/mmc_test.c
+++ b/drivers/mmc/card/mmc_test.c
@@ -1977,7 +1977,7 @@ static int mmc_test_probe(struct mmc_card *card)
 {
 	int ret;
 
-	if ((card->type != MMC_TYPE_MMC) && (card->type != MMC_TYPE_SD))
+	if (!mmc_card_mmc(card) && !mmc_card_sd(card))
 		return -ENODEV;
 
 	ret = device_create_file(&card->dev, &dev_attr_test);
-- 
1.6.3.3


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-09-06  8:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-06  8:12 [PATCHv5 1/3] mmc_test: use API to check card type Andy Shevchenko
2010-09-06  8:12 ` [PATCHv5 2/3] mmc_test: change simple_strtol() to strict_strtol() Andy Shevchenko
2010-09-06  8:12   ` [PATCHv5 3/3] mmc_test: collect data and show it via sysfs by demand Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®