From f20e3eb414f13987261b4860a90d21eb59f153bb Mon Sep 17 00:00:00 2001 From: Lucas Stach Date: Tue, 3 Jun 2014 22:34:48 +0200 Subject: [PATCH] mci: implement non-removable property There is no need to check the card-detect status for non-removable devices. Signed-off-by: Lucas Stach Signed-off-by: Sascha Hauer --- drivers/mci/mci-core.c | 5 ++++- include/mci.h | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c index 282d2399f..ce6e590aa 100644 --- a/drivers/mci/mci-core.c +++ b/drivers/mci/mci-core.c @@ -1572,7 +1572,8 @@ static int mci_card_probe(struct mci *mci) struct mci_host *host = mci->host; int i, rc, disknum, ret; - if (host->card_present && !host->card_present(host)) { + if (host->card_present && !host->card_present(host) && + !host->non_removable) { dev_err(&mci->dev, "no card inserted\n"); return -ENODEV; } @@ -1839,4 +1840,6 @@ void mci_of_parse(struct mci_host *host) host->dsr_val = dsr_val; } } + + host->non_removable = of_property_read_bool(np, "non-removable"); } diff --git a/include/mci.h b/include/mci.h index f2c6fd1cb..c5ab5b3fc 100644 --- a/include/mci.h +++ b/include/mci.h @@ -302,6 +302,7 @@ struct mci_host { unsigned max_req_size; unsigned dsr_val; /**< optional dsr value */ int use_dsr; /**< optional dsr usage flag */ + bool non_removable; /**< device is non removable */ struct regulator *supply; /** init the host interface */