Skip to content

Commit

Permalink
mmc_test: only bind to supported cards
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Pierre Ossman committed Jul 15, 2008
1 parent eea0f58 commit 0121a98
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/mmc/card/mmc_test.c
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 0121a98

Please sign in to comment.