mmc: core: Don't print reset warning if reset is not supported
authorAdrian Hunter <adrian.hunter@intel.com>
Thu, 7 May 2015 10:10:25 +0000 (13:10 +0300)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 1 Jun 2015 07:06:59 +0000 (09:06 +0200)
Check the error code for EOPNOTSUPP and do not print
reset warning in that case.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/core/core.c

index c93062bc4f2d23ee3f8ac883e7e7edb0d94bf736..8c61ddd7748ce400301b1746fc5a191ef5fdcdd4 100644 (file)
@@ -2371,7 +2371,8 @@ int mmc_hw_reset(struct mmc_host *host)
        ret = host->bus_ops->reset(host);
        mmc_bus_put(host);
 
-       pr_warn("%s: tried to reset card\n", mmc_hostname(host));
+       if (ret != -EOPNOTSUPP)
+               pr_warn("%s: tried to reset card\n", mmc_hostname(host));
 
        return ret;
 }