]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
mmc: core: Drop check for mmc_card_is_removable() in mmc_rescan()
authorUlf Hansson <ulf.hansson@linaro.org>
Thu, 10 Oct 2019 13:54:37 +0000 (15:54 +0200)
committerSeth Forshee <seth.forshee@canonical.com>
Mon, 6 Jan 2020 13:57:20 +0000 (07:57 -0600)
BugLink: https://bugs.launchpad.net/bugs/1858427
commit 99b4ddd8b76a6f60a8c2b3775849d65d21a418fc upstream.

Upfront in mmc_rescan() we use the host->rescan_entered flag, to allow
scanning only once for non-removable cards. Therefore, it's also not
possible that we can have a corresponding card bus attached (host->bus_ops
is NULL), when we are scanning non-removable cards.

For this reason, let' drop the check for mmc_card_is_removable() as it's
redundant.

Reviewed-by: Douglas Anderson <dianders@chromium.org>
Tested-by: Douglas Anderson <dianders@chromium.org>
Cc: stable@vger.kernel.org # v5.4+
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
drivers/mmc/core/core.c

index 221127324709cf8746044d589f75a73fadb72e36..6f8342702c7348d033630de5cd304ed92b1015f9 100644 (file)
@@ -2297,11 +2297,8 @@ void mmc_rescan(struct work_struct *work)
 
        mmc_bus_get(host);
 
-       /*
-        * if there is a _removable_ card registered, check whether it is
-        * still present
-        */
-       if (host->bus_ops && !host->bus_dead && mmc_card_is_removable(host))
+       /* Verify a registered card to be functional, else remove it. */
+       if (host->bus_ops && !host->bus_dead)
                host->bus_ops->detect(host);
 
        host->detect_change = 0;