diff options
author | Eric Biggers <ebiggers@google.com> | 2024-12-12 20:19:49 -0800 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2024-12-19 14:43:28 +0100 |
commit | 08a7ead3242f70f4415232800104ae458fd96d17 (patch) | |
tree | f2bf5cb4660d629fbbcbff42a0a76fefad773cfe /drivers/mmc | |
parent | f2d3630f1c361cfcd16fff88ff79e19ef8ac896a (diff) |
mmc: crypto: add mmc_from_crypto_profile()
Add a helper function that encapsulates a container_of expression. For
now there is just one user but soon there will be more.
Signed-off-by: Eric Biggers <ebiggers@google.com>
Message-ID: <20241213041958.202565-7-ebiggers@kernel.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/cqhci-crypto.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/mmc/host/cqhci-crypto.c b/drivers/mmc/host/cqhci-crypto.c index d5f4b6972f63..2951911d3f78 100644 --- a/drivers/mmc/host/cqhci-crypto.c +++ b/drivers/mmc/host/cqhci-crypto.c @@ -25,10 +25,7 @@ static const struct cqhci_crypto_alg_entry { static inline struct cqhci_host * cqhci_host_from_crypto_profile(struct blk_crypto_profile *profile) { - struct mmc_host *mmc = - container_of(profile, struct mmc_host, crypto_profile); - - return mmc->cqe_private; + return mmc_from_crypto_profile(profile)->cqe_private; } static int cqhci_crypto_program_key(struct cqhci_host *cq_host, |