mmc: core: Validate suspend prerequisites for SDIO at SUSPEND_PREPARE
authorUlf Hansson <ulf.hansson@linaro.org>
Mon, 10 Jun 2013 15:03:37 +0000 (17:03 +0200)
committerlintao <lintao@rock-chips.com>
Fri, 7 Mar 2014 04:55:04 +0000 (12:55 +0800)
commitcf46d2411731e8491054e595bc3eefa0d37ce5ee
tree1e52b2f65b9e1212d8717f3787c6d6acea8855fe
parent0bdc9d6ec058bc0b382a8ff07ea381a3ffc6e92e
mmc: core: Validate suspend prerequisites for SDIO at SUSPEND_PREPARE

This patch moves the validation for all the suspend prerequisites to be
done at SUSPEND_PREPARE notification. Previously in the SDIO case parts
of the validation was done from mmc_suspend_host.

This patch invents a new pre_suspend bus_ops callback and implements it
for SDIO. Returning an error code from it, will mean at SUSPEND_PREPARE
notification, the card will be removed before proceeding with the
suspend sequence.

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>
drivers/mmc/core/core.c
drivers/mmc/core/core.h
drivers/mmc/core/sdio.c