mmc: core: Drop superfluous validations in mmc_hw|sw_reset()
authorUlf Hansson <ulf.hansson@linaro.org>
Fri, 12 Feb 2021 13:15:32 +0000 (14:15 +0100)
committerUlf Hansson <ulf.hansson@linaro.org>
Tue, 30 Mar 2021 09:41:58 +0000 (11:41 +0200)
commitfefdd3c91e0a7b3cbb3f25925d93a57c45cb0f31
tree114e3e85efb226b6e6f7ff4210a7f9ce34ed4ba3
parent147186f531ae49c18b7a9091a2c40e83b3d95649
mmc: core: Drop superfluous validations in mmc_hw|sw_reset()

The mmc_hw|sw_reset() APIs are designed to be called solely from upper
layers, which means drivers that operates on top of the struct mmc_card,
like the mmc block device driver and an SDIO functional driver.

Additionally, as long as the struct mmc_host has a valid pointer to a
struct mmc_card, the corresponding host->bus_ops pointer stays valid and
assigned.

For these reasons, let's drop the superfluous reference counting and the
redundant validations in mmc_hw|sw_reset().

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20210212131532.236775-1-ulf.hansson@linaro.org
drivers/mmc/core/block.c
drivers/mmc/core/core.c