All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHv6 1/3] mmc_test: use API to check card type
@ 2010-09-07 12:35 Andy Shevchenko
  2010-09-07 12:35 ` [PATCHv6 2/3] mmc_test: change simple_strtol() to strict_strtol() Andy Shevchenko
  0 siblings, 1 reply; 11+ messages in thread
From: Andy Shevchenko @ 2010-09-07 12:35 UTC (permalink / raw)
  To: linux-mmc, linux-kernel
  Cc: Hunter Adrian, Chris Ball, Andrew Morton, 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 related	[flat|nested] 11+ messages in thread

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

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-07 12:35 [PATCHv6 1/3] mmc_test: use API to check card type Andy Shevchenko
2010-09-07 12:35 ` [PATCHv6 2/3] mmc_test: change simple_strtol() to strict_strtol() Andy Shevchenko
2010-09-07 12:35   ` [PATCHv6 3/3] mmc_test: collect data and show it via sysfs by demand Andy Shevchenko
2010-09-07 22:27     ` Andrew Morton
2010-09-07 22:58       ` Chris Ball
2010-09-08  9:14         ` Andy Shevchenko
2010-09-09  3:59         ` Greg KH
2010-09-09  5:51           ` Andy Shevchenko
2010-09-08  9:08       ` Andy Shevchenko
2010-09-08 19:50         ` Andrew Morton
2010-09-08 14:44     ` hong zhang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.