diff options
author | Ulf Hansson <ulf.hansson@linaro.org> | 2017-01-13 14:14:13 +0100 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2017-02-13 13:20:23 +0100 |
commit | 2e4af7b6554a05406ac03f2792d0415c1ab9aeaa (patch) | |
tree | aafa8950b34d657d1d4ccd5e852dafecaf5f6a73 /drivers/mmc/host/vub300.c | |
parent | 136b0a471cd41b906dd4e00789cc998632a8cdd7 (diff) | |
download | linux-2e4af7b6554a05406ac03f2792d0415c1ab9aeaa.tar.bz2 |
mmc: vub300: Don't use mmc_card_present() when validating for inserted card
The mmc_card_present() function helps the mmc core to track an internal
state of the card device. More importantly, it's not intended to be used by
mmc host drivers to check for an inserted card. Therefore, let's stop using
it and instead rely on checking for a valid pointer to a struct mmc_card,
as it should be good enough.
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/mmc/host/vub300.c')
-rw-r--r-- | drivers/mmc/host/vub300.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/mmc/host/vub300.c b/drivers/mmc/host/vub300.c index 21ea776c6e07..c061e7c704be 100644 --- a/drivers/mmc/host/vub300.c +++ b/drivers/mmc/host/vub300.c @@ -726,8 +726,7 @@ static void vub300_deadwork_thread(struct work_struct *work) */ } else if (vub300->card_present) { check_vub300_port_status(vub300); - } else if (vub300->mmc && vub300->mmc->card && - mmc_card_present(vub300->mmc->card)) { + } else if (vub300->mmc && vub300->mmc->card) { /* * the MMC core must not have responded * to the previous indication - lets @@ -1754,8 +1753,7 @@ static void vub300_cmndwork_thread(struct work_struct *work) int data_length; mutex_lock(&vub300->cmd_mutex); init_completion(&vub300->command_complete); - if (likely(vub300->vub_name[0]) || !vub300->mmc->card || - !mmc_card_present(vub300->mmc->card)) { + if (likely(vub300->vub_name[0]) || !vub300->mmc->card) { /* * the name of the EMPTY Pseudo firmware file * is used as a flag to indicate that the file |