aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/core/pwrseq.h
diff options
context:
space:
mode:
authorAlexandre Courbot <acourbot@nvidia.com>2015-02-12 13:36:11 +0900
committerUlf Hansson <ulf.hansson@linaro.org>2015-03-23 14:13:42 +0100
commit0f12a0ce4ce4a47d8a34399a3f22d4ce7fd2d908 (patch)
tree45881949b4b087be7de8c7527b3ae0ec31a11cbc /drivers/mmc/core/pwrseq.h
parentmmc: sunxi: avoid invalid pointer calculation (diff)
downloadlinux-dev-0f12a0ce4ce4a47d8a34399a3f22d4ce7fd2d908.tar.xz
linux-dev-0f12a0ce4ce4a47d8a34399a3f22d4ce7fd2d908.zip
mmc: pwrseq: simplify alloc/free hooks
The alloc() and free() hooks required each pwrseq implementation to set host->pwrseq themselves. This is error-prone and could be done at a higher level if alloc() was changed to return a pointer to a struct mmc_pwrseq instead of an error code. This patch performs this change and moves the burden of maintaining host->pwrseq from the power sequence hooks to the pwrseq code. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/core/pwrseq.h')
-rw-r--r--drivers/mmc/core/pwrseq.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/mmc/core/pwrseq.h b/drivers/mmc/core/pwrseq.h
index aba3409e8d6e..096da48c6a7e 100644
--- a/drivers/mmc/core/pwrseq.h
+++ b/drivers/mmc/core/pwrseq.h
@@ -27,8 +27,10 @@ void mmc_pwrseq_post_power_on(struct mmc_host *host);
void mmc_pwrseq_power_off(struct mmc_host *host);
void mmc_pwrseq_free(struct mmc_host *host);
-int mmc_pwrseq_simple_alloc(struct mmc_host *host, struct device *dev);
-int mmc_pwrseq_emmc_alloc(struct mmc_host *host, struct device *dev);
+struct mmc_pwrseq *mmc_pwrseq_simple_alloc(struct mmc_host *host,
+ struct device *dev);
+struct mmc_pwrseq *mmc_pwrseq_emmc_alloc(struct mmc_host *host,
+ struct device *dev);
#else