summaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorUlf Hansson <ulf.hansson@linaro.org>2013-06-10 17:03:36 +0200
committerChris Ball <cjb@laptop.org>2013-06-27 18:39:15 +0200
commit58a8a4a1a5da4694a3a069de5e0a8c15995e7b5f (patch)
tree8d3208b1b034f3a4408849d7b1941ff80a03bd48 /drivers/mmc
parentmmc: jz4740: Use managed resources (diff)
downloadlinux-58a8a4a1a5da4694a3a069de5e0a8c15995e7b5f.tar.xz
linux-58a8a4a1a5da4694a3a069de5e0a8c15995e7b5f.zip
mmc: core: Remove unnecessary check for the remove callback
For every bus_ops type the .remove callback always exist, thus there are no need to check the existence of it, before we decide to call it. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Tested-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/core/core.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index e9a104b9e4d3..d2ee2829b313 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -2483,9 +2483,7 @@ void mmc_stop_host(struct mmc_host *host)
mmc_bus_get(host);
if (host->bus_ops && !host->bus_dead) {
/* Calling bus_ops->remove() with a claimed host can deadlock */
- if (host->bus_ops->remove)
- host->bus_ops->remove(host);
-
+ host->bus_ops->remove(host);
mmc_claim_host(host);
mmc_detach_bus(host);
mmc_power_off(host);
@@ -2638,8 +2636,7 @@ int mmc_suspend_host(struct mmc_host *host)
* bus_ops->remove() with a claimed host can
* deadlock.)
*/
- if (host->bus_ops->remove)
- host->bus_ops->remove(host);
+ host->bus_ops->remove(host);
mmc_claim_host(host);
mmc_detach_bus(host);
mmc_power_off(host);
@@ -2722,9 +2719,7 @@ int mmc_pm_notify(struct notifier_block *notify_block,
break;
/* Calling bus_ops->remove() with a claimed host can deadlock */
- if (host->bus_ops->remove)
- host->bus_ops->remove(host);
-
+ host->bus_ops->remove(host);
mmc_claim_host(host);
mmc_detach_bus(host);
mmc_power_off(host);