
Dear Thomas Chou,
In message 1272848085-10698-3-git-send-email-thomas@wytron.com.tw you wrote:
We need to query mmc devices in mmc_spi subcommand and don't want the "Device not found" message.
Your subject line is way too long.
Signed-off-by: Thomas Chou thomas@wytron.com.tw
drivers/mmc/mmc.c | 14 +++++++++++--- include/mmc.h | 1 + 2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index cf4ea16..55ab13e 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -60,7 +60,7 @@ int mmc_set_blocklen(struct mmc *mmc, int len) return mmc_send_cmd(mmc, &cmd, NULL); }
-struct mmc *find_mmc_device(int dev_num) +struct mmc *find_mmc_device_quiet(int dev_num) { struct mmc *m; struct list_head *entry; @@ -72,11 +72,19 @@ struct mmc *find_mmc_device(int dev_num) return m; }
- printf("MMC Device %d not found\n", dev_num);
- return NULL;
}
+struct mmc *find_mmc_device(int dev_num) +{
- struct mmc *m = find_mmc_device_quiet(dev_num);
- if (!m)
printf("MMC Device %d not found\n", dev_num);
- return m;
+}
Instead of creating a new function please consider using an argument instead?
Best regards,
Wolfgang Denk