aboutsummaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorPierre Ossman <drzeus@drzeus.cx>2008-06-28 17:51:27 +0200
committerPierre Ossman <drzeus@drzeus.cx>2008-07-15 14:14:44 +0200
commit0121a9829bf28c65e1a05cc881899c10d82b8de2 (patch)
treef21f24d7d964f0a1833cb1e174c256b093455b5d /drivers/mmc
parenteea0f581c4e596e02250df230f8d385827977964 (diff)
mmc_test: only bind to supported cards
We can only perform the tests on MMC and SD cards, so avoid binding to any other type. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/card/mmc_test.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/mmc/card/mmc_test.c b/drivers/mmc/card/mmc_test.c
index 371d922d9ee..8e0bb12d048 100644
--- a/drivers/mmc/card/mmc_test.c
+++ b/drivers/mmc/card/mmc_test.c
@@ -1,7 +1,7 @@
/*
* linux/drivers/mmc/card/mmc_test.c
*
- * Copyright 2007 Pierre Ossman
+ * Copyright 2007-2008 Pierre Ossman
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -858,6 +858,9 @@ static int mmc_test_probe(struct mmc_card *card)
{
int ret;
+ if ((card->type != MMC_TYPE_MMC) && (card->type != MMC_TYPE_SD))
+ return -ENODEV;
+
mutex_init(&mmc_test_lock);
ret = device_create_file(&card->dev, &dev_attr_test);