]> git.baikalelectronics.ru Git - kernel.git/commit
mmc: mediatek: Drop pointer to mmc_host from msdc_host
authorAmey Narkhede <ameynarkhede03@gmail.com>
Thu, 17 Sep 2020 19:26:25 +0000 (00:56 +0530)
committerUlf Hansson <ulf.hansson@linaro.org>
Thu, 24 Sep 2020 12:28:40 +0000 (14:28 +0200)
commit6c1a19bd4be8cbce9abcb54e03bee75d1e30f55a
tree049ed992b4da2e9b01bdcec037e303528a0cfe12
parent078bbc83b6d5c6ca6c0014fdb588c26ea015c692
mmc: mediatek: Drop pointer to mmc_host from msdc_host

The MediaTek MMC driver uses  pointer to get from private
msdc_host structure to the generic mmc_host structure.
However mmc_host always precedes msdc_host in memory so compute
its address with a subtraction (which is cheaper than a dereference)
using mmc_from_priv() and drop the extra pointer.

Signed-off-by: Amey Narkhede <ameynarkhede03@gmail.com>
Link: https://lore.kernel.org/r/20200917192624.548720-1-ameynarkhede03@gmail.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/mtk-sd.c