diff options
author | Ulf Hansson <ulf.hansson@linaro.org> | 2019-02-13 20:03:30 +0100 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2019-02-25 17:20:21 +0100 |
commit | eae343c290f78916b254972e85e0b419e55618f1 (patch) | |
tree | 06535e95538295dfe00d90ddae50adb8a371a728 /drivers/mmc/core/core.c | |
parent | 9d2d24302e615e984034d2f60a4da739de6bd637 (diff) |
mmc: core: Convert mmc_align_data_size() into an SDIO specific function
The only user of mmc_align_data_size() is sdio_align_size(), which is
called from SDIO func drivers to let them distinguish, how to optimally
allocate data buffers.
Let's move mmc_align_data_size() close to the SDIO code as to make it
static, rename it to _sdio_align_size() and simplify its definition, all
with the purpose of clarifying that this is SDIO specific.
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Avri Altman <avri.altman@wdc.com>
Diffstat (limited to 'drivers/mmc/core/core.c')
-rw-r--r-- | drivers/mmc/core/core.c | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 659eb32c0246..b45aaa904107 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -757,33 +757,6 @@ void mmc_set_data_timeout(struct mmc_data *data, const struct mmc_card *card) } EXPORT_SYMBOL(mmc_set_data_timeout); -/** - * mmc_align_data_size - pads a transfer size to a more optimal value - * @card: the MMC card associated with the data transfer - * @sz: original transfer size - * - * Pads the original data size with a number of extra bytes in - * order to avoid controller bugs and/or performance hits - * (e.g. some controllers revert to PIO for certain sizes). - * - * Returns the improved size, which might be unmodified. - * - * Note that this function is only relevant when issuing a - * single scatter gather entry. - */ -unsigned int mmc_align_data_size(struct mmc_card *card, unsigned int sz) -{ - /* - * FIXME: We don't have a system for the controller to tell - * the core about its problems yet, so for now we just 32-bit - * align the size. - */ - sz = ((sz + 3) / 4) * 4; - - return sz; -} -EXPORT_SYMBOL(mmc_align_data_size); - /* * Allow claiming an already claimed host if the context is the same or there is * no context but the task is the same. |