]> git.baikalelectronics.ru Git - kernel.git/commit
mmc: pwrseq: simplify alloc/free hooks
authorAlexandre Courbot <acourbot@nvidia.com>
Thu, 12 Feb 2015 04:36:11 +0000 (13:36 +0900)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 23 Mar 2015 13:13:42 +0000 (14:13 +0100)
commita7c0e856ef1c8cbb8d4ac8f15bee96c0133637bb
tree45881949b4b087be7de8c7527b3ae0ec31a11cbc
parent948ad7d52c9c4ce6dfe991d1f4c91b9a54add22f
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>
drivers/mmc/core/pwrseq.c
drivers/mmc/core/pwrseq.h
drivers/mmc/core/pwrseq_emmc.c
drivers/mmc/core/pwrseq_simple.c